gepetto::viewer::Node Class Referenceabstract

Abstract base class of 3D objects in a scene. More...

#include <gepetto/viewer/node.h>

Inheritance diagram for gepetto::viewer::Node:
Collaboration diagram for gepetto::viewer::Node:

Public Member Functions

const ConfigurationgetGlobalTransform () const
 returns rotation and position of the node in word frame More...
 
std::string getID () const
 getID is a public method for getting the id_name of the Object More...
 
bool isDirty () const
 
void setDirty (bool dirty=true)
 Called when a property is modified. More...
 
void applyConfiguration (const osgVector3 &position, const osgQuat &quat)
 
void applyConfiguration (const Configuration &cfg)
 
void setStaticTransform (const osgVector3 &position, const osgQuat &quat)
 
osgQuat getStaticRotation () const
 
osgVector3 getStaticPosition () const
 
virtual void setVisibilityMode (const VisibilityMode &visibility_state)
 Virtual method for setting the visibility mode of the object : visible or not visible. More...
 
virtual const VisibilityModegetVisibilityMode () const
 
virtual void setLightingMode (const LightingMode &lighting_state)
 Virtual method for setting the lighting mode of the object : influence by light or not. More...
 
virtual LightingMode getLightingMode () const
 
virtual void setWireFrameMode (const WireFrameMode &wireframe_state)
 Virtual method for setting the wireframe mode of the object : visible or not. More...
 
virtual const WireFrameModegetWireFrameMode () const
 
void setScale (float scale)
 
void setScale (const osgVector3 &scale)
 
osgVector3 getScale () const
 
virtual void setColor (const osgVector4 &color)=0
 
virtual osg::ref_ptr< osg::Node > getOsgNode () const
 
virtual ::osg::GroupRefPtr asGroup () const
 Return the root node to include it in the scene. More...
 
virtual void addLandmark (const float &size)
 
bool hasLandmark () const
 
::osg::StateSetRefPtr getOrCreateRootStateSet ()
 
void deleteLandmark ()
 
bool getHighlightEnabled () const
 
void setHighlightEnabled (bool enabled)
 
void setHighlightState (unsigned int state)
 
const std::size_t & getHighlightState () const
 
virtual void setAlpha (const float &alpha)
 
virtual float getAlpha () const
 
void setTransparency (const float &transparency)
 
float getTransparency () const
 
virtual void traverse (NodeVisitor &visitor)
 
virtual ~Node ()
 
- Public Member Functions inherited from gepetto::viewer::Properties
Propertyproperty (const std::string &name) const
 
bool callVoidProperty (const std::string &name) const
 
template<typename T >
bool getProperty (const std::string &name, T &value) const
 
template<typename T >
bool setProperty (const std::string &name, const T &value)
 Set a property and set this object as dirty. More...
 
bool hasProperty (const std::string &name) const
 
const PropertyMap_tproperties () const
 
void addProperty (const PropertyPtr_t &prop)
 Add a property and take ownership. More...
 
void addProperty (const std::string &name, const PropertyPtr_t &prop)
 Add a property and take ownership. More...
 
void addProperty (Property *prop)
 Add a property and leave ownership. More...
 
void addProperty (const std::string &name, Property *prop)
 Add a property and leave ownership. More...
 
QWidget * guiEditor ()
 

Public Attributes

 SCENE_VIEWER_ACCEPT_VISITOR
 

Static Public Attributes

static const float TransparencyRenderingBinThreshold
 

Protected Member Functions

 Node (const std::string &name)
 Default constructor. More...
 
 Node (const Node &other)
 
::osg::GroupRefPtr asQueue () const
 Return the root node to include it in the scene. More...
 
void setID (const std::string &id_name)
 
void setTransparentRenderingBin (bool transparent=true, osg::StateSet *ss=NULL)
 

Protected Attributes

::osg::GeodeRefPtr landmark_geode_ptr_
 
::osg::GeodeRefPtr geode_ptr_
 
float alpha_
 
- Protected Attributes inherited from gepetto::viewer::Properties
PropertyMap_t properties_
 

Friends

struct NodeTest
 

Additional Inherited Members

- Public Types inherited from gepetto::viewer::Properties
typedef std::map< std::string, WrapperPropertyMap_t
 

Detailed Description

Abstract base class of 3D objects in a scene.

Constructor & Destructor Documentation

◆ Node() [1/2]

gepetto::viewer::Node::Node ( const std::string &  name)
protected

Default constructor.

◆ Node() [2/2]

gepetto::viewer::Node::Node ( const Node other)
protected

Copy constructor

◆ ~Node()

virtual gepetto::viewer::Node::~Node ( )
virtual

Member Function Documentation

◆ addLandmark()

virtual void gepetto::viewer::Node::addLandmark ( const float &  size)
virtual

◆ applyConfiguration() [1/2]

void gepetto::viewer::Node::applyConfiguration ( const osgVector3 position,
const osgQuat quat 
)
inline

Apply a new global configuration

◆ applyConfiguration() [2/2]

void gepetto::viewer::Node::applyConfiguration ( const Configuration cfg)
inline

Apply a new global configuration

◆ asGroup()

virtual ::osg::GroupRefPtr gepetto::viewer::Node::asGroup ( ) const
inline

Return the root node to include it in the scene.

◆ asQueue()

::osg::GroupRefPtr gepetto::viewer::Node::asQueue ( ) const
inlineprotected

Return the root node to include it in the scene.

◆ deleteLandmark()

void gepetto::viewer::Node::deleteLandmark ( )

◆ getAlpha()

virtual float gepetto::viewer::Node::getAlpha ( ) const
virtual

Reimplemented in gepetto::viewer::NodeDrawable.

◆ getGlobalTransform()

const Configuration& gepetto::viewer::Node::getGlobalTransform ( ) const

returns rotation and position of the node in word frame

◆ getHighlightEnabled()

bool gepetto::viewer::Node::getHighlightEnabled ( ) const
inline

◆ getHighlightState()

const std::size_t& gepetto::viewer::Node::getHighlightState ( ) const
inline

◆ getID()

std::string gepetto::viewer::Node::getID ( ) const
inline

getID is a public method for getting the id_name of the Object

◆ getLightingMode()

virtual LightingMode gepetto::viewer::Node::getLightingMode ( ) const
virtual

◆ getOrCreateRootStateSet()

::osg::StateSetRefPtr gepetto::viewer::Node::getOrCreateRootStateSet ( )
inline

◆ getOsgNode()

virtual osg::ref_ptr<osg::Node> gepetto::viewer::Node::getOsgNode ( ) const
virtual

◆ getScale()

osgVector3 gepetto::viewer::Node::getScale ( ) const
inline

Get scale

◆ getStaticPosition()

osgVector3 gepetto::viewer::Node::getStaticPosition ( ) const

Get Static position

◆ getStaticRotation()

osgQuat gepetto::viewer::Node::getStaticRotation ( ) const

Get Static rotation

◆ getTransparency()

float gepetto::viewer::Node::getTransparency ( ) const

◆ getVisibilityMode()

virtual const VisibilityMode& gepetto::viewer::Node::getVisibilityMode ( ) const
inlinevirtual

◆ getWireFrameMode()

virtual const WireFrameMode& gepetto::viewer::Node::getWireFrameMode ( ) const
inlinevirtual

◆ hasLandmark()

bool gepetto::viewer::Node::hasLandmark ( ) const

◆ isDirty()

bool gepetto::viewer::Node::isDirty ( ) const
inline

◆ setAlpha()

virtual void gepetto::viewer::Node::setAlpha ( const float &  alpha)
virtual

◆ setColor()

◆ setDirty()

void gepetto::viewer::Node::setDirty ( bool  dirty = true)
inlinevirtual

Called when a property is modified.

Implements gepetto::viewer::Properties.

◆ setHighlightEnabled()

void gepetto::viewer::Node::setHighlightEnabled ( bool  enabled)
inline

◆ setHighlightState()

void gepetto::viewer::Node::setHighlightState ( unsigned int  state)

◆ setID()

void gepetto::viewer::Node::setID ( const std::string &  id_name)
inlineprotected

◆ setLightingMode()

virtual void gepetto::viewer::Node::setLightingMode ( const LightingMode lighting_state)
virtual

Virtual method for setting the lighting mode of the object : influence by light or not.

Parameters
lightingmodestate

Reimplemented in gepetto::viewer::GroupNode, and gepetto::viewer::RoadmapViewer.

◆ setScale() [1/2]

void gepetto::viewer::Node::setScale ( float  scale)
inline

Set scale value of the OSG object

◆ setScale() [2/2]

void gepetto::viewer::Node::setScale ( const osgVector3 scale)
inline

Set scales value of the OSG object

◆ setStaticTransform()

void gepetto::viewer::Node::setStaticTransform ( const osgVector3 position,
const osgQuat quat 
)

Set Static transformation

◆ setTransparency()

void gepetto::viewer::Node::setTransparency ( const float &  transparency)

◆ setTransparentRenderingBin()

void gepetto::viewer::Node::setTransparentRenderingBin ( bool  transparent = true,
osg::StateSet *  ss = NULL 
)
protected

◆ setVisibilityMode()

virtual void gepetto::viewer::Node::setVisibilityMode ( const VisibilityMode visibility_state)
virtual

Virtual method for setting the visibility mode of the object : visible or not visible.

Parameters
visibilitymodestate

Reimplemented in gepetto::viewer::RoadmapViewer.

◆ setWireFrameMode()

virtual void gepetto::viewer::Node::setWireFrameMode ( const WireFrameMode wireframe_state)
virtual

Virtual method for setting the wireframe mode of the object : visible or not.

Parameters
wireframemodestate

Reimplemented in gepetto::viewer::GroupNode, and gepetto::viewer::RoadmapViewer.

◆ traverse()

virtual void gepetto::viewer::Node::traverse ( NodeVisitor visitor)
virtual

Reimplemented in gepetto::viewer::GroupNode.

Friends And Related Function Documentation

◆ NodeTest

friend struct NodeTest
friend

Member Data Documentation

◆ alpha_

float gepetto::viewer::Node::alpha_
protected

Alpha value

◆ geode_ptr_

::osg::GeodeRefPtr gepetto::viewer::Node::geode_ptr_
protected

Geode pointer for landmarks

◆ landmark_geode_ptr_

::osg::GeodeRefPtr gepetto::viewer::Node::landmark_geode_ptr_
protected

protected because it's used in LeafNodeCapsule

◆ SCENE_VIEWER_ACCEPT_VISITOR

gepetto::viewer::Node::SCENE_VIEWER_ACCEPT_VISITOR

◆ TransparencyRenderingBinThreshold

const float gepetto::viewer::Node::TransparencyRenderingBinThreshold
static

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