00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef TA_AABB_H
00013 #define TA_AABB_H
00014
00015 #ifndef TA_VECTOR_H
00016 #include "Vector.h"
00017 #endif // TA_VECTOR_H
00018
00019 TA_OBFUSCATION_SKIP_PASS_2
00020
00021 namespace TA
00022 {
00023
00024 struct MFrame;
00025
00026 struct TACOMMON_CLASS AABB
00027 {
00028
00029
00030
00031 TA_OBFUSCATION_RESERVED_FULL_ON
00032 Vec3 v3Center;
00033 Vec3 v3Extent;
00034 TA_OBFUSCATION_RESERVED_FULL_OFF
00035
00036 TA_OBFUSCATION_RESERVED_ON
00037 AABB() {}
00038 AABB(const Vec3& v3NewCenter, const Vec3& v3NewExtent) { Initialise(v3NewCenter, v3NewExtent); }
00039
00040
00041 void Initialise(const Vec3& v3NewCenter, const Vec3& v3NewExtent);
00042 void InitialiseToFit2Points(const Vec3& v3A, const Vec3& v3B);
00043 void Clear();
00044
00045
00046 AABB& operator += (const AABB& aabb);
00047 AABB operator + (const AABB& aabb) const;
00048 AABB operator * (const MFrame& mFrame) const;
00049 AABB operator * (float fValue) const;
00050
00051
00052 bool Intersects(const AABB& aabb) const;
00053 bool Intersects(const Vec3& v3Point) const;
00054 bool IsInside(const AABB& aabb) const;
00055 void ExpandToFit(const Vec3& v3Point);
00056 TA_OBFUSCATION_RESERVED_OFF
00057 };
00058
00059 }
00060
00061 #include "AABB.inl"
00062
00063 #endif // TA_AABB_H
© Copyright 2004-2006 TRUE AXIS PTY LTD Australia. All rights reserved.