18 #ifndef COLLADALOADER_HH
19 #define COLLADALOADER_HH
51 public:
virtual Mesh *
Load(
const std::string &_filename);
58 private:
void LoadController(TiXmlElement *_contrXml,
64 private:
void LoadAnimations(TiXmlElement *_xml,
Skeleton *_skel);
69 private:
void LoadAnimationSet(TiXmlElement *_xml,
Skeleton *_skel);
74 private:
SkeletonNode* LoadSkeletonNodes(TiXmlElement *_xml,
80 private:
void SetSkeletonNodeTransform(TiXmlElement *_elem,
87 private:
void LoadGeometry(TiXmlElement *_xml,
94 private: TiXmlElement *GetElementId(TiXmlElement *_parent,
95 const std::string &_name,
96 const std::string &_id);
101 private: TiXmlElement *GetElementId(
const std::string &_name,
102 const std::string &_id);
108 private:
void LoadNode(TiXmlElement *_elem,
Mesh *_mesh,
114 private:
math::Matrix4 LoadNodeTransform(TiXmlElement *_elem);
121 private:
void LoadVertices(
const std::string &_id,
123 std::vector<math::Vector3> &_verts,
124 std::vector<math::Vector3> &_norms);
130 private:
void LoadPositions(
const std::string &_id,
132 std::vector<math::Vector3> &_values);
138 private:
void LoadNormals(
const std::string &_id,
140 std::vector<math::Vector3> &_values);
145 private:
void LoadTexCoords(
const std::string &_id,
146 std::vector<math::Vector2d> &_values);
151 private:
Material *LoadMaterial(
const std::string &_name);
157 private:
void LoadColorOrTexture(TiXmlElement *_elem,
158 const std::string &_type,
165 private:
void LoadTriangles(TiXmlElement *_trianglesXml,
173 private:
void LoadPolylist(TiXmlElement *_polylistXml,
181 private:
void LoadLines(TiXmlElement *_xml,
187 private:
void LoadScene(
Mesh *_mesh);
192 private:
float LoadFloat(TiXmlElement *_elem);
197 private:
void LoadTransparent(TiXmlElement *_elem,
Material *_mat);
200 private:
double meter;
203 private: std::string filename;
206 private: std::map<std::string, std::string> materialMap;
209 private: TiXmlElement *colladaXml;
212 private: std::string path;