Package org.robwork.sdurw_kinematics
Class QStatePtr
- java.lang.Object
-
- org.robwork.sdurw_kinematics.QStatePtr
-
public class QStatePtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description QState
__ref__()
Dereferencing operator.QState
add(QState b)
Addition of configuration states.QState
assign(QState rhs)
Assignment operator.QStateCPtr
cptr()
void
delete()
QState
deref()
The pointer stored in the object.QState
divide(double scale)
Scaling of a configuration state by divisionboolean
equals(QState p)
double
get(long i)
static long
getCPtr(QStatePtr obj)
QState
getDeref()
Member access operator.StateSetupPtr
getStateSetup()
returns the StateSetupboolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershipQState
multiply(double scale)
Scaling of a configuration state by a scalar.QState
negate()
Unary minus operator.void
set(long i, double d)
long
size()
The dimension of the state vector.QState
subtract(QState b)
Subtraction of configuration states.java.lang.String
toString()
-
-
-
Constructor Detail
-
QStatePtr
public QStatePtr(long cPtr, boolean cMemoryOwn)
-
QStatePtr
public QStatePtr()
Default constructor yielding a NULL-pointer.
-
QStatePtr
public QStatePtr(QState ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(QStatePtr obj)
-
delete
public void delete()
-
deref
public QState deref()
The pointer stored in the object.
-
__ref__
public QState __ref__()
Dereferencing operator.
-
getDeref
public QState getDeref()
Member access operator.
-
equals
public boolean equals(QState 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
-
cptr
public QStateCPtr cptr()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
multiply
public QState multiply(double scale)
Scaling of a configuration state by a scalar.
-
divide
public QState divide(double scale)
Scaling of a configuration state by division
-
negate
public QState negate()
Unary minus operator.
-
getStateSetup
public StateSetupPtr getStateSetup()
returns the StateSetup
-
assign
public QState assign(QState rhs)
Assignment operator.- Parameters:
rhs
- [in] the other QState to assign to this.- Returns:
- a reference to this QState.
-
size
public long size()
The dimension of the state vector.
-
get
public double get(long i)
-
set
public void set(long i, double d)
-
-