120#ifdef ALLOW_TEMPORARIES
149 for (i=1; i<8; i++) {
150 if (realmin.
X >= pts[i].
X) realmin.
X = pts[i].
X;
151 if (realmin.
Y >= pts[i].
Y) realmin.
Y = pts[i].
Y;
152 if (realmin.
Z >= pts[i].
Z) realmin.
Z = pts[i].
Z;
154 if (realmax.
X <= pts[i].
X) realmax.
X = pts[i].
X;
155 if (realmax.
Y <= pts[i].
Y) realmax.
Y = pts[i].
Y;
156 if (realmax.
Z <= pts[i].
Z) realmax.
Z = pts[i].
Z;
166 float tmp,minx,miny,maxx,maxy;
173 tmp =
Box.Center.X;
Box.Center.X = -
Box.Center.Y;
Box.Center.Y = tmp;
177 tmp =
Box.Extent.X;
Box.Extent.X =
Box.Extent.Y;
Box.Extent.Y = tmp;
189 Box.Center.X = -
Box.Center.X;
190 Box.Center.Y = -
Box.Center.Y;
204 tmp =
Box.Center.X;
Box.Center.X =
Box.Center.Y;
Box.Center.Y = -tmp;
208 tmp =
Box.Extent.X;
Box.Extent.X =
Box.Extent.Y;
Box.Extent.Y = tmp;
221 assert((
Box.Center - realcenter).Length() < 0.001f);
222 assert((
SweepMin - realmin).Length() < 0.001f);
223 assert((
SweepMax - realmax).Length() < 0.001f);
264 for (i=1; i<8; i++) {
265 if (realmin.
X >= pts[i].
X) realmin.
X = pts[i].
X;
266 if (realmin.
Y >= pts[i].
Y) realmin.
Y = pts[i].
Y;
267 if (realmin.
Z >= pts[i].
Z) realmin.
Z = pts[i].
Z;
269 if (realmax.
X <= pts[i].
X) realmax.
X = pts[i].
X;
270 if (realmax.
Y <= pts[i].
Y) realmax.
Y = pts[i].
Y;
271 if (realmax.
Z <= pts[i].
Z) realmax.
Z = pts[i].
Z;
307 Vector3 endmin =
Box.Center + move - max_extent;
308 Vector3 endmax =
Box.Center + move + max_extent;
void Transform(const Matrix3D &tm)
AABoxCollisionTestClass(const AABoxClass &aabox, const Vector3 &move, CastResultStruct *res, int collision_type=COLL_TYPE_0)
bool Cull(const Vector3 &min, const Vector3 &max)
void Rotate(ROTATION_TYPE rotation)
CollisionTestClass(CastResultStruct *res, int collision_type)
static const Matrix3D RotateZ90
static const Matrix3D RotateZ270
void mulVector3Array(const Vector3 *in, Vector3 *out, int count) const
Vector3 Rotate_Vector(const Vector3 &vect) const
void mulVector3(const Vector3 &in, Vector3 &out) const
static WWINLINE void Transform_Vector(const Matrix3D &tm, const Vector3 &in, Vector3 *out)
void Transform_Min_Max_AABox(const Vector3 &min, const Vector3 &max, Vector3 *set_min, Vector3 *set_max) const
static const Matrix3D RotateZ180
void Transform_Center_Extent_AABox(const Vector3 ¢er, const Vector3 &extent, Vector3 *set_center, Vector3 *set_extent) const
static void Transform(const Matrix3D &tm, const OBBoxClass &in, OBBoxClass *out)
bool Cull(const Vector3 &min, const Vector3 &max)
OBBoxCollisionTestClass(const OBBoxClass &obbox, const Vector3 &move, CastResultStruct *res, int type=COLL_TYPE_0)
static WWINLINE void Subtract(const Vector3 &a, const Vector3 &b, Vector3 *c)
static WWINLINE void Add(const Vector3 &a, const Vector3 &b, Vector3 *c)
WWINLINE void Set(float x, float y, float z)
static WWINLINE float Fabs(float val)