Class ObjGeometry
java.lang.Object
net.neoforged.neoforge.client.model.obj.ObjGeometry
- All Implemented Interfaces:
UnbakedGeometry
,UnbakedGeometryExtension
,ExtendedUnbakedGeometry
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
private class
class
static final record
-
Field Summary
FieldsModifier 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 com.google.common.collect.Multimap
<String, ObjGeometry.ModelGroup> private final List
<org.joml.Vector3f> final boolean
Fields inherited from interface net.minecraft.client.resources.model.UnbakedGeometry
EMPTY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbake
(TextureSlots textureSlots, ModelBaker baker, ModelState state, ModelDebugName debugName, ContextMap additionalProperties) Version ofUnbakedGeometry.bake(TextureSlots, ModelBaker, ModelState, ModelDebugName)
that also receives additional properties sourced fromUnbakedModelExtension.fillAdditionalProperties(net.minecraft.util.context.ContextMap.Builder)
.makeQuad
(int[][] indices, int tintIndex, org.joml.Vector4f colorTint, org.joml.Vector4f ambientColor, TextureAtlasSprite texture, Transformation transform) static ObjGeometry
parse
(ObjTokenizer tokenizer, ObjGeometry.Settings 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.client.model.ExtendedUnbakedGeometry
bake
-
Field Details
-
COLOR_WHITE
private static final org.joml.Vector4f COLOR_WHITE -
DEFAULT_COORDS
-
parts
-
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
-
ObjGeometry
-
-
Method Details
-
parse
public static ObjGeometry parse(ObjTokenizer tokenizer, ObjGeometry.Settings settings) throws IOException - Throws:
IOException
-
parseVector4To3
-
parseVector2
-
parseVector3
-
parseVector4
-
bake
public QuadCollection bake(TextureSlots textureSlots, ModelBaker baker, ModelState state, ModelDebugName debugName, ContextMap additionalProperties) Description copied from interface:UnbakedGeometryExtension
Version ofUnbakedGeometry.bake(TextureSlots, ModelBaker, ModelState, ModelDebugName)
that also receives additional properties sourced fromUnbakedModelExtension.fillAdditionalProperties(net.minecraft.util.context.ContextMap.Builder)
.- Specified by:
bake
in interfaceExtendedUnbakedGeometry
- Specified by:
bake
in interfaceUnbakedGeometryExtension
-
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)
-