RobWorkProject  23.9.11-
Static Public Member Functions | List of all members
BodyUtil Class Reference

Utility functions related to dynamic bodies. More...

#include <BodyUtil.hpp>

Static Public Member Functions

static rw::math::Transform3D placeBody (rwsim::dynamics::Body::Ptr body, rw::core::Ptr< rw::proximity::CollisionDetector > coldect, const rw::kinematics::State &state, const rw::math::Vector3D<> &dir=-rw::math::Vector3D<>::z())
 a utility function for calculating the transformation of a body if it is kinematically projected in the direction of dir. Where dir is described in world coordinates. More...
 
static Body::Ptr getParentBody (Body::Ptr child, rw::core::Ptr< DynamicWorkCell > dwc, const rw::kinematics::State &state)
 Find the parent body of a body. More...
 
static Body::Ptr getParentBody (rw::core::Ptr< rw::kinematics::Frame > child, rw::core::Ptr< DynamicWorkCell > dwc, const rw::kinematics::State &state)
 Find the parent body of a frame. More...
 

Detailed Description

Utility functions related to dynamic bodies.

Member Function Documentation

◆ getParentBody() [1/2]

static Body::Ptr getParentBody ( Body::Ptr  child,
rw::core::Ptr< DynamicWorkCell dwc,
const rw::kinematics::State state 
)
static

Find the parent body of a body.

Parameters
child[in] the child body.
dwc[in] the dynamic workcell.
state[in] the current state.
Returns
the parent body, or NULL if not found.

◆ getParentBody() [2/2]

static Body::Ptr getParentBody ( rw::core::Ptr< rw::kinematics::Frame child,
rw::core::Ptr< DynamicWorkCell dwc,
const rw::kinematics::State state 
)
static

Find the parent body of a frame.

Parameters
child[in] the child frame.
dwc[in] the dynamic workcell.
state[in] the current state.
Returns
the parent body, or NULL if not found.

◆ placeBody()

static rw::math::Transform3D placeBody ( rwsim::dynamics::Body::Ptr  body,
rw::core::Ptr< rw::proximity::CollisionDetector coldect,
const rw::kinematics::State state,
const rw::math::Vector3D<> &  dir = -rw::math::Vector3D<>::z() 
)
static

a utility function for calculating the transformation of a body if it is kinematically projected in the direction of dir. Where dir is described in world coordinates.

Parameters
body[in] the body to project.
coldect[in] collision detector to use for detection of contact.
state[in] the initial state.
dir[in] the direction to project.
Returns
the transform.

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