gVirtualXRay  2.0.10
VirtualX-RayImagingLibraryonGPU
AssimpSceneGraphBinder.h
Go to the documentation of this file.
1 #ifndef __AssimpSceneGraphBinder_h
2 #define __AssimpSceneGraphBinder_h
3 
4 #include <string>
5 
6 // ASSIMP to load Collada files
7 #ifdef HAS_ASSIMP
8 #include <assimp/scene.h>
9 #include <assimp/matrix4x4.h>
10 #include <assimp/postprocess.h>
11 #include <assimp/Importer.hpp>
12 #endif
13 
14 #ifndef __SceneGraphBinder_h
16 #endif
17 
18 #ifndef __Types_h
19 #include "gVirtualXRay/Types.h"
20 #endif
21 
22 
23 //******************************************************************************
24 // namespace
25 //******************************************************************************
26 namespace gVirtualXRay {
27 
28 
30 {
31 public:
34  AssimpSceneGraphBinder(const std::string& aFileName, RATIONAL_NUMBER aUnitOfLength);
35  AssimpSceneGraphBinder(const char* aFileName, RATIONAL_NUMBER aUnitOfLength);
36  virtual ~AssimpSceneGraphBinder();
37 
39 
40 
41  virtual void loadSceneGraph(const char* aFileName, RATIONAL_NUMBER aUnitOfLength);
42 
43 
44 #ifdef HAS_ASSIMP
45  void setSceneGraph(const aiScene* apSceneGraph, RATIONAL_NUMBER aUnitOfLength);
46 #endif
47 
48 
49 
50 private:
51 
52 #ifdef HAS_ASSIMP
53  void recursivePolygonMeshBuild (const aiNode* nd, SceneGraphNode* apParent, aiMatrix4x4 tStack);
54 
55  Assimp::Importer m_importer;
56  aiScene* m_p_scene;
57 #endif
58 };
59 
60 
61 } // namespace gVirtualXRay
62 
63 
64 #endif // __AssimpSceneGraphBinder_h
Type declarations.
AssimpSceneGraphBinder & operator=(const AssimpSceneGraphBinder &aSceneGraph)
float RATIONAL_NUMBER
Type of data used to store real numbers.
Definition: Types.h:107
virtual void loadSceneGraph(const char *aFileName, RATIONAL_NUMBER aUnitOfLength)