RobWorkProject  23.9.11-
Public Types | Public Member Functions | List of all members
RenderForceTorque Class Reference

RenderForceTorque makes a visualization of forces and torques. More...

#include <RenderForceTorque.hpp>

Inherits Render.

Public Types

typedef rw::core::Ptr< RenderForceTorquePtr
 smart pointer type to this class
 
- Public Types inherited from Render
typedef rw::core::Ptr< RenderPtr
 smart pointer type to this class
 
typedef DrawableNode::DrawType DrawType
 when calling render on the draw mode or type can be specified. See DrawableNode::DrawType
 

Public Member Functions

 RenderForceTorque ()
 Constructs a RenderForceTorque.
 
virtual ~RenderForceTorque ()
 Destructor.
 
rw::math::Vector3D getForce () const
 Get the force currently set. More...
 
rw::math::Vector3D getTorque () const
 Get the torque currently set. More...
 
float getScaleForce () const
 Get the current scaling of the force vector in meters per Newton. More...
 
float getScaleTorque () const
 Get the current scaling of the torque vector in meters per Newton meter. More...
 
void setForce (rw::math::Vector3D<> force)
 Set the force. More...
 
void setTorque (rw::math::Vector3D<> torque)
 Set the torque. More...
 
void setScaleForce (float scale)
 Set the current scaling of the force vector in meters per Newton. More...
 
void setScaleTorque (float scale)
 Set the current scaling of the torque vector in meters per Newton meter. More...
 
void setScales (float scaleForce, float scaleTorque)
 Set the current scaling of the force and torque arrows in meters per unit. More...
 
rw::math::Vector3D< float > getColorForce () const
 Get the current color used for the force arrow. More...
 
rw::math::Vector3D< float > getColorTorque () const
 Get the current color used for the torque arrow. More...
 
void setColorForce (float r, float g, float b)
 Sets color of the force arrow. More...
 
void setColorTorque (float r, float g, float b)
 Sets color of the torque arrow. More...
 
void draw (const rw::graphics::DrawableNode::RenderInfo &info, rw::graphics::DrawableNode::DrawType type, double alpha) const
 
- Public Member Functions inherited from Render
virtual ~Render ()
 destructor
 

Additional Inherited Members

- Protected Member Functions inherited from Render
 Render ()
 Only instances of classes inheriting Render is allowed.
 

Detailed Description

RenderForceTorque makes a visualization of forces and torques.

Member Function Documentation

◆ draw()

void draw ( const rw::graphics::DrawableNode::RenderInfo info,
rw::graphics::DrawableNode::DrawType  type,
double  alpha 
) const
virtual

Parameters
info[in] state and rendering specific info
type[in] the drawtype which is being used
alpha[in] the alpha value to render with

Implements Render.

◆ getColorForce()

rw::math::Vector3D<float> getColorForce ( ) const

Get the current color used for the force arrow.

Returns
the color as (r,g,b) vector.

◆ getColorTorque()

rw::math::Vector3D<float> getColorTorque ( ) const

Get the current color used for the torque arrow.

Returns
the color as (r,g,b) vector.

◆ getForce()

rw::math::Vector3D getForce ( ) const

Get the force currently set.

Returns
the force.

◆ getScaleForce()

float getScaleForce ( ) const

Get the current scaling of the force vector in meters per Newton.

Returns
the scale factor

◆ getScaleTorque()

float getScaleTorque ( ) const

Get the current scaling of the torque vector in meters per Newton meter.

Returns
the scale factor

◆ getTorque()

rw::math::Vector3D getTorque ( ) const

Get the torque currently set.

Returns
the torque.

◆ setColorForce()

void setColorForce ( float  r,
float  g,
float  b 
)

Sets color of the force arrow.

Parameters
r[in] red color component
g[in] green color component
b[in] blue color component

◆ setColorTorque()

void setColorTorque ( float  r,
float  g,
float  b 
)

Sets color of the torque arrow.

Parameters
r[in] red color component
g[in] green color component
b[in] blue color component

◆ setForce()

void setForce ( rw::math::Vector3D<>  force)

Set the force.

Parameters
force[in] the force

◆ setScaleForce()

void setScaleForce ( float  scale)

Set the current scaling of the force vector in meters per Newton.

Parameters
scale[in] the scale factor

◆ setScales()

void setScales ( float  scaleForce,
float  scaleTorque 
)

Set the current scaling of the force and torque arrows in meters per unit.

Parameters
scaleForce[in] the scale factor for force
scaleTorque[in] the scale factor for torque

◆ setScaleTorque()

void setScaleTorque ( float  scale)

Set the current scaling of the torque vector in meters per Newton meter.

Parameters
scale[in] the scale factor

◆ setTorque()

void setTorque ( rw::math::Vector3D<>  torque)

Set the torque.

Parameters
torque[in] the torque

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