public class OBJModel extends java.lang.Object implements IMultipartModelGeometry<OBJModel>
Modifier and Type | Class and Description |
---|---|
class |
OBJModel.ModelGroup |
private class |
OBJModel.ModelMesh |
class |
OBJModel.ModelObject |
static class |
OBJModel.ModelSettings |
Modifier and Type | Field and Description |
---|---|
boolean |
ambientToFullbright |
private static Vector4f |
COLOR_WHITE |
private java.util.List<Vector4f> |
colors |
private static Vec2f[] |
DEFAULT_COORDS |
boolean |
detectCullableFaces |
boolean |
diffuseLighting |
boolean |
flipV |
java.lang.String |
materialLibraryOverrideLocation |
ResourceLocation |
modelLocation |
private java.util.List<Vector3f> |
normals |
private java.util.Map<java.lang.String,OBJModel.ModelGroup> |
parts |
private java.util.List<Vector3f> |
positions |
private java.util.List<Vec2f> |
texCoords |
Constructor and Description |
---|
OBJModel(LineReader reader,
OBJModel.ModelSettings settings) |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<? extends IModelGeometryPart> |
getPart(java.lang.String name) |
java.util.Collection<? extends IModelGeometryPart> |
getParts() |
private org.apache.commons.lang3.tuple.Pair<BakedQuad,Direction> |
makeQuad(int[][] indices,
int tintIndex,
Vector4f colorTint,
Vector4f ambientColor,
TextureAtlasSprite texture,
TransformationMatrix transform) |
static Vec2f |
parseVector2(java.lang.String[] line) |
static Vector3f |
parseVector3(java.lang.String[] line) |
static Vector4f |
parseVector4(java.lang.String[] line) |
static Vector3f |
parseVector4To3(java.lang.String[] line) |
private void |
putVertexData(IVertexConsumer consumer,
Vector4f position0,
Vec2f texCoord0,
Vector3f normal0,
Vector4f color0,
Vec2f uv2,
TextureAtlasSprite texture) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addQuads, getTextures
bake
private static Vector4f COLOR_WHITE
private static Vec2f[] DEFAULT_COORDS
private final java.util.Map<java.lang.String,OBJModel.ModelGroup> parts
private final java.util.List<Vector3f> positions
private final java.util.List<Vec2f> texCoords
private final java.util.List<Vector3f> normals
private final java.util.List<Vector4f> colors
public final boolean detectCullableFaces
public final boolean diffuseLighting
public final boolean flipV
public final boolean ambientToFullbright
public final ResourceLocation modelLocation
@Nullable public final java.lang.String materialLibraryOverrideLocation
OBJModel(LineReader reader, OBJModel.ModelSettings settings) throws java.io.IOException
java.io.IOException
public static Vector3f parseVector4To3(java.lang.String[] line)
public static Vec2f parseVector2(java.lang.String[] line)
public static Vector3f parseVector3(java.lang.String[] line)
public static Vector4f parseVector4(java.lang.String[] line)
public java.util.Collection<? extends IModelGeometryPart> getParts()
getParts
in interface IModelGeometry<OBJModel>
getParts
in interface IMultipartModelGeometry<OBJModel>
public java.util.Optional<? extends IModelGeometryPart> getPart(java.lang.String name)
getPart
in interface IModelGeometry<OBJModel>
getPart
in interface IMultipartModelGeometry<OBJModel>
private org.apache.commons.lang3.tuple.Pair<BakedQuad,Direction> makeQuad(int[][] indices, int tintIndex, Vector4f colorTint, Vector4f ambientColor, TextureAtlasSprite texture, TransformationMatrix transform)
private void putVertexData(IVertexConsumer consumer, Vector4f position0, Vec2f texCoord0, Vector3f normal0, Vector4f color0, Vec2f uv2, TextureAtlasSprite texture)