Package org.robwork.sdurw_kinematics
Class FrameCPtr
- java.lang.Object
- 
- org.robwork.sdurw_kinematics.FrameCPtr
 
- 
 public class FrameCPtr extends java.lang.ObjectPtr stores a pointer and optionally takes ownership of the value.
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Frame__ref__()Dereferencing operator.voiddelete()Framederef()The pointer stored in the object.booleanequals(Frame p)Transform3DfTf(FrameCPtr to, State state)Get the transform of other frame relative to this frame.StateCachePtrgetCache(State state)Get the cache.static longgetCPtr(FrameCPtr obj)FramegetDeref()Member access operator.intgetDOF()The number of degrees of freedom (dof) of the frame.
 
 The dof is the number of joint values that are used for controlling
 the frame.
 
 Given a set joint values of type State, the getDof() number of joint
 values for the frame can be read and written with State::getQ() and
 State::setQ().
 intgetID()An integer ID for the StateData.
 
 IDs are assigned to the state data upon insertion State.
 StateData that are not in a State have an ID of -1.
 
 StateData present in different trees may have identical IDs.
 
 IDs are used for the efficient implementation of State.java.lang.StringgetName()The name of the state data.
 Transform3DgetTransform(State state)The transform of the frame relative to its parent.
 
 The transform is calculated for the joint values of state.
 
 The exact implementation of getTransform() depends on the type of
 frame.booleanhasCache()Check is state data includes a cache.booleanisNull()checks if the pointer is nullbooleanisShared()check if this Ptr has shared ownership or none
 ownershipvoidmultiplyTransform(Transform3D parent, State state, Transform3D result)Post-multiply the transform of the frame to the parent transform.
 
 The transform is calculated for the joint values of state.
 
 The exact implementation of getTransform() depends on the type of
 frame.voidsetData(State state, double val)Assign for state data the size() of values of the array
 vals.
 
 The array vals must be of length at least size().
 voidsetData(State state, vector_d vals)Assign for state data the size() of values of the array
 vals.
 
 The array vals must be of length at least size().
 intsize()The number of doubles allocated by this StateData in
 each State object.
 Transform3DwTf(State state)Get the transform relative to world.
 
- 
- 
- 
Constructor Detail- 
FrameCPtrpublic FrameCPtr(long cPtr, boolean cMemoryOwn)
 - 
FrameCPtrpublic FrameCPtr() Default constructor yielding a NULL-pointer.
 - 
FrameCPtrpublic FrameCPtr(Frame ptr) Do not take ownership of ptr.
 
 ptr can be null.
 
 The constructor is implicit on purpose.
 
- 
 - 
Method Detail- 
getCPtrpublic static long getCPtr(FrameCPtr obj) 
 - 
deletepublic void delete() 
 - 
derefpublic Frame deref() The pointer stored in the object.
 - 
__ref__public Frame __ref__() Dereferencing operator.
 - 
getDerefpublic Frame getDeref() Member access operator.
 - 
equalspublic boolean equals(Frame p) 
 - 
isSharedpublic 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.
 
 - 
isNullpublic boolean isNull() checks if the pointer is null- Returns:
- Returns true if the pointer is null
 
 - 
multiplyTransformpublic void multiplyTransform(Transform3D parent, State state, Transform3D result) Post-multiply the transform of the frame to the parent transform.
 
 The transform is calculated for the joint values of state.
 
 The exact implementation of getTransform() depends on the type of
 frame. See for example RevoluteJoint and PrismaticJoint.
 - Parameters:
- parent- [in] The world transform of the parent frame.
- state- [in] Joint values for the forward kinematics tree.
- result- [in] The transform of the frame in the world frame.
 
 - 
getTransformpublic Transform3D getTransform(State state) The transform of the frame relative to its parent.
 
 The transform is calculated for the joint values of state.
 
 The exact implementation of getTransform() depends on the type of
 frame. See for example RevoluteJoint and PrismaticJoint.
 - Parameters:
- state- [in] Joint values for the forward kinematics tree.
 
- Returns:
- The transform of the frame relative to its parent.
 
 - 
getDOFpublic int getDOF() The number of degrees of freedom (dof) of the frame.
 
 The dof is the number of joint values that are used for controlling
 the frame.
 
 Given a set joint values of type State, the getDof() number of joint
 values for the frame can be read and written with State::getQ() and
 State::setQ().
 - Returns:
- The number of degrees of freedom of the frame.
 
 - 
wTfpublic Transform3D wTf(State state) Get the transform relative to world.- Parameters:
- state- [in] the state.
- Returns:
- transform relative to world.
 
 - 
fTfpublic Transform3D fTf(FrameCPtr to, State state) Get the transform of other frame relative to this frame.- Parameters:
- to- [in] the other frame
- state- [in] the state.
- Returns:
- transform of frame to relative to this frame.
 
 - 
getIDpublic int getID() An integer ID for the StateData.
 
 IDs are assigned to the state data upon insertion State.
 StateData that are not in a State have an ID of -1.
 
 StateData present in different trees may have identical IDs.
 
 IDs are used for the efficient implementation of State. Normally,
 you should not make use of StateData IDs yourself.
 - Returns:
- An integer ID for the frame.
 
 - 
getNamepublic java.lang.String getName() The name of the state data.
 - Returns:
- The name of the state data.
 
 - 
sizepublic int size() The number of doubles allocated by this StateData in
 each State object.
 - Returns:
- The number of doubles allocated by the StateData
 
 - 
setDatapublic void setData(State state, vector_d vals) Assign for state data the size() of values of the array
 vals.
 
 The array vals must be of length at least size().
 - Parameters:
- state- [inout] The state to which vals are written.
 
- vals- [in] The joint values to assign.
 
 setData() and getData() are related as follows:
 - data.setData(state, q_in); const double* q_out = data.getData(state); for (int i = 0; i < data.getDOF(); i++) q_in[i] == q_out[i];
 
 - 
setDatapublic void setData(State state, double val) Assign for state data the size() of values of the array
 vals.
 
 The array vals must be of length at least size().
 - Parameters:
- state- [inout] The state to which vals are written.
 
 
 
 setData() and getData() are related as follows:
 - data.setData(state, q_in); const double* q_out = data.getData(state); for (int i = 0; i < data.getDOF(); i++) q_in[i] == q_out[i];
 
 - 
hasCachepublic boolean hasCache() Check is state data includes a cache.- Returns:
- true if cache, false otherwise.
 
 - 
getCachepublic StateCachePtr getCache(State state) Get the cache.- Parameters:
- state- [in] the state.
- Returns:
- the cache.
 
 
- 
 
-