Project

General

Profile

SO3Engine
ALNode.h
Go to the documentation of this file.
1#ifndef ALNODE_H
2#define ALNODE_H
3
4#include "ALObject.h"
5#include "ALScene.h"
7
8// boost
9#include <boost/filesystem.hpp>
10
11// Tinyxml2
13
14namespace SO3
15{
16
21 class ALNode //: ALObject
22 {
23 public:
29 ALNode(aiNode* asNode, SNode* pNode, ALScene* alscene, std::vector<aiCamera*> camerasNames, std::vector<aiLight*> lightsNames);
30 ALNode(aiNode* asNode, SNode* pNode, ALScene* alscene, std::vector<aiCamera*> camerasNames, std::vector<aiLight*> lightsNames, tinyxml2::XMLElement* xmlParent);
31
35 ~ALNode();
36
37 tinyxml2::XMLElement* convert(boost::filesystem::path expPath);
38
39 SNode* load();
40
42 bool isMesh(aiNode* node);
43
45 bool isCamera(aiNode* node);
46
48 bool isLight(aiNode* node);
49
51 bool isBone(aiNode* node);
52
53 bool isSceneDependent(aiNode* node);
54
55 private:
56 void convertMesh(boost::filesystem::path expPath, tinyxml2::XMLElement* nParent);
57 float processRange(aiLight* light);
58
59 SEntity* loadMesh();
60
61 SLight* makeLight(aiNode* node, Ogre::Vector3& direction);
62
64 SCamera* makeCamera(aiNode* node);
65
66 aiNode* mOrigin;
67 ALScene* mScene;
68 SNode* mParent;
69 tinyxml2::XMLElement* mParentNodeXml;
70
71 std::vector<ALConverterNodeAnim> mNodeAnim;
72 std::vector<aiCamera*> mCameras;
73 std::vector<aiLight*> mLights;
74 };
75};
76
77#endif // ALNODE_H
bool isMesh(aiNode *node)
Check if a node is a mesh.
Definition ALNode.cpp:356
SNode * load()
Definition ALNode.cpp:265
bool isSceneDependent(aiNode *node)
Definition ALNode.cpp:388
bool isCamera(aiNode *node)
Check if a node is a camera.
Definition ALNode.cpp:361
bool isBone(aiNode *node)
Check if a node is a bone.
Definition ALNode.cpp:383
bool isLight(aiNode *node)
Check if a node is a light.
Definition ALNode.cpp:372
tinyxml2::XMLElement * convert(boost::filesystem::path expPath)
Definition ALNode.cpp:86