9 #ifndef GEPETTO_VIEWER_LEAFNODEMESH_HH
10 #define GEPETTO_VIEWER_LEAFNODEMESH_HH
14 #include <osg/Geometry>
15 #include <osg/PrimitiveSet>
25 LeafNodeMeshWeakPtr weak_ptr_;
28 osg::GeometryRefPtr mesh_geometry_ptr_;
39 void initWeakPtr(LeafNodeMeshWeakPtr other_weak_ptr);
45 static LeafNodeMeshPtr_t create(
const std::string& name);
46 static LeafNodeMeshPtr_t create(
const std::string& name,
51 static LeafNodeMeshPtr_t createCopy(LeafNodeMeshPtr_t other);
55 virtual LeafNodeMeshPtr_t clone(
void)
const;
60 virtual LeafNodeMeshPtr_t
copy()
const {
return clone(); }
64 LeafNodeMeshPtr_t
self(void)
const;
66 void setColor(
const osgVector4& color_diffuse);
72 void setTexture(
const std::string& image_path);
74 virtual void setAlpha(
const float& alpha);
75 virtual osg::ref_ptr<osg::Node> getOsgNode()
const;
81 void setVertexArray(osg::Vec3ArrayRefPtr arrayOfVertices);
84 void addPrimitiveSet(osg::DrawElementsUInt* aSetOfColors);
86 void setColorBinding(osg::Geometry::AttributeBinding aColorBinding);
88 void setColorArray(osg::Vec4ArrayRefPtr colors);
91 void setNormalArray(osg::Vec3ArrayRefPtr normals);
92 void setNormalBinding(osg::Geometry::AttributeBinding aNormalBinding);