Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
graphics::Node Class Referenceabstract

#include <gepetto/viewer/node.h>

Inheritance diagram for graphics::Node:
[legend]

Public Member Functions

std::pair< osgVector3, osgQuatgetGlobalTransform () 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...
 
void applyConfiguration (const osgVector3 &position, const osgQuat &quat)
 Apply a new global configuration. More...
 
void setStaticTransform (const osgVector3 &position, const osgQuat &quat)
 Set Static transformation. More...
 
osgQuat getStaticRotation () const
 Get Static rotation. More...
 
osgVector3 getStaticPosition () const
 Get Static position. More...
 
virtual void setVisibilityMode (const VisibilityMode &visibility_state)
 Virtual method for setting the visibility mode of the object : visible or not visible. More...
 
virtual VisibilityMode getVisibilityMode ()
 
virtual void setLightingMode (const LightingMode &lighting_state)
 Virtual method for setting the lighting mode of the object : influence by light or not. More...
 
virtual void setWireFrameMode (const WireFrameMode &wireframe_state)
 Virtual method for setting the wireframe mode of the object : visible or not. More...
 
virtual void setScale (float scale)
 Set scale value of the OSG object. More...
 
virtual void setScale (const osg::Vec3d &scale)
 Set scales value of the OSG object. More...
 
osgVector3 getScale () const
 Get scale. More...
 
virtual void setColor (const osgVector4 &color)=0
 Set the color of the object. More...
 
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)
 
::osg::StateSetRefPtr getOrCreateRootStateSet ()
 
void deleteLandmark ()
 
void setHighlightState (unsigned int state)
 
virtual void setAlpha (const float &alpha)
 
float getAlpha () const
 
virtual void traverse (NodeVisitor &visitor)
 
template<typename T >
bool getProperty (const std::string &name, T &value) const
 
template<typename T >
bool setProperty (const std::string &name, const T &value)
 
const PropertyMap_tproperties () const
 
virtual ~Node ()
 

Public Attributes

 SCENE_VIEWER_ACCEPT_VISITOR
 

Protected Member Functions

 Node (const std::string &name)
 Default constructor. More...
 
 Node (const Node &other)
 Copy constructor. More...
 
::osg::GroupRefPtr asQueue () const
 Return the root node to include it in the scene. More...
 
void setID (const std::string &id_name)
 
const PropertyPtr_t & property (const std::string &name) const
 
void addProperty (const PropertyPtr_t &prop)
 
void addProperty (const std::string &name, const PropertyPtr_t &prop)
 

Protected Attributes

::osg::GeodeRefPtr landmark_geode_ptr_
 protected because it's used in LeafNodeCapsule More...
 
::osg::GeodeRefPtr geode_ptr_
 Geode pointer for landmarks. More...
 
float alpha_
 Alpha value. More...
 

Constructor & Destructor Documentation

◆ Node() [1/2]

graphics::Node::Node ( const std::string &  name)
protected

Default constructor.

◆ Node() [2/2]

graphics::Node::Node ( const Node other)
protected

Copy constructor.

◆ ~Node()

virtual graphics::Node::~Node ( )
virtual

Referenced by properties().

Member Function Documentation

◆ addLandmark()

virtual void graphics::Node::addLandmark ( const float &  size)
virtual

Reimplemented in graphics::LeafNodeCapsule.

Referenced by asGroup().

◆ addProperty() [1/2]

void graphics::Node::addProperty ( const PropertyPtr_t &  prop)
protected

Referenced by setID().

◆ addProperty() [2/2]

void graphics::Node::addProperty ( const std::string &  name,
const PropertyPtr_t &  prop 
)
protected

◆ applyConfiguration()

void graphics::Node::applyConfiguration ( const osgVector3 position,
const osgQuat quat 
)

Apply a new global configuration.

Referenced by getID().

◆ asGroup()

virtual ::osg::GroupRefPtr graphics::Node::asGroup ( ) const
inline

Return the root node to include it in the scene.

References addLandmark().

◆ asQueue()

::osg::GroupRefPtr graphics::Node::asQueue ( ) const
inlineprotected

Return the root node to include it in the scene.

◆ deleteLandmark()

void graphics::Node::deleteLandmark ( )

Referenced by getOrCreateRootStateSet().

◆ getAlpha()

float graphics::Node::getAlpha ( ) const

Referenced by getOrCreateRootStateSet().

◆ getGlobalTransform()

std::pair<osgVector3, osgQuat> graphics::Node::getGlobalTransform ( ) const

returns rotation and position of the node in word frame

Referenced by setID().

◆ getID()

std::string graphics::Node::getID ( ) const
inline

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

References applyConfiguration(), getStaticPosition(), getStaticRotation(), setStaticTransform(), and setVisibilityMode().

◆ getOrCreateRootStateSet()

::osg::StateSetRefPtr graphics::Node::getOrCreateRootStateSet ( )
inline

◆ getOsgNode()

virtual osg::ref_ptr<osg::Node> graphics::Node::getOsgNode ( ) const
virtual

◆ getProperty()

template<typename T >
bool graphics::Node::getProperty ( const std::string &  name,
T &  value 
) const
inline

References property().

◆ getScale()

osgVector3 graphics::Node::getScale ( ) const

Get scale.

Referenced by getVisibilityMode().

◆ getStaticPosition()

osgVector3 graphics::Node::getStaticPosition ( ) const

Get Static position.

Referenced by getID().

◆ getStaticRotation()

osgQuat graphics::Node::getStaticRotation ( ) const

Get Static rotation.

Referenced by getID().

◆ getVisibilityMode()

virtual VisibilityMode graphics::Node::getVisibilityMode ( )
inlinevirtual

◆ properties()

const PropertyMap_t& graphics::Node::properties ( ) const
inline

References ~Node().

◆ property()

const PropertyPtr_t& graphics::Node::property ( const std::string &  name) const
protected

Referenced by getProperty(), setID(), and setProperty().

◆ setAlpha()

virtual void graphics::Node::setAlpha ( const float &  alpha)
virtual

◆ setColor()

virtual void graphics::Node::setColor ( const osgVector4 color)
pure virtual

◆ setHighlightState()

void graphics::Node::setHighlightState ( unsigned int  state)

Referenced by getOrCreateRootStateSet().

◆ setID()

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

◆ setLightingMode()

virtual void graphics::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 graphics::GroupNode, and graphics::RoadmapViewer.

Referenced by getVisibilityMode().

◆ setProperty()

template<typename T >
bool graphics::Node::setProperty ( const std::string &  name,
const T &  value 
)
inline

References property().

◆ setScale() [1/2]

virtual void graphics::Node::setScale ( float  scale)
virtual

Set scale value of the OSG object.

Reimplemented in graphics::GroupNode.

Referenced by getVisibilityMode().

◆ setScale() [2/2]

virtual void graphics::Node::setScale ( const osg::Vec3d &  scale)
virtual

Set scales value of the OSG object.

◆ setStaticTransform()

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

Set Static transformation.

Referenced by getID().

◆ setVisibilityMode()

virtual void graphics::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 graphics::GroupNode, and graphics::RoadmapViewer.

Referenced by getID().

◆ setWireFrameMode()

virtual void graphics::Node::setWireFrameMode ( const WireFrameMode wireframe_state)
virtual

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

Parameters
wireframemodestate

Reimplemented in graphics::GroupNode, and graphics::RoadmapViewer.

Referenced by getVisibilityMode().

◆ traverse()

virtual void graphics::Node::traverse ( NodeVisitor visitor)
virtual

Reimplemented in graphics::GroupNode.

Member Data Documentation

◆ alpha_

float graphics::Node::alpha_
protected

Alpha value.

◆ geode_ptr_

::osg::GeodeRefPtr graphics::Node::geode_ptr_
protected

Geode pointer for landmarks.

◆ landmark_geode_ptr_

::osg::GeodeRefPtr graphics::Node::landmark_geode_ptr_
protected

protected because it's used in LeafNodeCapsule

◆ SCENE_VIEWER_ACCEPT_VISITOR

graphics::Node::SCENE_VIEWER_ACCEPT_VISITOR