类 OBJParser
java.lang.Object
committee.nova.mods.avaritia.api.client.render.model.OBJParser
Created by covers1624 on 11/4/22.
-
构造器概要
构造器构造器说明OBJParser(net.minecraft.resources.ResourceLocation location) Create a new instance of an OBJParser for a nice builder-like structure. -
方法概要
修饰符和类型方法说明coordSystem(@Nullable Transformation coordSystem) Set the coordinate system transformation to apply during parsing.Sets the parser to ignore MTL definitions and usages within the OBJ.parse()Actually perform the parsing.parse(net.minecraft.server.packs.resources.ResourceProvider provider, net.minecraft.resources.ResourceLocation loc, com.mojang.blaze3d.vertex.VertexFormat.Mode vertexMode, @Nullable Transformation coordSystem, boolean ignoreMtl) Parse an OBJ model into a named map ofCCModels.provider(net.minecraft.server.packs.resources.ResourceProvider provider) Set theResourceProviderused to locate assets.quads()Overload ofvertexMode(VertexFormat.Mode)passingVertexFormat.Mode.QUADS.swapYZ()Overload ofcoordSystem(Transformation)specifying theSwapYZcoordinate system transformation.vertexMode(com.mojang.blaze3d.vertex.VertexFormat.Mode mode) Set theVertexFormat.Modeto parse the OBJ model into.
-
构造器详细资料
-
OBJParser
public OBJParser(net.minecraft.resources.ResourceLocation location) Create a new instance of an OBJParser for a nice builder-like structure.- 参数:
location- TheResourceLocationof 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 ofCCModels.- 参数:
provider- TheResourceProviderto locate assets.loc- TheResourceLocationof the OBJ model.vertexMode- TheVertexFormat.Modeto parse the model into.coordSystem- The coordinate system transformation to apply during parsing.ignoreMtl- If MTL files should be ignored.- 返回:
- The parsed models.
-
provider
Set theResourceProviderused to locate assets.- 参数:
provider- TheResourceProvider.- 返回:
- The same parser.
-
vertexMode
Set theVertexFormat.Modeto parse the OBJ model into.- 参数:
mode- The mode.- 返回:
- The same parser.
-
quads
Overload ofvertexMode(VertexFormat.Mode)passingVertexFormat.Mode.QUADS.- 返回:
- The same parser.
-
coordSystem
Set the coordinate system transformation to apply during parsing.- 参数:
coordSystem- The coordinate transform.- 返回:
- The same parser.
-
swapYZ
Overload ofcoordSystem(Transformation)specifying theSwapYZcoordinate system transformation.- 返回:
- The same parser.
-
ignoreMtl
Sets the parser to ignore MTL definitions and usages within the OBJ.- 返回:
- The same parser.
-
parse
Actually perform the parsing.- 返回:
- The parsed models.
-