18 #ifndef _COLLADALOADER_HH_
19 #define _COLLADALOADER_HH_
36 class ColladaLoaderPrivate;
54 public:
virtual Mesh *Load(
const std::string &_filename);
61 private:
void LoadController(TiXmlElement *_contrXml,
67 private:
void LoadAnimations(TiXmlElement *_xml,
Skeleton *_skel);
72 private:
void LoadAnimationSet(TiXmlElement *_xml,
Skeleton *_skel);
77 private:
SkeletonNode* LoadSkeletonNodes(TiXmlElement *_xml,
83 private:
void SetSkeletonNodeTransform(TiXmlElement *_elem,
90 private:
void LoadGeometry(TiXmlElement *_xml,
97 private: TiXmlElement *GetElementId(TiXmlElement *_parent,
98 const std::string &_name,
99 const std::string &_id);
104 private: TiXmlElement *GetElementId(
const std::string &_name,
105 const std::string &_id);
111 private:
void LoadNode(TiXmlElement *_elem,
Mesh *_mesh,
117 private:
math::Matrix4 LoadNodeTransform(TiXmlElement *_elem);
125 private:
void LoadVertices(
const std::string &_id,
127 std::vector<math::Vector3> &_verts,
128 std::vector<math::Vector3> &_norms);
137 private:
void LoadVertices(
const std::string &_id,
139 std::vector<math::Vector3> &_verts,
140 std::vector<math::Vector3> &_norms,
141 std::map<unsigned int, unsigned int> &_vertDup,
142 std::map<unsigned int, unsigned int> &_normDup);
149 private:
void LoadPositions(
const std::string &_id,
151 std::vector<math::Vector3> &_values,
152 std::map<unsigned int, unsigned int> &_duplicates);
159 private:
void LoadNormals(
const std::string &_id,
161 std::vector<math::Vector3> &_values,
162 std::map<unsigned int, unsigned int> &_duplicates);
168 private:
void LoadTexCoords(
const std::string &_id,
169 std::vector<math::Vector2d> &_values,
170 std::map<unsigned int, unsigned int> &_duplicates);
175 private:
Material *LoadMaterial(
const std::string &_name);
181 private:
void LoadColorOrTexture(TiXmlElement *_elem,
182 const std::string &_type,
189 private:
void LoadTriangles(TiXmlElement *_trianglesXml,
197 private:
void LoadPolylist(TiXmlElement *_polylistXml,
205 private:
void LoadLines(TiXmlElement *_xml,
211 private:
void LoadScene(
Mesh *_mesh);
216 private:
float LoadFloat(TiXmlElement *_elem);
221 private:
void LoadTransparent(TiXmlElement *_elem,
Material *_mat);
A 3D mesh.
Definition: Mesh.hh:40
Base class for loading meshes.
Definition: MeshLoader.hh:36
A skeleton.
Definition: Skeleton.hh:50
Encapsulates description of a material.
Definition: common/Material.hh:34
Private data for the ColladaLoader class.
Definition: ColladaLoaderPrivate.hh:34
A 3x3 matrix class.
Definition: Matrix4.hh:39
Class used to load Collada mesh files.
Definition: ColladaLoader.hh:43
A skeleton node.
Definition: Skeleton.hh:170
Forward declarations for the math classes.
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48