9 #ifndef GEPETTO_VIEWER_LEAFNODEMESH_HH 10 #define GEPETTO_VIEWER_LEAFNODEMESH_HH 13 #include <osg/PrimitiveSet> 14 #include <osg/Geometry> 26 LeafNodeMeshWeakPtr weak_ptr_;
29 osg::GeometryRefPtr mesh_geometry_ptr_;
40 void initWeakPtr (LeafNodeMeshWeakPtr other_weak_ptr);
47 static LeafNodeMeshPtr_t create(
const std:: string &name);
48 static LeafNodeMeshPtr_t create(
const std::string &name,
const osgVector4& color);
52 static LeafNodeMeshPtr_t createCopy(LeafNodeMeshPtr_t other);
56 virtual LeafNodeMeshPtr_t clone(
void)
const;
62 virtual LeafNodeMeshPtr_t
copy()
const {
return clone(); }
66 LeafNodeMeshPtr_t
self(void)
const;
68 void setColor(
const osgVector4& color_diffuse);
74 void setTexture(
const std::string& image_path);
76 virtual void setAlpha(
const float& alpha);
77 virtual osg::ref_ptr<osg::Node> getOsgNode()
const;
83 void setVertexArray(osg::Vec3ArrayRefPtr arrayOfVertices);
86 void addPrimitiveSet(osg::DrawElementsUInt * aSetOfColors);
88 void setColorBinding(osg::Geometry::AttributeBinding aColorBinding);
90 void setColorArray(osg::Vec4ArrayRefPtr colors);
93 void setNormalArray(osg::Vec3ArrayRefPtr normals);
94 void setNormalBinding(osg::Geometry::AttributeBinding aNormalBinding);
SCENE_VIEWER_ACCEPT_VISITOR
Definition: leaf-node-mesh.h:79
virtual LeafNodeMeshPtr_t copy() const
Proceed to a copy of the currend object as clone.
Definition: leaf-node-mesh.h:62
::osg::Vec4f osgVector4
Definition: config-osg.h:110
Definition: action-search-bar.hh:27
Definition: leaf-node-mesh.h:21
#define DEF_CLASS_SMART_PTR(className)
Definition: macros.h:50
Abstract base class of 3D objects in a scene.
Definition: node.h:27