Package rosequartz.gfx
Class Model
java.lang.Object
rosequartz.gfx.Model
Represents a 3D-Model from inside a .obj file.
The exported .obj file must include normals and uv's.
The faces must be triangulated, Forward must be '-Z forward' and Up must be 'Y up'.
Seems must end on separate vertices and the entire model must be set to use 'Smooth' shading.
Materials are ignored.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classVertex attributes of a 3D-model. -
Constructor Summary
ConstructorsConstructorDescriptionModel(Resource r, VertexBuilder<Model.VertexStructure> vertexBuilder)Creates a Model from a .obj file.Model(VertexArray vertexArray, VertexBuilder<Model.VertexStructure> vertexBuilder)Creates a Model from a vertex buffer. -
Method Summary
Modifier and TypeMethodDescriptionGets the model vertex array.Gets the model vertex builder.toString()
-
Constructor Details
-
Model
public Model(VertexArray vertexArray, VertexBuilder<Model.VertexStructure> vertexBuilder) throws NotOnGraphicsThreadExceptionCreates a Model from a vertex buffer.- Parameters:
vertexArray- vertex buffer- Throws:
NotOnGraphicsThreadException
-
Model
public Model(Resource r, VertexBuilder<Model.VertexStructure> vertexBuilder) throws NotOnGraphicsThreadExceptionCreates a Model from a .obj file.- Parameters:
r- .obj filevertexBuilder- vertex builder- Throws:
NotOnGraphicsThreadException
-
-
Method Details