9 #ifndef GEPETTO_VIEWER_LEAFNODECOLLADA_HH
10 #define GEPETTO_VIEWER_LEAFNODECOLLADA_HH
15 #include <osgDB/ReadFile>
24 std::string collada_file_path_;
25 std::string texture_file_path_;
28 LeafNodeColladaWeakPtr weak_ptr_;
31 ::osg::GroupRefPtr group_ptr_;
32 ::osg::NodeRefPtr collada_ptr_;
37 osg::ref_ptr<osgDB::Options> options_;
43 const std::string& collada_file_path);
44 LeafNodeCollada(
const std::string& name,
const std::string& collada_file_path,
47 const std::string& collada_file_path);
52 void initWeakPtr(LeafNodeColladaWeakPtr other_weak_ptr);
58 static LeafNodeColladaPtr_t create(
const std::string& name,
59 ::osg::NodeRefPtr mesh,
60 const std::string& collada_file_path);
61 static LeafNodeColladaPtr_t create(
const std::string& name,
62 const std::string& collada_file_path);
63 static LeafNodeColladaPtr_t create(
const std::string& name,
64 const std::string& collada_file_path,
69 static LeafNodeColladaPtr_t createCopy(LeafNodeColladaPtr_t other);
73 virtual LeafNodeColladaPtr_t clone(
void)
const;
76 ::osg::NodeRefPtr getColladaPtr(
void);
81 virtual LeafNodeColladaPtr_t
copy()
const {
return clone(); }
85 LeafNodeColladaPtr_t
self(void)
const;
91 void setTexture(
const std::string& image_path);
93 const std::string& meshFilePath()
const;
95 const std::string& textureFilePath()
const;
97 virtual void setAlpha(
const float& alpha);
98 virtual osg::ref_ptr<osg::Node> getOsgNode()
const;
101 void removeLightSources();
109 void removeFromCache();