2015-09-30 02:56:11 +02:00
|
|
|
#include "Base/AABB.hpp"
|
|
|
|
#include "Base/Vector4.hpp"
|
|
|
|
#include "Base/Shared.hpp"
|
|
|
|
#include "Register.hpp"
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
namespace SqMod {
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
const AABB AABB::NIL = AABB(0);
|
|
|
|
const AABB AABB::MIN = AABB(-1, -1, -1, 1, 1, 1);
|
|
|
|
const AABB AABB::MAX = AABB(Vector3::MIN, Vector3::MAX);
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
SQChar AABB::Delim = ',';
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB::AABB()
|
2015-09-30 02:56:11 +02:00
|
|
|
: min(-1), max(1)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB::AABB(Value s)
|
2015-09-30 02:56:11 +02:00
|
|
|
: min(-s), max(std::fabs(s))
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB::AABB(Value xv, Value yv, Value zv)
|
2015-09-30 02:56:11 +02:00
|
|
|
: min(-xv, -yv, -zv), max(std::fabs(xv), std::fabs(yv), std::fabs(zv))
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB::AABB(Value xmin, Value ymin, Value zmin, Value xmax, Value ymax, Value zmax)
|
2015-09-30 02:56:11 +02:00
|
|
|
: min(xmin, ymin, zmin), max(xmax, ymax, zmax)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB::AABB(const Vector3 & v)
|
2015-09-30 02:56:11 +02:00
|
|
|
: min(-v), max(v.Abs())
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB::AABB(const Vector3 & vmin, const Vector3 & vmax)
|
2015-09-30 02:56:11 +02:00
|
|
|
: min(vmin), max(vmax)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB::AABB(const Vector4 & v)
|
2015-09-30 02:56:11 +02:00
|
|
|
: min(-v), max(v.Abs())
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB::AABB(const Vector4 & vmin, const Vector4 & vmax)
|
2015-09-30 02:56:11 +02:00
|
|
|
: min(vmin), max(vmax)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB::AABB(const SQChar * values, SQChar delim)
|
2015-09-30 02:56:11 +02:00
|
|
|
: AABB(GetAABB(values, delim))
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB::AABB(const AABB & b)
|
2015-09-30 02:56:11 +02:00
|
|
|
: min(b.min), max(b.max)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB::AABB(AABB && b)
|
2015-09-30 02:56:11 +02:00
|
|
|
: min(b.min), max(b.max)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
AABB::~AABB()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB & AABB::operator = (const AABB & b)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min = b.min;
|
|
|
|
max = b.max;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB & AABB::operator = (AABB && b)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min = b.min;
|
|
|
|
max = b.max;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB & AABB::operator = (Value s)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min.Set(-s);
|
|
|
|
max.Set(std::fabs(s));
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB & AABB::operator = (const Vector3 & v)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min.Set(-v);
|
|
|
|
max.Set(v.Abs());
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB & AABB::operator = (const Vector4 & v)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min.Set(-v);
|
|
|
|
max.Set(v.Abs());
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB & AABB::operator += (const AABB & b)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min += b.min;
|
|
|
|
max += b.max;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB & AABB::operator -= (const AABB & b)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min -= b.min;
|
|
|
|
max -= b.max;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB & AABB::operator *= (const AABB & b)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min *= b.min;
|
|
|
|
max *= b.max;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB & AABB::operator /= (const AABB & b)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min /= b.min;
|
|
|
|
max /= b.max;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB & AABB::operator %= (const AABB & b)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min %= b.min;
|
|
|
|
max %= b.max;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB & AABB::operator += (Value s)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min += s;
|
|
|
|
max += s;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB & AABB::operator -= (Value s)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min -= s;
|
|
|
|
max -= s;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB & AABB::operator *= (Value s)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min *= s;
|
|
|
|
max *= s;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB & AABB::operator /= (Value s)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min /= s;
|
|
|
|
max /= s;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB & AABB::operator %= (Value s)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min %= s;
|
|
|
|
max %= s;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB & AABB::operator ++ ()
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
++min;
|
|
|
|
++max;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB & AABB::operator -- ()
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
--min;
|
|
|
|
--max;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB AABB::operator ++ (int)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
AABB state(*this);
|
|
|
|
++min;
|
|
|
|
++max;
|
|
|
|
return state;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB AABB::operator -- (int)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
AABB state(*this);
|
|
|
|
--min;
|
|
|
|
--max;
|
|
|
|
return state;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB AABB::operator + (const AABB & b) const
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
return AABB(min + b.min, max + b.max);
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB AABB::operator - (const AABB & b) const
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
return AABB(min - b.min, max - b.max);
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB AABB::operator * (const AABB & b) const
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
return AABB(min * b.min, max * b.max);
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB AABB::operator / (const AABB & b) const
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
return AABB(min / b.min, max / b.max);
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB AABB::operator % (const AABB & b) const
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
return AABB(min % b.min, max % b.max);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB AABB::operator + (Value s) const
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
return AABB(min + s, max + s);
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB AABB::operator - (Value s) const
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
return AABB(min - s, max - s);
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB AABB::operator * (Value s) const
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
return AABB(min * s, max * s);
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB AABB::operator / (Value s) const
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
return AABB(min / s, max / s);
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB AABB::operator % (Value s) const
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
return AABB(min % s, max % s);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB AABB::operator + () const
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
return AABB(min.Abs(), max.Abs());
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB AABB::operator - () const
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
return AABB(-min, -max);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
bool AABB::operator == (const AABB & b) const
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
return (min == b.min) && (max == b.max);
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
bool AABB::operator != (const AABB & b) const
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
return (min != b.min) && (max != b.max);
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
bool AABB::operator < (const AABB & b) const
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
return (min < b.min) && (max < b.max);
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
bool AABB::operator > (const AABB & b) const
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
return (min > b.min) && (max > b.max);
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
bool AABB::operator <= (const AABB & b) const
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
return (min <= b.min) && (max <= b.max);
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
bool AABB::operator >= (const AABB & b) const
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
return (min >= b.min) && (max >= b.max);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
SQInteger AABB::Cmp(const AABB & b) const
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
return *this == b ? 0 : (*this > b ? 1 : -1);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
const SQChar * AABB::ToString() const
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
return ToStringF("%f,%f,%f,%f,%f,%f", min.x, min.y, min.z, max.x, max.y, max.z);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void AABB::Set(Value ns)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min = -ns;
|
|
|
|
max = std::fabs(ns);
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
void AABB::Set(Value nx, Value ny, Value nz)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min.Set(-nx, -ny, -nz);
|
|
|
|
max.Set(std::fabs(nx), std::fabs(ny), std::fabs(nz));
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
void AABB::Set(Value xmin, Value ymin, Value zmin, Value xmax, Value ymax, Value zmax)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min.Set(xmin, ymin, zmin);
|
|
|
|
max.Set(xmax, ymax, zmax);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void AABB::Set(const AABB & b)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min = b.min;
|
|
|
|
max = b.max;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void AABB::Set(const Vector3 & v)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min = -v;
|
|
|
|
max = v.Abs();
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
void AABB::Set(const Vector3 & nmin, const Vector3 & nmax)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min = nmin;
|
|
|
|
max = nmax;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void AABB::Set(const Vector4 & v)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min = -v;
|
|
|
|
max = v.Abs();
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
void AABB::Set(const Vector4 & nmin, const Vector4 & nmax)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
min = nmin;
|
|
|
|
max = nmax;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void AABB::Set(const SQChar * values, SQChar delim)
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
Set(GetAABB(values, delim));
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
AABB AABB::Abs() const
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
return AABB(min.Abs(), max.Abs());
|
|
|
|
}
|
|
|
|
|
|
|
|
// ================================================================================================
|
|
|
|
bool Register_AABB(HSQUIRRELVM vm)
|
|
|
|
{
|
|
|
|
LogDbg("Beginning registration of <AABB> type");
|
|
|
|
|
|
|
|
typedef AABB::Value Val;
|
|
|
|
|
|
|
|
Sqrat::RootTable(vm).Bind(_SC("AABB"), Sqrat::Class<AABB>(vm, _SC("AABB"))
|
|
|
|
.Ctor()
|
|
|
|
.Ctor<Val>()
|
|
|
|
.Ctor<Val, Val, Val>()
|
|
|
|
.Ctor<Val, Val, Val, Val, Val, Val>()
|
|
|
|
.Ctor<const Vector3 &, const Vector3 &>()
|
|
|
|
|
|
|
|
.SetStaticValue(_SC("delim"), &AABB::Delim)
|
|
|
|
|
|
|
|
.Var(_SC("min"), &AABB::min)
|
|
|
|
.Var(_SC("max"), &AABB::max)
|
|
|
|
|
|
|
|
.Prop(_SC("abs"), &AABB::Abs)
|
|
|
|
|
|
|
|
.Func(_SC("_tostring"), &AABB::ToString)
|
|
|
|
.Func(_SC("_cmp"), &AABB::Cmp)
|
|
|
|
|
|
|
|
.Func<AABB (AABB::*)(const AABB &) const>(_SC("_add"), &AABB::operator +)
|
|
|
|
.Func<AABB (AABB::*)(const AABB &) const>(_SC("_sub"), &AABB::operator -)
|
|
|
|
.Func<AABB (AABB::*)(const AABB &) const>(_SC("_mul"), &AABB::operator *)
|
|
|
|
.Func<AABB (AABB::*)(const AABB &) const>(_SC("_div"), &AABB::operator /)
|
|
|
|
.Func<AABB (AABB::*)(const AABB &) const>(_SC("_modulo"), &AABB::operator %)
|
|
|
|
.Func<AABB (AABB::*)(void) const>(_SC("_unm"), &AABB::operator -)
|
|
|
|
|
|
|
|
.Overload<void (AABB::*)(Val)>(_SC("set"), &AABB::Set)
|
|
|
|
.Overload<void (AABB::*)(Val, Val, Val)>(_SC("set"), &AABB::Set)
|
|
|
|
.Overload<void (AABB::*)(Val, Val, Val, Val, Val, Val)>(_SC("set"), &AABB::Set)
|
|
|
|
.Overload<void (AABB::*)(const AABB &)>(_SC("set_box"), &AABB::Set)
|
|
|
|
.Overload<void (AABB::*)(const Vector3 &)>(_SC("set_vec3"), &AABB::Set)
|
|
|
|
.Overload<void (AABB::*)(const Vector3 &, const Vector3 &)>(_SC("set_vec3"), &AABB::Set)
|
|
|
|
.Overload<void (AABB::*)(const Vector4 &)>(_SC("set_vec4"), &AABB::Set)
|
|
|
|
.Overload<void (AABB::*)(const Vector4 &, const Vector4 &)>(_SC("set_vec4"), &AABB::Set)
|
|
|
|
.Overload<void (AABB::*)(const SQChar *, SQChar)>(_SC("set_str"), &AABB::Set)
|
|
|
|
|
|
|
|
.Func(_SC("clear"), &AABB::Clear)
|
|
|
|
|
|
|
|
.Func<AABB & (AABB::*)(const AABB &)>(_SC("opAddAssign"), &AABB::operator +=)
|
|
|
|
.Func<AABB & (AABB::*)(const AABB &)>(_SC("opSubAssign"), &AABB::operator -=)
|
|
|
|
.Func<AABB & (AABB::*)(const AABB &)>(_SC("opMulAssign"), &AABB::operator *=)
|
|
|
|
.Func<AABB & (AABB::*)(const AABB &)>(_SC("opDivAssign"), &AABB::operator /=)
|
|
|
|
.Func<AABB & (AABB::*)(const AABB &)>(_SC("opModAssign"), &AABB::operator %=)
|
|
|
|
|
|
|
|
.Func<AABB & (AABB::*)(AABB::Value)>(_SC("opAddAssignS"), &AABB::operator +=)
|
|
|
|
.Func<AABB & (AABB::*)(AABB::Value)>(_SC("opSubAssignS"), &AABB::operator -=)
|
|
|
|
.Func<AABB & (AABB::*)(AABB::Value)>(_SC("opMulAssignS"), &AABB::operator *=)
|
|
|
|
.Func<AABB & (AABB::*)(AABB::Value)>(_SC("opDivAssignS"), &AABB::operator /=)
|
|
|
|
.Func<AABB & (AABB::*)(AABB::Value)>(_SC("opModAssignS"), &AABB::operator %=)
|
|
|
|
|
|
|
|
.Func<AABB & (AABB::*)(void)>(_SC("opPreInc"), &AABB::operator ++)
|
|
|
|
.Func<AABB & (AABB::*)(void)>(_SC("opPreDec"), &AABB::operator --)
|
|
|
|
.Func<AABB (AABB::*)(int)>(_SC("opPostInc"), &AABB::operator ++)
|
|
|
|
.Func<AABB (AABB::*)(int)>(_SC("opPostDec"), &AABB::operator --)
|
|
|
|
|
|
|
|
.Func<AABB (AABB::*)(const AABB &) const>(_SC("opAdd"), &AABB::operator +)
|
|
|
|
.Func<AABB (AABB::*)(AABB::Value) const>(_SC("opAddS"), &AABB::operator +)
|
|
|
|
.Func<AABB (AABB::*)(const AABB &) const>(_SC("opSub"), &AABB::operator -)
|
|
|
|
.Func<AABB (AABB::*)(AABB::Value) const>(_SC("opSubS"), &AABB::operator -)
|
|
|
|
.Func<AABB (AABB::*)(const AABB &) const>(_SC("opMul"), &AABB::operator *)
|
|
|
|
.Func<AABB (AABB::*)(AABB::Value) const>(_SC("opMulS"), &AABB::operator *)
|
|
|
|
.Func<AABB (AABB::*)(const AABB &) const>(_SC("opDiv"), &AABB::operator /)
|
|
|
|
.Func<AABB (AABB::*)(AABB::Value) const>(_SC("opDivS"), &AABB::operator /)
|
|
|
|
.Func<AABB (AABB::*)(const AABB &) const>(_SC("opMod"), &AABB::operator %)
|
|
|
|
.Func<AABB (AABB::*)(AABB::Value) const>(_SC("opModS"), &AABB::operator %)
|
|
|
|
|
|
|
|
.Func<AABB (AABB::*)(void) const>(_SC("opUnPlus"), &AABB::operator +)
|
|
|
|
.Func<AABB (AABB::*)(void) const>(_SC("opUnMinus"), &AABB::operator -)
|
|
|
|
|
|
|
|
.Func<bool (AABB::*)(const AABB &) const>(_SC("opEqual"), &AABB::operator ==)
|
|
|
|
.Func<bool (AABB::*)(const AABB &) const>(_SC("opNotEqual"), &AABB::operator !=)
|
|
|
|
.Func<bool (AABB::*)(const AABB &) const>(_SC("opLessThan"), &AABB::operator <)
|
|
|
|
.Func<bool (AABB::*)(const AABB &) const>(_SC("opGreaterThan"), &AABB::operator >)
|
|
|
|
.Func<bool (AABB::*)(const AABB &) const>(_SC("opLessEqual"), &AABB::operator <=)
|
|
|
|
.Func<bool (AABB::*)(const AABB &) const>(_SC("opGreaterEqual"), &AABB::operator >=)
|
|
|
|
);
|
|
|
|
|
|
|
|
LogDbg("Registration of <AABB> type was successful");
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // Namespace:: SqMod
|