java.lang.Object
committee.nova.mods.avaritia.api.client.render.model.OBJParser

public class OBJParser extends Object
Created by covers1624 on 11/4/22.
  • 构造器详细资料

    • OBJParser

      public OBJParser(net.minecraft.resources.ResourceLocation location)
      Create a new instance of an OBJParser for a nice builder-like structure.
      参数:
      location - The ResourceLocation of the OBJ.
  • 方法详细资料

    • parse

      public static Map<String,CCModel> parse(net.minecraft.server.packs.resources.ResourceProvider provider, net.minecraft.resources.ResourceLocation loc, com.mojang.blaze3d.vertex.VertexFormat.Mode vertexMode, @Nullable @Nullable Transformation coordSystem, boolean ignoreMtl)
      Parse an OBJ model into a named map of CCModels.
      参数:
      provider - The ResourceProvider to locate assets.
      loc - The ResourceLocation of the OBJ model.
      vertexMode - The VertexFormat.Mode to parse the model into.
      coordSystem - The coordinate system transformation to apply during parsing.
      ignoreMtl - If MTL files should be ignored.
      返回:
      The parsed models.
    • provider

      public OBJParser provider(net.minecraft.server.packs.resources.ResourceProvider provider)
      Set the ResourceProvider used to locate assets.
      参数:
      provider - The ResourceProvider.
      返回:
      The same parser.
    • vertexMode

      public OBJParser vertexMode(com.mojang.blaze3d.vertex.VertexFormat.Mode mode)
      Set the VertexFormat.Mode to parse the OBJ model into.
      参数:
      mode - The mode.
      返回:
      The same parser.
    • quads

      public OBJParser quads()
      Overload of vertexMode(VertexFormat.Mode) passing VertexFormat.Mode.QUADS.
      返回:
      The same parser.
    • coordSystem

      public OBJParser coordSystem(@Nullable @Nullable Transformation coordSystem)
      Set the coordinate system transformation to apply during parsing.
      参数:
      coordSystem - The coordinate transform.
      返回:
      The same parser.
    • swapYZ

      public OBJParser swapYZ()
      Overload of coordSystem(Transformation) specifying the SwapYZ coordinate system transformation.
      返回:
      The same parser.
    • ignoreMtl

      public OBJParser ignoreMtl()
      Sets the parser to ignore MTL definitions and usages within the OBJ.
      返回:
      The same parser.
    • parse

      public Map<String,CCModel> parse()
      Actually perform the parsing.
      返回:
      The parsed models.