Package org.robwork.sdurw
Class QConstraintPtr
- java.lang.Object
-
- org.robwork.sdurw.QConstraintPtr
-
public class QConstraintPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description QConstraintPtr()
Default constructor yielding a NULL-pointer.QConstraintPtr(long cPtr, boolean cMemoryOwn)
QConstraintPtr(QConstraint 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 QConstraint
__ref__()
Dereferencing operator.QConstraintCPtr
asCPtr()
void
delete()
QConstraint
deref()
The pointer stored in the object.boolean
equals(QConstraint p)
static long
getCPtr(QConstraintPtr obj)
QConstraint
getDeref()
Member access operator.boolean
inCollision(Q q)
True if the work cell is considered to be in collision for the
device configuration q.boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershipQConstraintPtr
make(CollisionDetectorPtr detector, DeviceCPtr device, State state)
Map a collision detector to a configuration constraint.QConstraintPtr
make(StateConstraintPtr detector, DeviceCPtr device, State state)
Map a state constraint to a configuration constraint.QConstraintPtr
makeBounds(PairQ bounds)
Constraint for the bounds of the configuration space.
The configuration is considered to be in collision if it is outside
of the bounds given by bounds.QConstraintPtr
makeFixed(boolean value)
A fixed constraint.
The fixed constraint always returns value from inCollision().QConstraintPtr
makeMerged(QConstraintPtr ca, QConstraintPtr cb)
Combine a pair of configuration constraints into a single
configuration constraint.QConstraintPtr
makeMerged(QConstraintPtrVector constraints)
Combine a set of configuration constraints into a single
configuration constraint.QConstraintPtr
makeNormalized(QConstraintPtr constraint, PairQ bounds)
Map a configuration constraint for standard configurations
into a configuration constraint for normalized configurations.
Configuration values are mapped from the range [0, 1] into the
corresponding position in the box bounds.QConstraintPtr
makeNormalized(QConstraintPtr constraint, Device device)
Map a configuration constraint for standard configurations
into a configuration constraint for normalized configurations.
Configuration values are mapped from the range [0, 1] into the
corresponding position in the configuration space of device.QConstraintPtr
makeNormalized(QConstraintPtr constraint, QNormalizer normalizer)
Map a configuration constraint for standard configurations
into a configuration constraint for normalized configurations.
Configuration values are mapped from normalized configurations into
standard configurations using normalizer.void
setLog(LogPtr log)
Set the log to be used for writing debug info
void
update(State state)
Updates the constraint with a new state
The method might not have an effect on all constrainttypes.
-
-
-
Constructor Detail
-
QConstraintPtr
public QConstraintPtr(long cPtr, boolean cMemoryOwn)
-
QConstraintPtr
public QConstraintPtr()
Default constructor yielding a NULL-pointer.
-
QConstraintPtr
public QConstraintPtr(QConstraint ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(QConstraintPtr obj)
-
delete
public void delete()
-
deref
public QConstraint deref()
The pointer stored in the object.
-
__ref__
public QConstraint __ref__()
Dereferencing operator.
-
getDeref
public QConstraint getDeref()
Member access operator.
-
equals
public boolean equals(QConstraint 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
-
setLog
public void setLog(LogPtr log)
Set the log to be used for writing debug info
- Parameters:
log
- [in] Log to which debug information is to be written
-
update
public void update(State state)
Updates the constraint with a new state
The method might not have an effect on all constrainttypes.
-
inCollision
public boolean inCollision(Q q)
True if the work cell is considered to be in collision for the
device configuration q.
-
makeFixed
public QConstraintPtr makeFixed(boolean value)
A fixed constraint.
The fixed constraint always returns value from inCollision().
-
makeBounds
public QConstraintPtr makeBounds(PairQ bounds)
Constraint for the bounds of the configuration space.
The configuration is considered to be in collision if it is outside
of the bounds given by bounds.
-
make
public QConstraintPtr make(StateConstraintPtr detector, DeviceCPtr device, State state)
Map a state constraint to a configuration constraint.
-
make
public QConstraintPtr make(CollisionDetectorPtr detector, DeviceCPtr device, State state)
Map a collision detector to a configuration constraint.
-
makeMerged
public QConstraintPtr makeMerged(QConstraintPtrVector constraints)
Combine a set of configuration constraints into a single
configuration constraint.
-
makeMerged
public QConstraintPtr makeMerged(QConstraintPtr ca, QConstraintPtr cb)
Combine a pair of configuration constraints into a single
configuration constraint.
-
makeNormalized
public QConstraintPtr makeNormalized(QConstraintPtr constraint, PairQ bounds)
Map a configuration constraint for standard configurations
into a configuration constraint for normalized configurations.
Configuration values are mapped from the range [0, 1] into the
corresponding position in the box bounds.
-
makeNormalized
public QConstraintPtr makeNormalized(QConstraintPtr constraint, Device device)
Map a configuration constraint for standard configurations
into a configuration constraint for normalized configurations.
Configuration values are mapped from the range [0, 1] into the
corresponding position in the configuration space of device.
-
makeNormalized
public QConstraintPtr makeNormalized(QConstraintPtr constraint, QNormalizer normalizer)
Map a configuration constraint for standard configurations
into a configuration constraint for normalized configurations.
Configuration values are mapped from normalized configurations into
standard configurations using normalizer.
-
asCPtr
public QConstraintCPtr asCPtr()
-
-