Project

General

Profile

SO3Engine
ALSceneLoader.h
Go to the documentation of this file.
1#ifndef ALSCENELOADER_H
2#define ALSCENELOADER_H
3
4// STL
5#include <string>
6
7// Assimp
8#include "assimp/Importer.hpp"
9#include "assimp/postprocess.h"
10#include "assimp/scene.h"
11#include "assimp/DefaultLogger.hpp"
12#include "assimp/LogStream.hpp"
13
14// ALScene
15#include "ALScene.h"
16
17// SO3
19
20// boost
21#include <boost/filesystem.hpp>
22
23#define so3Converter_SplitLargeMeshes 0x1
24#define so3Converter_GenSmoothNormals 0x2
25#define so3Converter_OptimizeMeshes 0x4
26#define so3Converter_OptimizeGraph 0x8
27#define so3Converter_RotateX 0x10
28#define so3Converter_GenerateLod 0x20
29#define so3Converter_OptimizeTextures 0x40
30#define so3Converter_OptimizeTextures_VeryLow 0x80
31#define so3Converter_OptimizeTextures_Low 0x100
32#define so3Converter_OptimizeTextures_Medium 0x200
33#define so3Converter_OptimizeTextures_High 0x400
34#define so3Converter_OptimizeTextures_VeryHigh 0x800
35
36namespace SO3
37{
38
44{
45public:
50 ALSceneLoader(SScene* scene, std::string filename, std::string group, unsigned int flags, float scale = 1.0f);
51
52 ALSceneLoader(std::string filename, std::string group, unsigned int flags, float scale = 1.0f);
53
59
60 bool loadFile(const std::string& sceneName, SNode* parent, std::vector<SNode*> &objects, std::vector<SMaterial*> &materials);
61
62 bool convertFile(boost::filesystem::path expFolder, const std::string& sceneName);
63
68 void createDirectory(boost::filesystem::path path);
69 boost::filesystem::path getFilePath();
70
71 unsigned int getFlags() { return mSo3Flags; }
72private:
73 Assimp::Importer mImporter;
74 ALScene mALScene;
75
76 SScene* mScene;
77 std::string mFilename;
78 std::string mGroup;
79 float mScale;
80 unsigned int mSo3Flags;
81 unsigned int mFlags;
82};
83};
84
85#endif // ALSCENELOADER_H
bool convertFile(boost::filesystem::path expFolder, const std::string &sceneName)
bool loadFile(const std::string &sceneName, SNode *parent, std::vector< SNode * > &objects, std::vector< SMaterial * > &materials)
void createDirectory(boost::filesystem::path path)
unsigned int getFlags()
boost::filesystem::path getFilePath()
STBI_EXTERN unsigned long flags
Definition stb_image.h:1182