|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vclip.DistanceReport
Used by vclip
to return distance information.
This information includes the closest point pair between the two
objects (obtained using
getClosestPair
).
It also includes, optionally, a list of close point pairs
whose distance is within a threshold prescribed by setMaxPairDistance
. Up to one such close
point pair may be generated for each pair of convex polyhedra
associated with the two objects.
Field Summary | |
static double |
DEFAULT_PROMOTION_TOL
|
Constructor Summary | |
DistanceReport()
Creates a DistanceReport which does not report close point pairs. |
|
DistanceReport(DistanceReport rep)
Creates a DistanceReport by copying an existing one. |
|
DistanceReport(int maxClosePairs)
Creates a DistanceReport with room for reporting a maximum number of close point pairs. |
Method Summary | |
void |
clear()
Clears the information in this report. |
ClosestPointPair[] |
getClosePairs()
Gets the close point pairs in this report. |
double |
getClosestDistance()
Gets the closest distance associated with this report. |
ClosestPointPair |
getClosestPair()
Gets the closest point pairs in this report. |
int |
getMaxClosePairs()
Returns the maximum number of close point pairs that can be reported by this report. |
double |
getMaxPairDistance()
Gets the maximum close point pair distance for this report. |
double |
getPromotionTolerance()
Returns the angular tolerance used to promote features. |
int |
numClosePairs()
Returns the number of close point pairs in this report. |
boolean |
promotionEnabled()
Queries whether or not feature promotion is enabled. |
void |
set(DistanceReport rep)
Sets this distance report to a copy of the supplied one. |
void |
setFeaturePromotion(boolean enable,
double angtol)
Enables or disables feature promotion. |
void |
setMaxClosePairs(int maxClosePairs)
Sets the maximum number of close point pairs that can be reported by this report. |
void |
setMaxPairDistance(double dist)
Sets the maximum close point pair distance for this report. |
void |
transformFirstPoints(javax.vecmath.Matrix4d T1R)
Transforms the first point, as well as the normals, of each point pair in this distance report into a new coordinate frame (typically that associated with the second points). |
void |
transformSecondPoints(javax.vecmath.Matrix4d T2R)
Transforms the second point of each point pair in this distance report into a new coordinate frame (typically that associated with the first points). |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final double DEFAULT_PROMOTION_TOL
Constructor Detail |
public DistanceReport(int maxClosePairs)
maxClosePairs
- maximum number of close point pairs
which can be reportedpublic DistanceReport()
public DistanceReport(DistanceReport rep)
rep
- distance report to copyMethod Detail |
public void set(DistanceReport rep)
rep
- distance report to copypublic void clear()
public int numClosePairs()
public int getMaxClosePairs()
public void setMaxClosePairs(int maxClosePairs)
maxClosePairs
- maximum number of close point pairspublic ClosestPointPair[] getClosePairs()
numClosePairs
will be valid.
numClosePairs()
public ClosestPointPair getClosestPair()
public void setMaxPairDistance(double dist)
getMaxClosePairs
.
dist
- maximum distance for reporting close
point pairs.getMaxPairDistance()
,
getMaxClosePairs()
public double getMaxPairDistance()
setMaxPairDistance(double)
public double getClosestDistance()
vclip
that created this report,
and a distance <= 0 indicates a collison.
public void transformFirstPoints(javax.vecmath.Matrix4d T1R)
T1R
- transformation into the new reference frame.public void transformSecondPoints(javax.vecmath.Matrix4d T2R)
T2R
- transformation into the new reference frame.public void setFeaturePromotion(boolean enable, double angtol)
setMaxPairDistance
are ``promoted'',
where possible, to the feature which has the highest
dimension. Faces have dimension 2, edges have dimenion 1,
and vertices have dimension 0. In the most extreme case,
a vertex-vertex contact could be promoted to a face-face
contact.
Feature promotion is determined by seeing whether
adjacent features of higher dimension are within
angtol
radians of being perpendicular to the
contact normal.
Feature promotion may cause more contact pairs to be generated. For example, an edge-face contact is generally associated with two contact pairs, associated with the endpoints of the projection of the edge onto the face. Likewise, a face-face contact will be associated with several contact pairs, each associated with a vertex of the polygon formed by projected one face onto the other.
The extra contact pairs generated by feature promotion
are simply added to the set of close point pairs
returned by getClosePairs
.
enable
- set true to enable feature promotionangtol
- angular tolerance (in radians). If negative,
then DEFAULT_PROMOTION_TOL
is usedpromotionEnabled()
,
getPromotionTolerance()
public boolean promotionEnabled()
setFeaturePromotion(boolean, double)
public double getPromotionTolerance()
setFeaturePromotion(boolean, double)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |