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 CSG operation results or procedural geometry generation.
Usage:
// From CSG result with fluent configuration
shapes.addShape(CSGSolid.subtract(cube, sphere).toMesh(location)
.setShadingEnabled(true)
.setBackfaceCulling(true));
// From list of triangles
List<SolidPolygon> triangles = ...;
SolidPolygonMesh mesh = new SolidPolygonMesh(triangles, location);
- See Also:
-
Field Summary
Fields inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
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 eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape
addShape, addShape, beforeTransformHook, extractSolidPolygons, getGroup, getLocation, getOriginalSubShapes, getViewSpaceTracker, hideGroup, removeGroup, setBackfaceCulling, setColor, setGroupForUngrouped, setMouseInteractionController, setShadingEnabled, setTransform, showGroup, transform
-
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
-