Project

General

Profile

SO3Engine
ALMesh.h
Go to the documentation of this file.
1#ifndef ALMESH_H
2#define ALMESH_H
3
4#include "ALObject.h"
5#include "ALMaterial.h"
6#include "ALSkeleton.h"
8
9// boost
10#include <boost/filesystem.hpp>
11
12// Tinyxml2
14
15// STL
16#include <utility>
17
18namespace SO3
19{
20 //class ALSkeleton;
25 class ALMesh
26 {
27 public:
31 ALMesh(aiNode* meNode, ALScene* alscene);
32
36 ~ALMesh();
37
38 void convert(boost::filesystem::path expPath, tinyxml2::XMLElement* parent);
39 SEntity* load();
40
41 Ogre::MeshPtr generateMesh();
42 void generateSubMesh(Ogre::MeshPtr ogMesh);
43 void makeIndexBuffer(aiMesh* asSubMesh, Ogre::SubMesh* ogSubMesh);
44 void makeVertexBuffer(aiMesh* asSubMesh, Ogre::SubMesh* ogSubMesh);
45 void saveMesh(Ogre::MeshPtr ogMesh, boost::filesystem::path path, tinyxml2::XMLElement* parent);
46
47 private:
48 void updateBounds(Ogre::Vector3 pos);
49
50 Ogre::AxisAlignedBox mBounding;
51 Ogre::Real mSphereRadius;
52 aiNode* mOrigin;
53 ALScene* mScene;
54 std::vector<std::string> mMaterialList;
55 Ogre::SkeletonPtr mSkeleton;
56 Ogre::MeshPtr mOgreMesh;
57 ALSkeleton mSkeletonAnim;
58 bool mHasBone;
59 };
60};
61
62#endif
librairies include
void generateSubMesh(Ogre::MeshPtr ogMesh)
Definition ALMesh.cpp:210
Ogre::MeshPtr generateMesh()
Definition ALMesh.cpp:61
void makeVertexBuffer(aiMesh *asSubMesh, Ogre::SubMesh *ogSubMesh)
Definition ALMesh.cpp:416
void makeIndexBuffer(aiMesh *asSubMesh, Ogre::SubMesh *ogSubMesh)
Definition ALMesh.cpp:351
SEntity * load()
Definition ALMesh.cpp:746
void saveMesh(Ogre::MeshPtr ogMesh, boost::filesystem::path path, tinyxml2::XMLElement *parent)
Definition ALMesh.cpp:639
void convert(boost::filesystem::path expPath, tinyxml2::XMLElement *parent)
Definition ALMesh.cpp:740