Package org.robwork.sdurw_proximity
Class CollisionToleranceStrategy
- java.lang.Object
-
- org.robwork.sdurw_proximity.ProximityStrategy
-
- org.robwork.sdurw_proximity.CollisionToleranceStrategy
-
public class CollisionToleranceStrategy extends ProximityStrategy
This is a collision strategy that detects collisions between objects
that are closer than a specified tolerance.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CollisionToleranceStrategy.CollisionToleranceStrategyFactory
A factory for a CollisionToleranceStrategy.-
Nested classes/interfaces inherited from class org.robwork.sdurw_proximity.ProximityStrategy
ProximityStrategy.ProximityStrategyFactory
-
-
Constructor Summary
Constructors Constructor Description CollisionToleranceStrategy(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
static long
getCPtr(CollisionToleranceStrategy obj)
boolean
isWithinDistance(FramePtr a, Transform3D wTa, FramePtr b, Transform3D wTb, double tolerance)
Checks to see if the geometry attached to two given frames \mathcal{F}_a
and
\mathcal{F}_b are closer than the specified tolerance.boolean
isWithinDistance(FramePtr a, Transform3D wTa, FramePtr b, Transform3D wTb, double distance, ProximityStrategyData data)
Checks to see if the geometry attached to two given frames \mathcal{F}_a
and
\mathcal{F}_b are closer than the specified tolerance.boolean
isWithinDistance(ProximityModelPtr a, Transform3D wTa, ProximityModelPtr b, Transform3D wTb, double tolerance, ProximityStrategyData data)
Checks to see if two proximity models \mathcal{F}_a and
\mathcal{F}_b are closer than the specified tolerance.-
Methods inherited from class org.robwork.sdurw_proximity.ProximityStrategy
addGeometry, addGeometry, addGeometry, addModel, addModel, addModel, addModel, clear, clearFrame, clearFrames, createModel, destroyModel, getCPtr, getGeometries, getGeometryIDs, getModel, hasModel, removeGeometry, useThreads
-
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(CollisionToleranceStrategy obj)
-
delete
public void delete()
- Overrides:
delete
in classProximityStrategy
-
isWithinDistance
public boolean isWithinDistance(FramePtr a, Transform3D wTa, FramePtr b, Transform3D wTb, double tolerance)
Checks to see if the geometry attached to two given frames \mathcal{F}_a
and
\mathcal{F}_b are closer than the specified tolerance.- Parameters:
a
- [in] \mathcal{F}_awTa
- [in] \robabx{w}{a}{\mathbf{T}}b
- [in] \mathcal{F}_bwTb
- [in] \robabx{w}{b}{\mathbf{T}}tolerance
- [in] frames with a distance in between them
that is less than tolerance are in collision
- Returns:
- true if \mathcal{F}_a and \mathcal{F}_b are
colliding, false otherwise.
-
isWithinDistance
public boolean isWithinDistance(FramePtr a, Transform3D wTa, FramePtr b, Transform3D wTb, double distance, ProximityStrategyData data)
Checks to see if the geometry attached to two given frames \mathcal{F}_a
and
\mathcal{F}_b are closer than the specified tolerance. Result is cached in data- Parameters:
a
- [in] \mathcal{F}_awTa
- [in] \robabx{w}{a}{\mathbf{T}}b
- [in] \mathcal{F}_bwTb
- [in] \robabx{w}{b}{\mathbf{T}}data
-distance
-
- Returns:
- true if \mathcal{F}_a and \mathcal{F}_b are
colliding, false otherwise.
-
isWithinDistance
public boolean isWithinDistance(ProximityModelPtr a, Transform3D wTa, ProximityModelPtr b, Transform3D wTb, double tolerance, ProximityStrategyData data)
Checks to see if two proximity models \mathcal{F}_a and
\mathcal{F}_b are closer than the specified tolerance. Result is cached in data- Parameters:
a
- [in] \mathcal{F}_awTa
- [in] \robabx{w}{a}{\mathbf{T}}b
- [in] \mathcal{F}_bwTb
- [in] \robabx{w}{b}{\mathbf{T}}tolerance
- [in] frames with a distance in between them
that is less than tolerance are in collisiondata
-
- Returns:
- true if \mathcal{F}_a and \mathcal{F}_b are
colliding, false otherwise.
-
-