Class ObjModel
java.lang.Object
net.minecraftforge.client.model.geometry.SimpleUnbakedGeometry<ObjModel>
net.minecraftforge.client.model.obj.ObjModel
- All Implemented Interfaces:
IUnbakedGeometry<ObjModel>
A model loaded from an OBJ file.
Supports positions, texture coordinates, normals and colors. The material library
has support for numerous features, including support for ResourceLocation
textures (non-standard).
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
private class
class
static final record
-
Field Summary
Modifier and TypeFieldDescriptionfinal boolean
private static final org.joml.Vector4f
private final List<org.joml.Vector4f>
private static final Vec2[]
final boolean
final boolean
final ResourceLocation
final @Nullable String
private final List<org.joml.Vector3f>
private final Map<String,
ObjModel.ModelGroup> private final List<org.joml.Vector3f>
final boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addQuads
(IGeometryBakingContext owner, IModelBuilder<?> modelBuilder, ModelBaker baker, Function<Material, TextureAtlasSprite> spriteGetter, ModelState modelTransform, ResourceLocation modelLocation) bakeRenderable
(IGeometryBakingContext configuration) Returns a set of all the components whose visibility may be configured viaIGeometryBakingContext
.makeQuad
(int[][] indices, int tintIndex, org.joml.Vector4f colorTint, org.joml.Vector4f ambientColor, TextureAtlasSprite texture, Transformation transform) static ObjModel
parse
(ObjTokenizer tokenizer, ObjModel.ModelSettings settings) private static Vec2
parseVector2
(String[] line) private static org.joml.Vector3f
parseVector3
(String[] line) (package private) static org.joml.Vector4f
parseVector4
(String[] line) private static org.joml.Vector3f
parseVector4To3
(String[] line) Methods inherited from class net.minecraftforge.client.model.geometry.SimpleUnbakedGeometry
bake
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraftforge.client.model.geometry.IUnbakedGeometry
resolveParents
-
Field Details
-
COLOR_WHITE
private static final org.joml.Vector4f COLOR_WHITE -
DEFAULT_COORDS
-
parts
-
rootComponentNames
-
allComponentNames
-
positions
-
texCoords
-
normals
-
colors
-
automaticCulling
public final boolean automaticCulling -
shadeQuads
public final boolean shadeQuads -
flipV
public final boolean flipV -
emissiveAmbient
public final boolean emissiveAmbient -
mtlOverride
-
modelLocation
-
-
Constructor Details
-
ObjModel
-
-
Method Details
-
parse
public static ObjModel parse(ObjTokenizer tokenizer, ObjModel.ModelSettings settings) throws IOException - Throws:
IOException
-
parseVector4To3
-
parseVector2
-
parseVector3
-
parseVector4
-
addQuads
protected void addQuads(IGeometryBakingContext owner, IModelBuilder<?> modelBuilder, ModelBaker baker, Function<Material, TextureAtlasSprite> spriteGetter, ModelState modelTransform, ResourceLocation modelLocation) - Specified by:
addQuads
in classSimpleUnbakedGeometry<ObjModel>
-
getRootComponentNames
-
getConfigurableComponentNames
Description copied from interface:IUnbakedGeometry
Returns a set of all the components whose visibility may be configured viaIGeometryBakingContext
.- Returns:
- a set of all the components whose visibility may be configured via
IGeometryBakingContext
-
makeQuad
private org.apache.commons.lang3.tuple.Pair<BakedQuad,Direction> makeQuad(int[][] indices, int tintIndex, org.joml.Vector4f colorTint, org.joml.Vector4f ambientColor, TextureAtlasSprite texture, Transformation transform) -
bakeRenderable
-