18 #ifndef _COLLADALOADER_HH_
19 #define _COLLADALOADER_HH_
53 public:
virtual Mesh *Load(
const std::string &_filename);
60 private:
void LoadController(TiXmlElement *_contrXml,
66 private:
void LoadAnimations(TiXmlElement *_xml,
Skeleton *_skel);
71 private:
void LoadAnimationSet(TiXmlElement *_xml,
Skeleton *_skel);
76 private:
SkeletonNode* LoadSkeletonNodes(TiXmlElement *_xml,
82 private:
void SetSkeletonNodeTransform(TiXmlElement *_elem,
89 private:
void LoadGeometry(TiXmlElement *_xml,
96 private: TiXmlElement *GetElementId(TiXmlElement *_parent,
97 const std::string &_name,
98 const std::string &_id);
103 private: TiXmlElement *GetElementId(
const std::string &_name,
104 const std::string &_id);
110 private:
void LoadNode(TiXmlElement *_elem,
Mesh *_mesh,
116 private:
math::Matrix4 LoadNodeTransform(TiXmlElement *_elem);
123 private:
void LoadVertices(
const std::string &_id,
125 std::vector<math::Vector3> &_verts,
126 std::vector<math::Vector3> &_norms);
132 private:
void LoadPositions(
const std::string &_id,
134 std::vector<math::Vector3> &_values);
140 private:
void LoadNormals(
const std::string &_id,
142 std::vector<math::Vector3> &_values);
147 private:
void LoadTexCoords(
const std::string &_id,
148 std::vector<math::Vector2d> &_values);
153 private:
Material *LoadMaterial(
const std::string &_name);
159 private:
void LoadColorOrTexture(TiXmlElement *_elem,
160 const std::string &_type,
167 private:
void LoadTriangles(TiXmlElement *_trianglesXml,
175 private:
void LoadPolylist(TiXmlElement *_polylistXml,
183 private:
void LoadLines(TiXmlElement *_xml,
189 private:
void LoadScene(
Mesh *_mesh);
194 private:
float LoadFloat(TiXmlElement *_elem);
199 private:
void LoadTransparent(TiXmlElement *_elem,
Material *_mat);
202 private:
double meter;
205 private: std::string filename;
208 private: std::map<std::string, std::string> materialMap;
211 private: TiXmlElement *colladaXml;
214 private: std::string path;
217 private: std::string currentNodeName;