46 public:
virtual ~
Mesh();
50 public:
void SetPath(
const std::string &_path);
54 public: std::string GetPath()
const;
58 public:
void SetName(
const std::string &_n);
62 public: std::string GetName()
const;
74 public:
unsigned int GetVertexCount()
const;
78 public:
unsigned int GetNormalCount()
const;
82 public:
unsigned int GetIndexCount()
const;
86 public:
unsigned int GetTexCoordCount()
const;
91 public:
void AddSubMesh(
SubMesh *_child);
95 public:
unsigned int GetSubMeshCount()
const;
100 public:
int AddMaterial(
Material *_mat);
104 public:
unsigned int GetMaterialCount()
const;
109 public:
const Material *GetMaterial(
int _index)
const;
115 public:
const SubMesh *GetSubMesh(
unsigned int _i)
const;
120 public:
const SubMesh *GetSubMesh(
const std::string &_name)
const;
125 public:
void FillArrays(
float **_vertArr,
int **_indArr)
const;
129 public:
void RecalculateNormals();
141 public:
void GenSphericalTexCoord(
const math::Vector3 &_center);
145 public:
Skeleton* GetSkeleton()
const;
148 public:
void SetSkeleton(
Skeleton *_skel);
151 public:
bool HasSkeleton()
const;
155 public:
void Scale(
double _factor);
171 private: std::string name;
174 private: std::string path;
177 private: std::vector<SubMesh *> submeshes;
180 private: std::vector<Material *> materials;
221 public:
void SetName(
const std::string &_n);
225 public: std::string GetName()
const;
229 public:
void SetPrimitiveType(PrimitiveType _type);
233 public: PrimitiveType GetPrimitiveType()
const;
237 public:
void CopyVertices(
const std::vector<math::Vector3> &_verts);
241 public:
void CopyNormals(
const std::vector<math::Vector3> &_norms);
245 public:
void SetVertexCount(
unsigned int _count);
249 public:
void SetIndexCount(
unsigned int _count);
253 public:
void SetNormalCount(
unsigned int _count);
257 public:
void SetTexCoordCount(
unsigned int _count);
261 public:
void AddIndex(
unsigned int _i);
271 public:
void AddVertex(
double _x,
double _y,
double _z);
281 public:
void AddNormal(
double _x,
double _y,
double _z);
286 public:
void AddTexCoord(
double _u,
double _v);
292 public:
void AddNodeAssignment(
unsigned int _vertex,
unsigned int _node,
303 public:
void SetVertex(
unsigned int _i,
const math::Vector3 &_v);
313 public:
void SetNormal(
unsigned int _i,
const math::Vector3 &_n);
327 public:
void SetTexCoord(
unsigned int _i,
const math::Vector2d &_t);
331 public:
unsigned int GetIndex(
unsigned int _i)
const;
342 public:
unsigned int GetVertexCount()
const;
345 public:
unsigned int GetNormalCount()
const;
348 public:
unsigned int GetIndexCount()
const;
351 public:
unsigned int GetTexCoordCount()
const;
354 public:
unsigned int GetNodeAssignmentsCount()
const;
357 public:
unsigned int GetMaxIndex()
const;
362 public:
void SetMaterialIndex(
unsigned int _index);
365 public:
unsigned int GetMaterialIndex()
const;
373 public:
unsigned int GetVertexIndex(
const math::Vector3 &_v)
const;
378 public:
void FillArrays(
float **_vertArr,
int **_indArr)
const;
381 public:
void RecalculateNormals();
390 public:
void GenSphericalTexCoord(
const math::Vector3 &_center);
394 public:
void Scale(
double _factor);
410 private: std::vector< math::Vector3 > vertices;
413 private: std::vector< math::Vector3 > normals;
416 private: std::vector< math::Vector2d > texCoords;
419 private: std::vector<unsigned int> indices;
422 private: std::vector<NodeAssignment> nodeAssignments;
425 private: PrimitiveType primitiveType;
429 private:
int materialIndex;
432 private: std::string name;