-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobject.h
More file actions
57 lines (38 loc) · 1.08 KB
/
object.h
File metadata and controls
57 lines (38 loc) · 1.08 KB
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
54
55
56
57
#ifndef OBJECT_H
#define OBJECT_H
#include "point3d.h"
#include "pixel.h"
namespace obj_type{
enum type
{
Invalid = -1,
Sphere = 1,
Plane = 2,
Triangle = 3,
Disc = 4,
Cylinder = 5
};
}
class Object
{
public:
Object();
~Object();
Object(Point3d & ctr, Pixel & color);
Object(Point3d & ctr);
inline void set_center(Point3d ctr);
inline void set_color(Pixel color);
inline Point3d center();
inline Pixel color();
inline obj_type::type type();
protected:
Point3d _center;
Pixel _color;
obj_type::type _type;
};
inline obj_type::type Object::type() {return _type;}
inline void Object::set_center(Point3d ctr){_center = ctr;}
inline void Object::set_color(Pixel color){_color = color;}
inline Point3d Object::center(){return _center;}
inline Pixel Object::color(){return _color;}
#endif // OBJECT_H