toxi.geom.mesh.subdiv
Class SubdivisionStrategy
java.lang.Object
toxi.geom.mesh.subdiv.SubdivisionStrategy
- Direct Known Subclasses:
- DisplacementSubdivision, DualDisplacementSubdivision, DualSubdivision, MidpointSubdivision, TriSubdivision
public abstract class SubdivisionStrategy
- extends java.lang.Object
This is the abstract parent class for all subdivision strategies. Each of its
implementations defines a concrete solution to split a single edge of a
WETriangleMesh
.
Method Summary |
abstract java.util.List<Vec3D> |
computeSplitPoints(WingedEdge edge)
Computes a number of points on (or near) the given edge which are used
for splitting the edge in smaller segments. |
java.util.Comparator<? super WingedEdge> |
getEdgeOrdering()
Returns the Comparator used to sort a mesh's edge list based on a
certain criteria. |
void |
setEdgeOrdering(java.util.Comparator<? super WingedEdge> order)
Sets the given edge list Comparator for a strategy
implementation. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_ORDERING
public static final java.util.Comparator<? super WingedEdge> DEFAULT_ORDERING
SubdivisionStrategy
public SubdivisionStrategy()
computeSplitPoints
public abstract java.util.List<Vec3D> computeSplitPoints(WingedEdge edge)
- Computes a number of points on (or near) the given edge which are used
for splitting the edge in smaller segments.
- Parameters:
edge
- edge to split
- Returns:
- list of split points
getEdgeOrdering
public java.util.Comparator<? super WingedEdge> getEdgeOrdering()
- Returns the
Comparator
used to sort a mesh's edge list based on a
certain criteria. By default the EdgeLengthComparator
is used.
- Returns:
- edge comparator
setEdgeOrdering
public void setEdgeOrdering(java.util.Comparator<? super WingedEdge> order)
- Sets the given edge list
Comparator
for a strategy
implementation.
- Parameters:
order
-