Package org.robwork.sdurwsim
Class RigidDevicePtr
- java.lang.Object
-
- org.robwork.sdurwsim.RigidDevicePtr
-
public class RigidDevicePtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description RigidDevicePtr()
Default constructor yielding a NULL-pointer.RigidDevicePtr(long cPtr, boolean cMemoryOwn)
RigidDevicePtr(RigidDevice 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 RigidDevice
__ref__()
Dereferencing operator.void
delete()
RigidDevice
deref()
The pointer stored in the object.boolean
equals(RigidDevice p)
BodyPtr
getBase()
static long
getCPtr(RigidDevicePtr obj)
RigidDevice
getDeref()
Member access operator.JointDevicePtr
getJointDevice()
Q
getJointVelocities(State state)
double
getJointVelocity(int i, State state)
DevicePtr
getKinematicModel()
BodyPtrVector
getLinks()
Q
getMotorForceLimits()
RigidDevice.MotorControlMode
getMotorMode(int i, State state)
double
getMotorTarget(int i, State state)
Q
getMotorTargets(State state)
Q
getQ(State state)
boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershipvoid
setJointVelocities(Q q, State state)
void
setJointVelocity(double vel, int i, State state)
void
setMotorForceLimits(Q force)
void
setMotorForceTarget(double force, int i, State state)
void
setMotorForceTargets(Q force, State state)
void
setMotorTarget(double q, int i, State state)
void
setMotorTargets(Q q, State state)
void
setMotorVelocityTarget(double vel, int i, State state)
void
setMotorVelocityTargets(Q vel, State state)
void
setQ(Q q, State state)
-
-
-
Constructor Detail
-
RigidDevicePtr
public RigidDevicePtr(long cPtr, boolean cMemoryOwn)
-
RigidDevicePtr
public RigidDevicePtr()
Default constructor yielding a NULL-pointer.
-
RigidDevicePtr
public RigidDevicePtr(RigidDevice ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(RigidDevicePtr obj)
-
delete
public void delete()
-
deref
public RigidDevice deref()
The pointer stored in the object.
-
__ref__
public RigidDevice __ref__()
Dereferencing operator.
-
getDeref
public RigidDevice getDeref()
Member access operator.
-
equals
public boolean equals(RigidDevice 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
-
setMotorForceLimits
public void setMotorForceLimits(Q force)
-
getMotorForceLimits
public Q getMotorForceLimits()
-
getJointVelocity
public double getJointVelocity(int i, State state)
-
setJointVelocity
public void setJointVelocity(double vel, int i, State state)
-
getMotorMode
public RigidDevice.MotorControlMode getMotorMode(int i, State state)
-
getMotorTarget
public double getMotorTarget(int i, State state)
-
setMotorTarget
public void setMotorTarget(double q, int i, State state)
-
setMotorForceTarget
public void setMotorForceTarget(double force, int i, State state)
-
setMotorVelocityTarget
public void setMotorVelocityTarget(double vel, int i, State state)
-
getJointDevice
public JointDevicePtr getJointDevice()
-
getLinks
public BodyPtrVector getLinks()
-
getKinematicModel
public DevicePtr getKinematicModel()
-
getBase
public BodyPtr getBase()
-
-