Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
graphics::GroupNode Class Reference

#include <gepetto/viewer/group-node.h>

Inheritance diagram for graphics::GroupNode:
[legend]
Collaboration diagram for graphics::GroupNode:
[legend]

Public Member Functions

virtual GroupNodePtr_t clone (void) const
 Proceed to a clonage of the current object defined by the copy constructor. More...
 
GroupNodePtr_t self (void) const
 Return a shared pointer of the current object. More...
 
virtual bool addChild (::graphics::NodePtr_t child_ptr)
 Add a GraphicalObject to the list. More...
 
virtual bool removeChild (::graphics::NodePtr_t child_ptr)
 Remove a GraphicalObject from the list. More...
 
virtual bool hasChild (::graphics::NodePtr_t child_ptr)
 Return true if this group contains this child. More...
 
virtual void removeAllChildren ()
 Remove all children. More...
 
virtual size_t getNumOfChildren () const
 
virtual graphics::NodePtr_t getChild (size_t i) const
 
virtual void setVisibilityMode (const VisibilityMode &visibility_state)
 Virtual method for setting the visibility mode of the object : visible or not visible. More...
 
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 setAlpha (const float &alpha)
 Replace the old transparency value with alpha Note : alpha must be in [0,1]. More...
 
virtual void setScale (const float scale)
 Apply the scale value of all children note : scale value must be positive. More...
 
void setColor (const osgVector4 &color)
 Set the color of the object. More...
 
void traverse (NodeVisitor &visitor)
 
virtual osg::ref_ptr< osg::Node > getOsgNode () const
 
virtual ~GroupNode ()
 
- Public Member Functions inherited from graphics::Node
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 const VisibilityModegetVisibilityMode () const
 
virtual LightingMode getLightingMode () const
 
virtual const WireFrameModegetWireFrameMode () const
 
virtual void setScale (const osg::Vec3d &scale)
 Set scales value of the OSG object. More...
 
osgVector3 getScale () const
 Get scale. More...
 
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 ()
 
void setHighlightState (unsigned int state)
 
virtual float getAlpha () 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)
 
bool hasProperty (const std::string &name) const
 
const PropertyMap_tproperties () const
 
void addProperty (const PropertyPtr_t &prop)
 
void addProperty (const std::string &name, const PropertyPtr_t &prop)
 
virtual ~Node ()
 

Static Public Member Functions

static GroupNodePtr_t create (const std::string &name)
 Static method which create a new box defined by the half_axis vector. More...
 
static GroupNodePtr_t createCopy (GroupNodePtr_t other)
 Static method for creating a clone of box other with the copy constructor. More...
 

Public Attributes

 SCENE_VIEWER_ACCEPT_VISITOR
 
- Public Attributes inherited from graphics::Node
 SCENE_VIEWER_ACCEPT_VISITOR
 

Protected Member Functions

 GroupNode (const std::string &name)
 Default constructor. More...
 
 GroupNode (const GroupNode &other)
 Copy constructor. More...
 
void initWeakPtr (GroupNodeWeakPtr other_weak_ptr)
 Initialize weak_ptr. More...
 
- Protected Member Functions inherited from graphics::Node
 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
 

Additional Inherited Members

- Protected Attributes inherited from graphics::Node
PropertyMap_t properties_
 
::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

◆ GroupNode() [1/2]

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

Default constructor.

◆ GroupNode() [2/2]

graphics::GroupNode::GroupNode ( const GroupNode other)
protected

Copy constructor.

◆ ~GroupNode()

virtual graphics::GroupNode::~GroupNode ( )
virtual

Member Function Documentation

◆ addChild()

virtual bool graphics::GroupNode::addChild ( ::graphics::NodePtr_t  child_ptr)
virtual

Add a GraphicalObject to the list.

◆ clone()

virtual GroupNodePtr_t graphics::GroupNode::clone ( void  ) const
virtual

Proceed to a clonage of the current object defined by the copy constructor.

◆ create()

static GroupNodePtr_t graphics::GroupNode::create ( const std::string &  name)
static

Static method which create a new box defined by the half_axis vector.

◆ createCopy()

static GroupNodePtr_t graphics::GroupNode::createCopy ( GroupNodePtr_t  other)
static

Static method for creating a clone of box other with the copy constructor.

◆ getChild()

virtual graphics::NodePtr_t graphics::GroupNode::getChild ( size_t  i) const
inlinevirtual

◆ getNumOfChildren()

virtual size_t graphics::GroupNode::getNumOfChildren ( ) const
inlinevirtual

◆ getOsgNode()

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

Reimplemented from graphics::Node.

◆ hasChild()

virtual bool graphics::GroupNode::hasChild ( ::graphics::NodePtr_t  child_ptr)
virtual

Return true if this group contains this child.

◆ initWeakPtr()

void graphics::GroupNode::initWeakPtr ( GroupNodeWeakPtr  other_weak_ptr)
protected

Initialize weak_ptr.

◆ removeAllChildren()

virtual void graphics::GroupNode::removeAllChildren ( )
virtual

Remove all children.

◆ removeChild()

virtual bool graphics::GroupNode::removeChild ( ::graphics::NodePtr_t  child_ptr)
virtual

Remove a GraphicalObject from the list.

◆ self()

GroupNodePtr_t graphics::GroupNode::self ( void  ) const

Return a shared pointer of the current object.

◆ setAlpha()

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

Replace the old transparency value with alpha Note : alpha must be in [0,1].

Reimplemented from graphics::Node.

◆ setColor()

void graphics::GroupNode::setColor ( const osgVector4 color)
virtual

Set the color of the object.

Implements graphics::Node.

◆ setLightingMode()

virtual void graphics::GroupNode::setLightingMode ( const LightingMode lighting_state)
virtual

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

Parameters
lightingmodestate

Reimplemented from graphics::Node.

◆ setScale()

virtual void graphics::GroupNode::setScale ( const float  scale)
virtual

Apply the scale value of all children note : scale value must be positive.

Reimplemented from graphics::Node.

◆ setVisibilityMode()

virtual void graphics::GroupNode::setVisibilityMode ( const VisibilityMode visibility_state)
virtual

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

Parameters
visibilitymodestate

Reimplemented from graphics::Node.

◆ setWireFrameMode()

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

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

Parameters
wireframemodestate

Reimplemented from graphics::Node.

◆ traverse()

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

Reimplemented from graphics::Node.

Member Data Documentation

◆ SCENE_VIEWER_ACCEPT_VISITOR

graphics::GroupNode::SCENE_VIEWER_ACCEPT_VISITOR