forked from Blackcatn13/houseDesigner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModel.h
More file actions
44 lines (38 loc) · 872 Bytes
/
Model.h
File metadata and controls
44 lines (38 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef MODEL_H
#define MODEL_H
#include <string>
#include <assimp/scene.h>
#include <assimp/cimport.h>
#include <assimp/postprocess.h>
#include "Util.h"
#define get_min(x,y) (x<y?x:y)
#define get_max(x,y) (y>x?y:x)
class CPoint3D;
using namespace std;
class CModel
{
public:
CModel(void);
~CModel(void);
void CleanUp();
bool Draw();
bool LoadModel(string modelName);
CPoint3D getBBMin() {return BBMin;}
CPoint3D getBBMax() {return BBMax;}
CPoint3D getSize();
CPoint3D getCenter();
CPoint3D getRealSize(){return realSize;}
float getRadius();
private:
const struct aiScene* scene;
void RecursiveRender(aiNode* node);
void CalculateBBAndSize(aiNode* node);
CPoint3D BBMin;
CPoint3D BBMax;
CPoint3D size;
CPoint3D center;
CPoint3D realSize;
float radius;
GLuint listName;
};
#endif