RobWorkProject  23.9.11-
Public Types | Public Member Functions | Protected Member Functions | List of all members
DrawableGeometryNode Class Referenceabstract

A specific type of DrawableNode that is able to draw a rw::geometry::Geometry. More...

#include <DrawableGeometryNode.hpp>

Inherits DrawableNode.

Inherited by DrawableGeometry.

Public Types

typedef rw::core::Ptr< DrawableGeometryNodePtr
 Smart pointer type for DrawableGeometryNode.
 
- Public Types inherited from DrawableNode
enum  DrawableTypeMask {
  Physical = 1 , Virtual = 2 , DrawableObject = 4 , CollisionObject = 8 ,
  User1 = 1024 , User2 = 2048 , User3 = 4096 , User4 = 8096 ,
  ALL = 0x7FFFFFFF
}
 draw mask is used to filter which drawables to exclude from rendering. More...
 
enum  DrawType { SOLID , WIRE , OUTLINE }
 when calling render on the draw mode or type can be specified. More...
 
typedef rw::core::Ptr< DrawableNodePtr
 smart pointer type to this class
 
- Public Types inherited from SceneNode
enum  AddPolicy { Front , Back }
 Policy for adding parent nodes. More...
 
enum  NodeType { GroupType = 0 , CameraType , DrawableType , UserBeginType = 1024 }
 Node types. More...
 
typedef rw::core::Ptr< SceneNodePtr
 Smart pointer type for SceneNode.
 
typedef std::list< SceneNode::PtrNodeList
 Type for the list of nodes.
 
typedef const std::list< SceneNode::PtrNodeListConst
 Type for a const list of nodes.
 

Public Member Functions

virtual void setColor (double r, double g, double b, double alpha)=0
 sets the RGBA color of the geometry More...
 
virtual void setColor (const rw::math::Vector3D<> &rgb)=0
 sets the RGB color of the geometry More...
 
virtual void setAlpha (double alpha)=0
 sets the alpha value More...
 
virtual rw::math::Vector3D getColor ()=0
 get the RGB color More...
 
virtual double getAlpha ()=0
 get alpha value More...
 
virtual void addLines (const std::vector< rw::geometry::Line > &lines)=0
 add lines to this geometry More...
 
virtual void addLine (const rw::math::Vector3D<> &v1, const rw::math::Vector3D<> &v2)=0
 add a single line segment to this geometry render More...
 
virtual void addGeometry (rw::core::Ptr< class rw::geometry::Geometry > geom)=0
 add a geometry to this render More...
 
virtual void addFrameAxis (double size)=0
 add a frame axis to this geometry More...
 
- Public Member Functions inherited from DrawableNode
virtual ~DrawableNode ()
 Destructor.
 
virtual void draw (const DrawableNode::RenderInfo &info=RenderInfo()) const =0
 draws the object.
 
virtual void setHighlighted (bool b)=0
 enables or disables highlighting of the drawable class More...
 
virtual bool isHighlighted () const =0
 Returns whether the DrawableNode is highlighted. More...
 
virtual void setDrawType (DrawType drawType)=0
 Sets the DrawType. More...
 
virtual void setTransparency (float alpha)=0
 Sets up the color alpha value. More...
 
virtual float getTransparency ()=0
 Gets the color alpha value. More...
 
bool isTransparent ()
 Check if node is transparent. More...
 
virtual void setScale (float scale)=0
 Specifies the scale of the object. More...
 
virtual float getScale () const =0
 gets the scale of the object More...
 
virtual void setVisible (bool enable)=0
 enable or disable this drawable. When disabled the drawable will not render anything.
 
virtual bool isVisible ()=0
 checks if this drawable is enabled
 
virtual const rw::math::Transform3DgetTransform () const =0
 gets the transformation of the drawable object More...
 
virtual void setTransform (const rw::math::Transform3D<> &t3d)=0
 Sets the transformation of the drawable object. More...
 
virtual void setMask (unsigned int mask)=0
 the group(s) that this drawable belong to More...
 
virtual unsigned int getMask () const =0
 Get the DrawableTypeMask for the node. More...
 
DrawableNodeasDrawableNode ()
 Get a pointer to a DrawableNode, if this is a DrawableNode. More...
 
- Public Member Functions inherited from SceneNode
virtual ~SceneNode ()
 Destructor.
 
void addParent (SceneNode::Ptr node, AddPolicy policy=Back)
 Add a parent node. More...
 
bool hasParent (SceneNode::Ptr parent)
 Check if the given node is a parent node. More...
 
void removeParent (SceneNode::Ptr node)
 erases the parent from the parent list. More...
 
virtual GroupNodeasGroupNode ()
 Get a pointer to a GroupNode, if this is a GroupNode. More...
 
virtual SceneCameraasCameraNode ()
 Get a pointer to a CameraNode, if this is a CameraNode. More...
 
int getType ()
 Get the NodeType. More...
 
const std::string & getName ()
 Get the name of the node. More...
 
void setName (const std::string &name)
 Set the name of this node. More...
 

Protected Member Functions

 DrawableGeometryNode (const std::string &name)
 Construct new drawable geometry node. More...
 
- Protected Member Functions inherited from DrawableNode
 DrawableNode (const std::string &name)
 constructor
 
- Protected Member Functions inherited from SceneNode
 SceneNode (const std::string &name, int type)
 Construct new scene node. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from SceneNode
static void removeParent (SceneNode::Ptr node, SceneNode::Ptr parent)
 Remove a parent node. More...
 
- Public Attributes inherited from SceneNode
std::string _name
 The name of the node.
 
std::list< SceneNode::Ptr_parentNodes
 The list of parent nodes.
 
int _type
 The NodeType.
 

Detailed Description

A specific type of DrawableNode that is able to draw a rw::geometry::Geometry.

Constructor & Destructor Documentation

◆ DrawableGeometryNode()

DrawableGeometryNode ( const std::string &  name)
inlineprotected

Construct new drawable geometry node.

Parameters
name[in] name of the node.

Member Function Documentation

◆ addFrameAxis()

virtual void addFrameAxis ( double  size)
pure virtual

add a frame axis to this geometry

Parameters
size[in] length of the frame axis's

Implemented in DrawableGeometry.

◆ addGeometry()

virtual void addGeometry ( rw::core::Ptr< class rw::geometry::Geometry geom)
pure virtual

add a geometry to this render

Parameters
geom[in] a geometry that should be rendered

Implemented in DrawableGeometry.

◆ addLine()

virtual void addLine ( const rw::math::Vector3D<> &  v1,
const rw::math::Vector3D<> &  v2 
)
pure virtual

add a single line segment to this geometry render

Parameters
v1[in] line segment vertice 1
v2[in] line segment vertice 2

Implemented in DrawableGeometry.

◆ addLines()

virtual void addLines ( const std::vector< rw::geometry::Line > &  lines)
pure virtual

add lines to this geometry

Parameters
lines[in] list of line segments that should be added

Implemented in DrawableGeometry.

◆ getAlpha()

virtual double getAlpha ( )
pure virtual

get alpha value

Returns
alpha

Implemented in DrawableGeometry.

◆ getColor()

virtual rw::math::Vector3D getColor ( )
pure virtual

get the RGB color

Returns
RGB color

Implemented in DrawableGeometry.

◆ setAlpha()

virtual void setAlpha ( double  alpha)
pure virtual

sets the alpha value

Parameters
alpha[in] between [0;1], 0 is completely transparent

Implemented in DrawableGeometry.

◆ setColor() [1/2]

virtual void setColor ( const rw::math::Vector3D<> &  rgb)
pure virtual

sets the RGB color of the geometry

Parameters
rgb[in] red, green and blue must be between [0;1]

Implemented in DrawableGeometry.

◆ setColor() [2/2]

virtual void setColor ( double  r,
double  g,
double  b,
double  alpha 
)
pure virtual

sets the RGBA color of the geometry

Parameters
r[in] red [0;1]
g[in] green [0;1]
b[in] blue [0;1]
alpha[in] opasity value [0;1], 0 is completely transparent

Implemented in DrawableGeometry.


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