public class PenetrationRegion
extends java.lang.Object
In some cases the penetration region may intersect only a single face of the intersecting mesh. The region is then referred to as a "single face region", and its bounding contours all lie within the single face of the intersecting mesh.
Constructor and Description |
---|
PenetrationRegion(PolygonalMesh mesh,
boolean clockwise)
Creates a new, empty penetration region for a specified mesh.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(PenetrationRegion region)
Returns true if this region equals another.
|
double |
getArea()
Returns the surface area for this penetration region.
|
java.util.LinkedHashSet<IntersectionContour> |
getContours()
Returns the contours which bound this region.
|
java.util.LinkedHashSet<HalfEdge> |
getInsideEdges()
Returns the edges of this region which are completely or partially
inside the intersecting mesh.
|
java.util.LinkedHashSet<Face> |
getInsideFaces()
Returns the faces of this region which are completely or partially
inside the intersecting mesh.
|
java.util.LinkedHashSet<Vertex3d> |
getInsideVertices()
Returns the vertices of this region which are inside the intersecting
mesh.
|
PolygonalMesh |
getMesh()
Returns the mesh associated with this region.
|
boolean |
hasClockwiseContours()
Indicates if the contours of this region are oriented clockwise
with respect to the region's mesh.
|
boolean |
isInsideEdge(HalfEdge he)
Returns
true if a specified edge is partly
or completely inside this region. |
boolean |
isInsideFace(Face face)
Returns
true if a specified face is partly
or completely inside this region. |
boolean |
isInsideVertex(Vertex3d vtx)
Returns
true if a specified vertex is an inside
vertex of this region. |
int |
numContours()
Returns the number of contours bounding this region.
|
int |
numInsideEdges()
Returns the number of inside edges in this region.
|
int |
numInsideFaces()
Returns the number of inside faces in this region.
|
int |
numInsideVertices()
Returns the number of inside vertices in this region.
|
java.lang.String |
toString(java.util.List<IntersectionContour> contours)
Returns a string representation of this region consisting
of the indices of the inside vertices and the indices of
the contours with respect to a reference list.
|
public PenetrationRegion(PolygonalMesh mesh, boolean clockwise)
mesh
- mesh to which the region belongsclockwise
- if true
, indicates that the
bounding contours for the region are oriented clockwise
with respect to the mesh.public java.util.LinkedHashSet<IntersectionContour> getContours()
public int numContours()
public java.util.LinkedHashSet<Vertex3d> getInsideVertices()
public int numInsideVertices()
public boolean isInsideVertex(Vertex3d vtx)
true
if a specified vertex is an inside
vertex of this region.vtx
- vertex to testtrue
if vtx
is insidepublic java.util.LinkedHashSet<Face> getInsideFaces()
public int numInsideFaces()
public boolean isInsideFace(Face face)
true
if a specified face is partly
or completely inside this region.face
- face to testtrue
if face
is partly or
completely insidepublic java.util.LinkedHashSet<HalfEdge> getInsideEdges()
he
is an inside edge,
he.opposite
will not be.public int numInsideEdges()
public boolean isInsideEdge(HalfEdge he)
true
if a specified edge is partly
or completely inside this region. The test will be made
using he.getPrimary()
, so that if he
is inside, then he.opposite
will also be inside.he
- edge to testtrue
if he
or he.opposite
is partly or completely insidepublic PolygonalMesh getMesh()
public boolean hasClockwiseContours()
true
if contours are oriented clockwisepublic boolean equals(PenetrationRegion region)
public java.lang.String toString(java.util.List<IntersectionContour> contours)
public double getArea()