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);