Class SolidPolygonMesh
java.lang.Object
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.solid.SolidPolygonMesh
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:
-
Field Summary
Fields inherited from class AbstractShape
cachedBoundingBox, mouseInteractionController -
Constructor Summary
ConstructorsConstructorDescriptionSolidPolygonMesh(List<SolidPolygon> triangles, Point3D location) Creates a mesh from a list of SolidPolygon triangles. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of triangles in this mesh.Methods inherited from class AbstractCompositeShape
addShape, addShape, beforeTransformHook, extractSolidPolygons, getBoundingBox, getGroup, getLocation, getSubShapesRegistry, getTransform, getViewSpaceTracker, hideGroup, intersect, removeGroup, setBackfaceCulling, setCacheNeedsRebuild, setColor, setGroupForUngrouped, setMouseInteractionController, setRootComposite, setShadingEnabled, setTransform, showGroup, subtract, transform, unionMethods inherited from class AbstractShape
invalidateBounds
-
Constructor Details
-
SolidPolygonMesh
Creates a mesh from a list of SolidPolygon triangles.- Parameters:
triangles- the triangles to include in the meshlocation- the position in 3D space
-
-
Method Details
-
getTriangleCount
public int getTriangleCount()Returns the number of triangles in this mesh.- Returns:
- the triangle count
-