Package com.ardor3d.util.geom
Class GeometryTool
java.lang.Object
com.ardor3d.util.geom.GeometryTool
This tool assists in reducing geometry information.
Note: Does not work with geometry using texcoords other than 2d coords.
TODO: Consider adding an option for "close enough" vertex matches... ie, smaller than X distance apart.
Note: Does not work with geometry using texcoords other than 2d coords.
TODO: Consider adding an option for "close enough" vertex matches... ie, smaller than X distance apart.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Condition options for determining if one vertex is "equal" to another. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Converts an indexed geometry into a non indexed geometryminimizeVerts
(Mesh mesh, VertGroupData groupData) Attempt to collapse duplicate vertex data in a given mesh.minimizeVerts
(Mesh mesh, EnumSet<GeometryTool.MatchCondition> conditions) Attempt to collapse duplicate vertex data in a given mesh.void
trimEmptyBranches
(Spatial spatial)
-
Constructor Details
-
GeometryTool
public GeometryTool() -
GeometryTool
public GeometryTool(boolean nioBuffersAllocationOnHeapEnabled)
-
-
Method Details
-
minimizeVerts
Attempt to collapse duplicate vertex data in a given mesh. Vertices are considered duplicate if they occupy the same place in space and match the supplied conditions. All vertices in the mesh are considered part of the same vertex "group".- Parameters:
mesh
- the mesh to reduceconditions
- our match conditions.- Returns:
- a mapping of old vertex positions to their new positions.
-
minimizeVerts
Attempt to collapse duplicate vertex data in a given mesh. Vertices are consider duplicate if they occupy the same place in space and match the supplied conditions. The conditions are supplied per vertex group.- Parameters:
mesh
- the mesh to reducegroupData
- grouping data for the vertices in this mesh.- Returns:
- a mapping of old vertex positions to their new positions.
-
trimEmptyBranches
-
convertIndexedGeometryIntoNonIndexedGeometry
Converts an indexed geometry into a non indexed geometry- Parameters:
meshData
- mesh data
-