-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathObject.h
53 lines (41 loc) · 1.22 KB
/
Object.h
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
45
46
47
48
49
50
51
52
53
// *********************************************************
// Object Class
// Author : Tamy Boubekeur ([email protected]).
// Copyright (C) 2010 Tamy Boubekeur.
// All rights reserved.
// *********************************************************
#ifndef OBJECT_H
#define OBJECT_H
#include <iostream>
#include <vector>
#include "Mesh.h"
#include "Material.h"
#include "BoundingBox.h"
class Object {
public:
inline Object () {}
inline Object (const Mesh & mesh, const Material & mat) : mesh (mesh), mat (mat) {
updateBoundingBox ();
}
virtual ~Object () {}
inline const Vec3Df & getTrans () const { return trans;}
inline void setTrans (const Vec3Df & t) { trans = t; }
inline const Mesh & getMesh () const { return mesh; }
inline Mesh & getMesh () { return mesh; }
inline const Material & getMaterial () const { return mat; }
inline Material & getMaterial () { return mat; }
inline const BoundingBox & getBoundingBox () const { return bbox; }
void updateBoundingBox ();
private:
Mesh mesh;
Material mat;
BoundingBox bbox;
Vec3Df trans;
};
#endif // Scene_H
// Some Emacs-Hints -- please don't remove:
//
// Local Variables:
// mode:C++
// tab-width:4
// End: