public class SolidPolygonMesh extends AbstractCompositeShape
A renderable mesh composed of SolidPolygon triangles.

This is a generic composite shape that holds a collection of triangles. It can be constructed from any source of triangles, such as procedural geometry generation or loaded mesh data.

Usage:


 // From list of triangles
 List<SolidPolygon> triangles = ...;
 SolidPolygonMesh mesh = new SolidPolygonMesh(triangles, location);

 // With fluent configuration
 shapes.addShape(mesh.setShadingEnabled(true).setBackfaceCulling(true));
 
See Also:
  • Constructor Details

    • SolidPolygonMesh

      public SolidPolygonMesh(List<SolidPolygon> triangles, Point3D location)
      Creates a mesh from a list of SolidPolygon triangles.
      Parameters:
      triangles - the triangles to include in the mesh
      location - the position in 3D space
  • Method Details

    • getTriangleCount

      public int getTriangleCount()
      Returns the number of triangles in this mesh.
      Returns:
      the triangle count