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);
SCENE_VIEWER_ACCEPT_VISITOR
Definition: leaf-node-mesh.h:77
virtual LeafNodeMeshPtr_t copy() const
Proceed to a copy of the currend object as clone.
Definition: leaf-node-mesh.h:60
::osg::Vec4f osgVector4
Definition: config-osg.h:100
Definition: action-search-bar.hh:27
Definition: leaf-node-mesh.h:22
#define DEF_CLASS_SMART_PTR(className)
Definition: macros.h:51
Abstract base class of 3D objects in a scene.
Definition: node.h:25