25 #ifndef FREESCAPE_OBJECT_H 26 #define FREESCAPE_OBJECT_H 28 #include "math/aabb.h" 30 #include "freescape/gfx.h" 44 kNorthPyramidType = 8,
45 kSouthPyramidType = 9,
49 kQuadrilateralType = 12,
58 virtual ObjectType getType() {
return _type; }
59 uint16 getObjectID() {
return _objectID; }
60 uint16 getObjectFlags() {
return _flags; }
61 void setObjectFlags(uint32 flags_) { _flags = flags_; }
62 Math::Vector3d getOrigin() {
return _origin; }
63 virtual void setOrigin(Math::Vector3d origin_) { _origin = origin_; };
64 Math::Vector3d getSize() {
return _size; }
66 virtual bool isDrawable() {
return false; }
67 virtual bool isPlanar() {
return false; }
68 virtual void scale(
int factor) = 0;
70 bool isInvisible() {
return _flags & 0x40; }
71 void makeInvisible() { _flags = _flags | 0x40; }
72 void makeVisible() { _flags = _flags & ~0x40; }
73 bool isInitiallyInvisible() {
return _flags & 0x80; }
74 void makeInitiallyInvisible() { _flags = _flags | 0x80; }
75 void makeInitiallyVisible() { _flags = _flags & ~0x80; }
76 bool isDestroyed() {
return _flags & 0x20; }
77 void destroy() { _flags = _flags | 0x20; }
78 void restore() { _flags = _flags & ~0x20; }
79 void toggleVisibility() { _flags = _flags ^ 0x40; }
82 virtual Object *duplicate() = 0;
89 Math::Vector3d _origin, _size, _rotation;
90 Math::AABB _boundingBox;
91 Object *_partOfGroup =
nullptr;
96 #endif // FREESCAPE_OBJECT_H