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

Implementation of the Mesh GraphicalObject in OSG render. More...

#include <gepetto/viewer/leaf-node-mesh.h>

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

Public Member Functions

virtual LeafNodeMeshPtr_t clone (void) const
 Proceed to a clonage of the current object defined by the copy constructor. More...
 
virtual LeafNodeMeshPtr_t copy () const
 Copy. More...
 
LeafNodeMeshPtr_t self (void) const
 Return a shared pointer of the current object. More...
 
void setColor (const osgVector4 &color_diffuse)
 Set the color of the object. More...
 
void setColor (const osgVector4 &color_diffuse, const osgVector4 &color_specular, const osgVector4 &color_emissive)
 
void setTexture (const std::string &image_path)
 
virtual void setAlpha (const float &alpha)
 
virtual osg::ref_ptr< osg::Node > getOsgNode () const
 
void setVertexArray (osg::Vec3ArrayRefPtr arrayOfVertices)
 Add geometric data. More...
 
void addPrimitiveSet (osg::DrawElementsUInt *aSetOfColors)
 Add a primitive set to the mesh. More...
 
void setColorBinding (osg::Geometry::AttributeBinding aColorBinding)
 
void setColorArray (osg::Vec4ArrayRefPtr colors)
 Add colors. More...
 
void setNormalArray (osg::Vec3ArrayRefPtr normals)
 Add normals. More...
 
void setNormalBinding (osg::Geometry::AttributeBinding aNormalBinding)
 
virtual ~LeafNodeMesh ()
 Destructor. More...
 
- 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 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 ::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)
 
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 ()
 

Static Public Member Functions

static LeafNodeMeshPtr_t create (const std::string &name)
 Static method which create a new LeafNodeCollada. More...
 
static LeafNodeMeshPtr_t create (const std::string &name, const osgVector4 &color)
 
static LeafNodeMeshPtr_t createCopy (LeafNodeMeshPtr_t other)
 Static method for creating a clone of LeafNodeMesh other. More...
 

Public Attributes

 SCENE_VIEWER_ACCEPT_VISITOR
 
- Public Attributes inherited from graphics::Node
 SCENE_VIEWER_ACCEPT_VISITOR
 

Additional Inherited Members

- 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
 
void addProperty (const PropertyPtr_t &prop)
 
void addProperty (const std::string &name, const PropertyPtr_t &prop)
 
- Protected Attributes inherited from graphics::Node
::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...
 

Detailed Description

Implementation of the Mesh GraphicalObject in OSG render.

Constructor & Destructor Documentation

◆ ~LeafNodeMesh()

virtual graphics::LeafNodeMesh::~LeafNodeMesh ( )
virtual

Destructor.

Member Function Documentation

◆ addPrimitiveSet()

void graphics::LeafNodeMesh::addPrimitiveSet ( osg::DrawElementsUInt *  aSetOfColors)

Add a primitive set to the mesh.

◆ clone()

virtual LeafNodeMeshPtr_t graphics::LeafNodeMesh::clone ( void  ) const
virtual

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

◆ copy()

virtual LeafNodeMeshPtr_t graphics::LeafNodeMesh::copy ( ) const
inlinevirtual

Copy.

Proceed to a copy of the currend object as clone

◆ create() [1/2]

static LeafNodeMeshPtr_t graphics::LeafNodeMesh::create ( const std::string &  name)
static

Static method which create a new LeafNodeCollada.

◆ create() [2/2]

static LeafNodeMeshPtr_t graphics::LeafNodeMesh::create ( const std::string &  name,
const osgVector4 color 
)
static

◆ createCopy()

static LeafNodeMeshPtr_t graphics::LeafNodeMesh::createCopy ( LeafNodeMeshPtr_t  other)
static

Static method for creating a clone of LeafNodeMesh other.

◆ getOsgNode()

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

Reimplemented from graphics::Node.

◆ self()

LeafNodeMeshPtr_t graphics::LeafNodeMesh::self ( void  ) const

Return a shared pointer of the current object.

◆ setAlpha()

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

Reimplemented from graphics::Node.

◆ setColor() [1/2]

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

Set the color of the object.

Implements graphics::Node.

◆ setColor() [2/2]

void graphics::LeafNodeMesh::setColor ( const osgVector4 color_diffuse,
const osgVector4 color_specular,
const osgVector4 color_emissive 
)

◆ setColorArray()

void graphics::LeafNodeMesh::setColorArray ( osg::Vec4ArrayRefPtr  colors)

Add colors.

◆ setColorBinding()

void graphics::LeafNodeMesh::setColorBinding ( osg::Geometry::AttributeBinding  aColorBinding)

◆ setNormalArray()

void graphics::LeafNodeMesh::setNormalArray ( osg::Vec3ArrayRefPtr  normals)

Add normals.

◆ setNormalBinding()

void graphics::LeafNodeMesh::setNormalBinding ( osg::Geometry::AttributeBinding  aNormalBinding)

◆ setTexture()

void graphics::LeafNodeMesh::setTexture ( const std::string &  image_path)

◆ setVertexArray()

void graphics::LeafNodeMesh::setVertexArray ( osg::Vec3ArrayRefPtr  arrayOfVertices)

Add geometric data.

Set the vertices of the mesh

Member Data Documentation

◆ SCENE_VIEWER_ACCEPT_VISITOR

graphics::LeafNodeMesh::SCENE_VIEWER_ACCEPT_VISITOR