public class TriSurf
extends java.lang.Object
This class currently enables construction of a surface from a set of points, using the algorithm of Cohen-Steiner and Da, 2002, A greedy Delaunay based surface reconstruction algorithm: The Visual Computer, v. 20, p. 4-16.
Modifier and Type | Class and Description |
---|---|
static class |
TriSurf.Edge
A directed edge.
|
static interface |
TriSurf.EdgeIterator
A type-safe iterator for edges.
|
static class |
TriSurf.Face
One triangular face in the surface.
|
static interface |
TriSurf.FaceIterator
A type-safe iterator for faces.
|
static class |
TriSurf.FaceList
A dynamically growing list of faces.
|
static class |
TriSurf.Node
A node, which can be added or removed from the surface.
|
static interface |
TriSurf.NodeIterator
A type-safe iterator for nodes.
|
Constructor and Description |
---|
TriSurf() |
Modifier and Type | Method and Description |
---|---|
boolean |
addNode(TriSurf.Node node)
Adds the specified node to this surface, if not already present.
|
boolean |
addNodes(TriSurf.Node[] nodes)
Adds the specified nodes to this surface, if not already present.
|
int |
countFaces()
Returns the number of faces in the surface.
|
int |
countNodes()
Returns the number of nodes in the surface.
|
TriSurf.Edge |
findEdge(TriSurf.Node nodeA,
TriSurf.Node nodeB)
Returns a directed edge AB that references the specified nodes.
|
TriSurf.Face |
findFace(TriSurf.Node node)
Returns a face that references the specified node.
|
TriSurf.Face |
findFace(TriSurf.Node node1,
TriSurf.Node node2)
Returns a face that references the specified nodes.
|
TriSurf.Face |
findFace(TriSurf.Node node1,
TriSurf.Node node2,
TriSurf.Node node3)
Returns a face that references the specified nodes.
|
TriSurf.Node |
findNodeNearest(float x,
float y,
float z)
Finds the node nearest to the point with specified coordinates.
|
TriSurf.Face[] |
getFaceNabors(TriSurf.Node node)
Gets an array of face nabors of the specified node.
|
void |
getFaceNabors(TriSurf.Node node,
TriSurf.FaceList nabors)
Appends the face nabors of the specified node to the specified list.
|
TriSurf.FaceIterator |
getFaces()
Gets an iterator for all faces in this surface.
|
TriSurf.NodeIterator |
getNodes()
Gets an iterator for all nodes in this surface.
|
boolean |
removeNode(TriSurf.Node node)
Removes the specified node from this surface, if present.
|
boolean |
removeNodes(TriSurf.Node[] nodes)
Removes the specified nodes from this surface, if present.
|
public boolean addNode(TriSurf.Node node)
node
- the node.public boolean addNodes(TriSurf.Node[] nodes)
nodes
- the nodes.public boolean removeNode(TriSurf.Node node)
node
- the node.public boolean removeNodes(TriSurf.Node[] nodes)
nodes
- the nodes.public int countNodes()
public int countFaces()
public TriSurf.NodeIterator getNodes()
public TriSurf.FaceIterator getFaces()
public TriSurf.Node findNodeNearest(float x, float y, float z)
x
- the x coordinate.y
- the y coordinate.z
- the z coordinate.public TriSurf.Face[] getFaceNabors(TriSurf.Node node)
node
- the node for which to get nabors.public void getFaceNabors(TriSurf.Node node, TriSurf.FaceList nabors)
node
- the node for which to get nabors.nabors
- the list to which nabors are appended.public TriSurf.Face findFace(TriSurf.Node node)
node
- the node.public TriSurf.Face findFace(TriSurf.Node node1, TriSurf.Node node2)
node1
- a node.node2
- a node.public TriSurf.Face findFace(TriSurf.Node node1, TriSurf.Node node2, TriSurf.Node node3)
node1
- a node.node2
- a node.node3
- a node.public TriSurf.Edge findEdge(TriSurf.Node nodeA, TriSurf.Node nodeB)
nodeA
- a node.nodeB
- a node.