RobWorkProject  24.5.15-
Public Types | Public Member Functions | List of all members
MovableFrame Class Reference

MovableFrame is a frame for which it is possible to freely change the transform relative to the parent. More...

#include <MovableFrame.hpp>

Inherits Frame.

Public Types

typedef rw::core::Ptr< MovableFramePtr
 smart pointer type to this class
 
typedef rw::core::Ptr< const MovableFrameCPtr
 Smart pointer type for a constant MovableFrame object.
 
- Public Types inherited from Frame
typedef rw::core::Ptr< FramePtr
 Smart pointer type for a Frame object.
 
typedef rw::core::Ptr< const FrameCPtr
 Smart pointer type for a constant Frame object.
 
typedef rw::common::ConcatVectorIterator< Frameiterator
 Forward iterator for frames.
 
typedef rw::common::ConstConcatVectorIterator< Frameconst_iterator
 Forward iterator for const frames.
 
typedef rw::core::iter_pair< iteratoriterator_pair
 Pair of iterators.
 
typedef rw::core::iter_pair< const_iteratorconst_iterator_pair
 Pair of const iterators.
 

Public Member Functions

 MovableFrame (const std::string &name)
 Construct a MovableFrame with Identiy as the initial transform. More...
 
virtual ~MovableFrame ()
 destructor
 
void setTransform (const math::Transform3D<> &transform, rw::kinematics::State &state) const
 Sets the transform in the state. The transform is relative to the MovableFrame's parent frame. More...
 
void moveTo (const math::Transform3D<> &transform, rw::kinematics::State &state)
 Changes the transform in the state, such that the movable frame is located in the transform which is described relative to world. More...
 
void moveTo (const math::Transform3D<> &transform, rw::core::Ptr< Frame > refframe, rw::kinematics::State &state)
 Changes the transform in the state, such that the movable frame is located in the transform which is described relative to refframe. More...
 
- Public Member Functions inherited from Frame
virtual ~Frame ()
 Destructor for the frame.
 
void multiplyTransform (const rw::math::Transform3D<> &parent, const rw::kinematics::State &state, rw::math::Transform3D<> &result) const
 Post-multiply the transform of the frame to the parent transform. More...
 
rw::math::Transform3D getTransform (const rw::kinematics::State &state) const
 The transform of the frame relative to its parent. More...
 
const rw::core::PropertyMapgetPropertyMap () const
 Miscellaneous properties of the frame. More...
 
rw::core::PropertyMapgetPropertyMap ()
 Miscellaneous properties of the frame. More...
 
int getDOF () const
 The number of degrees of freedom (dof) of the frame. More...
 
const rw::kinematics::FramegetParent () const
 The parent of the frame or NULL if the frame is a DAF.
 
rw::kinematics::FramegetParent ()
 The parent of the frame or NULL if the frame is a DAF.
 
rw::kinematics::FramegetParent (const rw::kinematics::State &state)
 Returns the parent of the frame. More...
 
const rw::kinematics::FramegetParent (const rw::kinematics::State &state) const
 Returns the parent of the frame. More...
 
const rw::kinematics::FramegetDafParent (const rw::kinematics::State &state) const
 The dynamically attached parent or NULL if the frame is not a DAF.
 
rw::kinematics::FramegetDafParent (const rw::kinematics::State &state)
 The dynamically attached parent or NULL if the frame is not a DAF. More...
 
const_iterator_pair getChildren () const
 Iterator pair for the fixed children of the frame.
 
iterator_pair getChildren ()
 Iterator pair for the fixed children of the frame. More...
 
const_iterator_pair getChildren (const rw::kinematics::State &state) const
 Iterator pair for all children of the frame.
 
iterator_pair getChildren (const rw::kinematics::State &state)
 Iterator pair for all children of the frame.
 
std::vector< Frame::PtrgetChildrenList (const rw::kinematics::State &state)
 get a list of all frame children More...
 
const_iterator_pair getDafChildren (const rw::kinematics::State &state) const
 Iterator pair for the dynamically attached children of the frame.
 
iterator_pair getDafChildren (const rw::kinematics::State &state)
 Iterator pair for the dynamically attached children of the frame. More...
 
void attachTo (const Ptr &parent, rw::kinematics::State &state)
 Move a frame within the tree. More...
 
bool isDAF ()
 Test if this frame is a Dynamically Attachable Frame. More...
 
rw::math::Transform3D wTf (const rw::kinematics::State &state) const
 Get the transform relative to world. More...
 
rw::math::Transform3D fTf (const CPtr &to, const rw::kinematics::State &state) const
 Get the transform of other frame relative to this frame. More...
 
bool operator== (const Frame &rhs)
 Compares the Frame to see if they are the same Checks the statedata, parent frame and chld frame. More...
 
bool operator!= (const Frame &rhs)
 Check if not equal. More...
 
- Public Member Functions inherited from StateData
virtual ~StateData ()
 destructor
 
int getID () const
 An integer ID for the StateData. More...
 
const std::string & getName () const
 The name of the state data. More...
 
int size () const
 The number of doubles allocated by this StateData in each State object. More...
 
const double * getData (const rw::kinematics::State &state) const
 An array of length size() containing the values for the state data. More...
 
double * getData (rw::kinematics::State &state)
 An array of length size() containing the values for the state data. More...
 
void setData (rw::kinematics::State &state, const double *vals) const
 Assign for state data the size() of values of the array vals. More...
 
void setData (rw::kinematics::State &state, const std::vector< double > &vals) const
 Assign for state data the size() of values of the array vals. More...
 
void setData (rw::kinematics::State &state, const double &val) const
 Assign for state data the size() of values of the array vals. More...
 
bool hasCache () const
 Check is state data includes a cache. More...
 
rw::core::Ptr< rw::kinematics::StateCachegetCache (const rw::kinematics::State &state) const
 Get the cache. More...
 
rw::core::Ptr< rw::kinematics::StateCachegetCache (rw::kinematics::State &state)
 Get the cache. . More...
 
rw::core::Ptr< rw::kinematics::StateCachegetDefaultCache ()
 Get default cache. More...
 
void setCache (rw::core::Ptr< rw::kinematics::StateCache > cache, rw::kinematics::State &state)
 Set the cache values. More...
 
class rw::kinematics::StateStructuregetStateStructure ()
 Get the state structure. More...
 
bool operator== (const StateData &rhs)
 Compares the state data to see if they are the same Checks the ID, name and which statetrucure they belong to. More...
 
bool operator!= (const StateData &rhs)
 Check if not equal. More...
 
 StateData (int size, const std::string &name)
 A state with size number of doubles in the State vector. More...
 
 StateData (int size, const std::string &name, rw::core::Ptr< rw::kinematics::StateCache > cache)
 A state with size number of doubles in the State vector. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Frame
 Frame (int dof, const std::string &name)
 A frame with dof number of degrees of freedom. More...
 

Detailed Description

MovableFrame is a frame for which it is possible to freely change the transform relative to the parent.

A MovableFrame can for example be used for modelling objects moving in the scene based on e.g. user input.

Constructor & Destructor Documentation

◆ MovableFrame()

MovableFrame ( const std::string &  name)
explicit

Construct a MovableFrame with Identiy as the initial transform.

Parameters
name[in] name of the frame

Member Function Documentation

◆ moveTo() [1/2]

void moveTo ( const math::Transform3D<> &  transform,
rw::core::Ptr< Frame refframe,
rw::kinematics::State state 
)

Changes the transform in the state, such that the movable frame is located in the transform which is described relative to refframe.

Parameters
transform[in] transform to set. transform is described relative to refframe
refframe[in] the reference frame.
state[out] state into which to set the transform

◆ moveTo() [2/2]

void moveTo ( const math::Transform3D<> &  transform,
rw::kinematics::State state 
)

Changes the transform in the state, such that the movable frame is located in the transform which is described relative to world.

Parameters
transform[in] transform to set. transform is described relative to world frame
state[out] state into which to set the transform

◆ setTransform()

void setTransform ( const math::Transform3D<> &  transform,
rw::kinematics::State state 
) const

Sets the transform in the state. The transform is relative to the MovableFrame's parent frame.

Parameters
transform[in] transform to set. the transform is described relative to parent frame
state[out] state into which to set the transform

The documentation for this class was generated from the following file: