Go to the documentation of this file.00001
00002
00003 #ifndef _AABBOX_3D_H_
00004 #define _AABBOX_3D_H_
00005
00006 #include <EngineConfig.h>
00007 #include <core/Types.h>
00008 #include <core/Vector3d.h>
00009
00010 namespace core
00011 {
00012
00015 class ENGINE_PUBLIC_EXPORT aabox3d
00016 {
00017 public:
00018
00019 aabox3d();
00020 aabox3d(const vector3d& min, const vector3d& max);
00021 aabox3d(const vector3d& init);
00022 aabox3d(f32 minx, f32 miny, f32 minz, f32 maxx, f32 maxy, f32 maxz);
00023
00024 inline bool operator==(const aabox3d& other) const;
00025 inline bool operator!=(const aabox3d& other) const;
00026
00032 void addInternalPoint(f32 x, f32 y, f32 z);
00033
00037 void addInternalPoint(const vector3d& p);
00038
00042 void addInternalBox(const aabox3d& b);
00043
00045 void reset(f32 x, f32 y, f32 z);
00046
00048 void reset(const aabox3d& initValue);
00049
00051 void reset(const vector3d& initValue);
00052
00054 vector3d getCenter() const;
00055
00057 vector3d getExtent() const;
00058
00061 void getEdges(vector3d* edges) const;
00062
00065 bool isEmpty() const;
00066
00068 void repair();
00069
00070 vector3d MinEdge;
00071 vector3d MaxEdge;
00072 };
00073
00074 }
00075
00076 #endif