Class ObjModel


public class ObjModel extends LightmappedCompositeShape
A 3D model loaded from a Wavefront OBJ file, as a composite of solid polygons (one SolidPolygon per OBJ face, colored by the face's usemtl material).

Instances are built by ObjLoader; treat the model as an ordinary composite: position it with AbstractCompositeShape.setTransform(Transform), toggle AbstractCompositeShape.setShadingEnabled(boolean) / AbstractCompositeShape.setBackfaceCulling(boolean), and add it to the scene graph.

See Also:
  • Constructor Details

    • ObjModel

      public ObjModel(int sourceVertexCount, int faceCount, int usedMaterialCount)
  • Method Details

    • getSourceVertexCount

      public int getSourceVertexCount()
      Number of vertices declared in the OBJ source.
    • getFaceCount

      public int getFaceCount()
      Number of faces (= child polygons) in the model.
    • getUsedMaterialCount

      public int getUsedMaterialCount()
      Number of distinct materials referenced by the model's faces.