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

Render for linear and angular velocity. More...

#include <RenderVelocity.hpp>

Inherits Render.

Public Types

typedef rw::core::Ptr< RenderVelocityPtr
 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

 RenderVelocity ()
 Constructor.
 
virtual ~RenderVelocity ()
 Destructor.
 
void draw (const rw::graphics::DrawableNode::RenderInfo &info, rw::graphics::DrawableNode::DrawType type, double alpha) const
 
rw::math::VelocityScrew6D getVelocity () const
 Get the currently set velocity. More...
 
float getScaleLinear () const
 Get the current scaling of the linear velocity in meters per meter per second. More...
 
float getScaleAngular () const
 Get the angular scaling of the angular velocity in meters per radians per second. More...
 
void setVelocity (rw::math::VelocityScrew6D<> velocity)
 Set the velocity. More...
 
void setScaleLinear (float scale)
 Set the scaling of the linear velocity in meters per meter per second. More...
 
void setScaleAngular (float scale)
 Set the angular scaling of the angular velocity in meters per radians per second. More...
 
void setScales (float scaleLinear, float scaleAngular)
 Set the current scaling of the linar and angular velocity arrows. More...
 
rw::math::Vector3D< float > getColorLinear () const
 Get the current color used for the linear velocity arrow. More...
 
rw::math::Vector3D< float > getColorAngular () const
 Get the current color used for the angular velocity arrow. More...
 
void setColorLinear (float r, float g, float b)
 Sets color of the linear velocity arrow. More...
 
void setColorAngular (float r, float g, float b)
 Sets color of the angular velocity arrow. More...
 
void setResolution (unsigned int resolution)
 Set the resolution of the rendering. More...
 
- 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

Render for linear and angular velocity.

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.

◆ getColorAngular()

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

Get the current color used for the angular velocity arrow.

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

◆ getColorLinear()

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

Get the current color used for the linear velocity arrow.

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

◆ getScaleAngular()

float getScaleAngular ( ) const

Get the angular scaling of the angular velocity in meters per radians per second.

Returns
the scale factor.

◆ getScaleLinear()

float getScaleLinear ( ) const

Get the current scaling of the linear velocity in meters per meter per second.

Returns
the scale factor.

◆ getVelocity()

rw::math::VelocityScrew6D getVelocity ( ) const

Get the currently set velocity.

Returns
the velocity.

◆ setColorAngular()

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

Sets color of the angular velocity arrow.

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

◆ setColorLinear()

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

Sets color of the linear velocity arrow.

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

◆ setResolution()

void setResolution ( unsigned int  resolution)

Set the resolution of the rendering.

The round parts will be discretized in the given resolution. Default value is 32.

Parameters
resolution

◆ setScaleAngular()

void setScaleAngular ( float  scale)

Set the angular scaling of the angular velocity in meters per radians per second.

Parameters
scale[in] the scale factor.

◆ setScaleLinear()

void setScaleLinear ( float  scale)

Set the scaling of the linear velocity in meters per meter per second.

Parameters
scale[in] the scale factor.

◆ setScales()

void setScales ( float  scaleLinear,
float  scaleAngular 
)

Set the current scaling of the linar and angular velocity arrows.

Parameters
scaleLinear[in] the scale factor for linear velocity.
scaleAngular[in] the scale factor for angular velocity.

◆ setVelocity()

void setVelocity ( rw::math::VelocityScrew6D<>  velocity)

Set the velocity.

Parameters
velocity[in] the velocity.

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