Package org.robwork.sdurw_proximity
Class CollisionDetectorCPtr
- java.lang.Object
-
- org.robwork.sdurw_proximity.CollisionDetectorCPtr
-
public class CollisionDetectorCPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description CollisionDetectorCPtr()
Default constructor yielding a NULL-pointer.CollisionDetectorCPtr(long cPtr, boolean cMemoryOwn)
CollisionDetectorCPtr(CollisionDetector ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CollisionDetector
__ref__()
Dereferencing operator.void
delete()
CollisionDetector
deref()
The pointer stored in the object.boolean
equals(CollisionDetector p)
CollisionStrategyPtr
getCollisionStrategy()
Get the narrow-phase collision strategy.double
getComputationTime()
Get the computation time used in the inCollision functions.static long
getCPtr(CollisionDetectorCPtr obj)
CollisionDetector
getDeref()
Member access operator.long
getNoOfCalls()
Get the number of times the inCollision functions have been called.ProximityFilterStrategyPtr
getProximityFilterStrategy()
The Proximity Filter strategy of the ProximityCalculator.CollisionStrategyPtr
getStrategy()
Get the ProximityStrategy.boolean
inCollision(State state)
Check the workcell for collisions.
boolean
inCollision(State state, CollisionDetector.CollisionDetectorQueryResult result)
Check the workcell for collisions.
boolean
inCollision(State state, CollisionDetector.CollisionDetectorQueryResult result, boolean stopAtFirstContact)
Check the workcell for collisions.
boolean
inCollision(State state, ProximityData data)
Check the workcell for collisions.boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownership
-
-
-
Constructor Detail
-
CollisionDetectorCPtr
public CollisionDetectorCPtr(long cPtr, boolean cMemoryOwn)
-
CollisionDetectorCPtr
public CollisionDetectorCPtr()
Default constructor yielding a NULL-pointer.
-
CollisionDetectorCPtr
public CollisionDetectorCPtr(CollisionDetector ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(CollisionDetectorCPtr obj)
-
delete
public void delete()
-
deref
public CollisionDetector deref()
The pointer stored in the object.
-
__ref__
public CollisionDetector __ref__()
Dereferencing operator.
-
getDeref
public CollisionDetector getDeref()
Member access operator.
-
equals
public boolean equals(CollisionDetector p)
-
isShared
public boolean isShared()
check if this Ptr has shared ownership or none
ownership- Returns:
- true if Ptr has shared ownership, false if it has no ownership.
-
isNull
public boolean isNull()
checks if the pointer is null- Returns:
- Returns true if the pointer is null
-
inCollision
public boolean inCollision(State state, CollisionDetector.CollisionDetectorQueryResult result, boolean stopAtFirstContact)
Check the workcell for collisions.
- Parameters:
state
- [in] The state for which to check for collisions.result
- [out] If non-NULL, the pairs of colliding frames are
inserted in result.stopAtFirstContact
- [in] If result is non-NULL and
stopAtFirstContact is true, then only the first colliding pair is
inserted in result. By default all colliding pairs are inserted.
- Returns:
- true if a collision is detected; false otherwise.
-
inCollision
public boolean inCollision(State state, CollisionDetector.CollisionDetectorQueryResult result)
Check the workcell for collisions.
- Parameters:
state
- [in] The state for which to check for collisions.result
- [out] If non-NULL, the pairs of colliding frames are
inserted in result.
- Returns:
- true if a collision is detected; false otherwise.
-
inCollision
public boolean inCollision(State state)
Check the workcell for collisions.
- Parameters:
state
- [in] The state for which to check for collisions.
- Returns:
- true if a collision is detected; false otherwise.
-
inCollision
public boolean inCollision(State state, ProximityData data)
Check the workcell for collisions.- Parameters:
state
- [in] The state for which to check for collisions.data
- [in/out] Defines parameters for the collision check, the results and also
enables caching inbetween calls to incollision- Returns:
- true if a collision is detected; false otherwise.
-
getCollisionStrategy
public CollisionStrategyPtr getCollisionStrategy()
Get the narrow-phase collision strategy.- Returns:
- the strategy if set, otherwise NULL.
-
getProximityFilterStrategy
public ProximityFilterStrategyPtr getProximityFilterStrategy()
The Proximity Filter strategy of the ProximityCalculator.
-
getStrategy
public CollisionStrategyPtr getStrategy()
Get the ProximityStrategy.- Returns:
- the strategy if set, otherwise NULL.
-
getComputationTime
public double getComputationTime()
Get the computation time used in the inCollision functions.- Returns:
- the total computation time.
-
getNoOfCalls
public long getNoOfCalls()
Get the number of times the inCollision functions have been called.- Returns:
- number of calls to inCollision functions.
-
-