2015-11-11 07:57:26 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-09-30 02:56:11 +02:00
|
|
|
#include "Entity/Object.hpp"
|
2016-02-20 23:25:00 +01:00
|
|
|
#include "Entity/Player.hpp"
|
2015-10-29 21:10:36 +01:00
|
|
|
#include "Base/Quaternion.hpp"
|
2016-02-20 23:25:00 +01:00
|
|
|
#include "Base/Vector3.hpp"
|
2016-04-14 02:08:06 +02:00
|
|
|
#include "Base/Stack.hpp"
|
2015-11-01 00:31:57 +01:00
|
|
|
#include "Core.hpp"
|
2015-09-30 02:56:11 +02:00
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
namespace SqMod {
|
|
|
|
|
2015-10-29 21:10:36 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
Vector3 CObject::s_Vector3;
|
|
|
|
Quaternion CObject::s_Quaternion;
|
|
|
|
|
2015-11-01 00:31:57 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-03-10 04:57:13 +01:00
|
|
|
const Int32 CObject::Max = SQMOD_OBJECT_POOL;
|
2016-02-20 23:25:00 +01:00
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-03-10 04:57:13 +01:00
|
|
|
SQInteger CObject::Typename(HSQUIRRELVM vm)
|
|
|
|
{
|
2016-05-22 05:20:38 +02:00
|
|
|
static const SQChar name[] = _SC("SqObject");
|
2016-03-10 04:57:13 +01:00
|
|
|
sq_pushstring(vm, name, sizeof(name));
|
|
|
|
return 1;
|
|
|
|
}
|
2016-02-20 23:25:00 +01:00
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
CObject::CObject(Int32 id)
|
|
|
|
: m_ID(VALID_ENTITYGETEX(id, SQMOD_OBJECT_POOL))
|
2016-05-22 05:20:38 +02:00
|
|
|
, m_Tag(ToStrF("%d", id)), m_Data()
|
|
|
|
, mMoveToDuration(0)
|
|
|
|
, mMoveByDuration(0)
|
|
|
|
, mRotateToDuration(0)
|
|
|
|
, mRotateByDuration(0)
|
|
|
|
, mRotateToEulerDuration(0)
|
|
|
|
, mRotateByEulerDuration(0)
|
2015-11-01 00:31:57 +01:00
|
|
|
{
|
|
|
|
/* ... */
|
|
|
|
}
|
2015-10-29 21:10:36 +01:00
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
CObject::~CObject()
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-02-20 23:25:00 +01:00
|
|
|
/* ... */
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
Int32 CObject::Cmp(const CObject & o) const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-02-20 23:25:00 +01:00
|
|
|
if (m_ID == o.m_ID)
|
2016-05-22 05:20:38 +02:00
|
|
|
{
|
2016-02-20 23:25:00 +01:00
|
|
|
return 0;
|
2016-05-22 05:20:38 +02:00
|
|
|
}
|
2016-02-20 23:25:00 +01:00
|
|
|
else if (m_ID > o.m_ID)
|
2016-05-22 05:20:38 +02:00
|
|
|
{
|
2016-02-20 23:25:00 +01:00
|
|
|
return 1;
|
2016-05-22 05:20:38 +02:00
|
|
|
}
|
2015-10-29 21:10:36 +01:00
|
|
|
else
|
2016-05-22 05:20:38 +02:00
|
|
|
{
|
2016-02-20 23:25:00 +01:00
|
|
|
return -1;
|
2016-05-22 05:20:38 +02:00
|
|
|
}
|
2016-02-20 23:25:00 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
const String & CObject::ToString() const
|
2016-02-20 23:25:00 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
return m_Tag;
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-03-10 04:57:13 +01:00
|
|
|
const String & CObject::GetTag() const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
return m_Tag;
|
2016-02-20 23:25:00 +01:00
|
|
|
}
|
2015-10-29 21:10:36 +01:00
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
void CObject::SetTag(CSStr tag)
|
|
|
|
{
|
|
|
|
m_Tag.assign(tag);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
Object & CObject::GetData()
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Return the requested information
|
|
|
|
return m_Data;
|
2016-02-20 23:25:00 +01:00
|
|
|
}
|
2015-10-29 21:10:36 +01:00
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
void CObject::SetData(Object & data)
|
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Apply the specified value
|
|
|
|
m_Data = data;
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
bool CObject::Destroy(Int32 header, Object & payload)
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
2016-05-22 05:20:38 +02:00
|
|
|
return Core::Get().DelObject(m_ID, header, payload);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-03-10 04:57:13 +01:00
|
|
|
void CObject::BindEvent(Int32 evid, Object & env, Function & func) const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Obtain the function instance called for this event
|
2016-05-22 05:20:38 +02:00
|
|
|
Function & event = Core::Get().GetObjectEvent(m_ID, evid);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Is the specified callback function null?
|
2016-02-20 23:25:00 +01:00
|
|
|
if (func.IsNull())
|
2016-03-12 21:51:44 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
event.Release(); // Then release the current callback
|
2016-03-12 21:51:44 +01:00
|
|
|
}
|
2016-05-24 06:29:14 +02:00
|
|
|
// Does this function need a custom environment?
|
|
|
|
else if (env.IsNull())
|
|
|
|
{
|
|
|
|
event = func;
|
|
|
|
}
|
2016-03-10 04:57:13 +01:00
|
|
|
// Assign the specified environment and function
|
2015-10-29 21:10:36 +01:00
|
|
|
else
|
2016-03-12 21:51:44 +01:00
|
|
|
{
|
2016-02-20 23:25:00 +01:00
|
|
|
event = Function(env.GetVM(), env, func.GetFunc());
|
2016-03-12 21:51:44 +01:00
|
|
|
}
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
bool CObject::IsStreamedFor(CPlayer & player) const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Is the specified player even valid?
|
2016-02-20 23:25:00 +01:00
|
|
|
if (!player.IsActive())
|
2016-03-12 21:51:44 +01:00
|
|
|
{
|
2016-03-21 21:37:58 +01:00
|
|
|
STHROWF("Invalid player argument: null");
|
2016-03-12 21:51:44 +01:00
|
|
|
}
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Return the requested information
|
|
|
|
return _Func->IsObjectStreamedForPlayer(m_ID, player.GetID());
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
Int32 CObject::GetModel() const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Return the requested information
|
|
|
|
return _Func->GetObjectModel(m_ID);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
Int32 CObject::GetWorld() const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Return the requested information
|
|
|
|
return _Func->GetObjectWorld(m_ID);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
void CObject::SetWorld(Int32 world) const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->SetObjectWorld(m_ID, world);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
Int32 CObject::GetAlpha() const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Return the requested information
|
|
|
|
return _Func->GetObjectAlpha(m_ID);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
void CObject::SetAlpha(Int32 alpha) const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->SetObjectAlpha(m_ID, alpha, 0);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
void CObject::SetAlphaEx(Int32 alpha, Uint32 time) const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->SetObjectAlpha(m_ID, alpha, time);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
void CObject::MoveTo(const Vector3 & pos, Uint32 time) const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->MoveObjectTo(m_ID, pos.x, pos.y, pos.z, time);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
void CObject::MoveToEx(Float32 x, Float32 y, Float32 z, Uint32 time) const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->MoveObjectTo(m_ID, x, y, z, time);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
void CObject::MoveBy(const Vector3 & pos, Uint32 time) const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->MoveObjectBy(m_ID, pos.x, pos.y, pos.z, time);
|
2016-02-20 23:25:00 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
void CObject::MoveByEx(Float32 x, Float32 y, Float32 z, Uint32 time) const
|
2016-02-20 23:25:00 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->MoveObjectBy(m_ID, x, y, z, time);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
const Vector3 & CObject::GetPosition()
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2016-05-22 05:20:38 +02:00
|
|
|
// Clear previous information, if any
|
2015-10-29 21:10:36 +01:00
|
|
|
s_Vector3.Clear();
|
2016-05-22 05:20:38 +02:00
|
|
|
// Query the server for the values
|
|
|
|
_Func->GetObjectPosition(m_ID, &s_Vector3.x, &s_Vector3.y, &s_Vector3.z);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2015-10-29 21:10:36 +01:00
|
|
|
return s_Vector3;
|
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CObject::SetPosition(const Vector3 & pos) const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->SetObjectPosition(m_ID, pos.x, pos.y, pos.z);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
void CObject::SetPositionEx(Float32 x, Float32 y, Float32 z) const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->SetObjectPosition(m_ID, x, y, z);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
void CObject::RotateTo(const Quaternion & rot, Uint32 time) const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->RotateObjectTo(m_ID, rot.x, rot.y, rot.z, rot.w, time);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
void CObject::RotateToEx(Float32 x, Float32 y, Float32 z, Float32 w, Uint32 time) const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->RotateObjectTo(m_ID, x, y, z, w, time);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
void CObject::RotateToEuler(const Vector3 & rot, Uint32 time) const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->RotateObjectToEuler(m_ID, rot.x, rot.y, rot.z, time);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
void CObject::RotateToEulerEx(Float32 x, Float32 y, Float32 z, Uint32 time) const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->RotateObjectToEuler(m_ID, x, y, z, time);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
void CObject::RotateBy(const Quaternion & rot, Uint32 time) const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->RotateObjectBy(m_ID, rot.x, rot.y, rot.z, rot.w, time);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
void CObject::RotateByEx(Float32 x, Float32 y, Float32 z, Float32 w, Uint32 time) const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->RotateObjectBy(m_ID, x, y, z, w, time);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
void CObject::RotateByEuler(const Vector3 & rot, Uint32 time) const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->RotateObjectByEuler(m_ID, rot.x, rot.y, rot.z, time);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
void CObject::RotateByEulerEx(Float32 x, Float32 y, Float32 z, Uint32 time) const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->RotateObjectByEuler(m_ID, x, y, z, time);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
const Quaternion & CObject::GetRotation()
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2016-05-22 05:20:38 +02:00
|
|
|
// Clear previous information, if any
|
2015-10-29 21:10:36 +01:00
|
|
|
s_Quaternion.Clear();
|
2016-05-22 05:20:38 +02:00
|
|
|
// Query the server for the values
|
|
|
|
_Func->GetObjectRotation(m_ID, &s_Quaternion.x, &s_Quaternion.y, &s_Quaternion.z, &s_Quaternion.w);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2015-10-29 21:10:36 +01:00
|
|
|
return s_Quaternion;
|
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
const Vector3 & CObject::GetRotationEuler()
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2016-05-22 05:20:38 +02:00
|
|
|
// Clear previous information, if any
|
2015-10-29 21:10:36 +01:00
|
|
|
s_Vector3.Clear();
|
2016-05-22 05:20:38 +02:00
|
|
|
// Query the server for the values
|
|
|
|
_Func->GetObjectRotationEuler(m_ID, &s_Vector3.x, &s_Vector3.y, &s_Vector3.z);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2015-10-29 21:10:36 +01:00
|
|
|
return s_Vector3;
|
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
bool CObject::GetShotReport() const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Return the requested information
|
2016-05-22 05:20:38 +02:00
|
|
|
return _Func->IsObjectShotReportEnabled(m_ID);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
void CObject::SetShotReport(bool toggle) const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->SetObjectShotReportEnabled(m_ID, toggle);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
bool CObject::GetTouchedReport() const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Return the requested information
|
2016-05-22 05:20:38 +02:00
|
|
|
return _Func->IsObjectTouchedReportEnabled(m_ID);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
void CObject::SetTouchedReport(bool toggle) const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->SetObjectTouchedReportEnabled(m_ID, toggle);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2015-11-01 00:31:57 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
Float32 CObject::GetPositionX() const
|
2015-11-01 00:31:57 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2016-05-22 05:20:38 +02:00
|
|
|
// Clear previous information, if any
|
|
|
|
s_Vector3.x = 0.0f;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Query the server for the requested component value
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->GetObjectPosition(m_ID, &s_Vector3.x, nullptr, nullptr);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2016-02-20 23:25:00 +01:00
|
|
|
return s_Vector3.x;
|
2015-11-01 00:31:57 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
Float32 CObject::GetPositionY() const
|
2015-11-01 00:31:57 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2016-05-22 05:20:38 +02:00
|
|
|
// Clear previous information, if any
|
|
|
|
s_Vector3.y = 0.0f;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Query the server for the requested component value
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->GetObjectPosition(m_ID, nullptr, &s_Vector3.y, nullptr);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2016-02-20 23:25:00 +01:00
|
|
|
return s_Vector3.y;
|
2015-11-01 00:31:57 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
Float32 CObject::GetPositionZ() const
|
2015-11-01 00:31:57 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2016-05-22 05:20:38 +02:00
|
|
|
// Clear previous information, if any
|
|
|
|
s_Vector3.z = 0.0f;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Query the server for the requested component value
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->GetObjectPosition(m_ID, nullptr, nullptr, &s_Vector3.z);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2016-02-20 23:25:00 +01:00
|
|
|
return s_Vector3.z;
|
2015-11-01 00:31:57 +01:00
|
|
|
}
|
|
|
|
|
2016-02-20 23:25:00 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
void CObject::SetPositionX(Float32 x) const
|
2015-11-01 00:31:57 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Retrieve the current values for unchanged components
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->GetObjectPosition(m_ID, nullptr, &s_Vector3.y, &s_Vector3.z);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Perform the requested operation
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->SetObjectPosition(m_ID, x, s_Vector3.y, s_Vector3.z);
|
2015-11-01 00:31:57 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
void CObject::SetPositionY(Float32 y) const
|
2015-11-01 00:31:57 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Retrieve the current values for unchanged components
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->GetObjectPosition(m_ID, &s_Vector3.x, nullptr, &s_Vector3.z);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Perform the requested operation
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->SetObjectPosition(m_ID, s_Vector3.x, y, s_Vector3.z);
|
2015-11-01 00:31:57 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
void CObject::SetPositionZ(Float32 z) const
|
2015-11-01 00:31:57 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Retrieve the current values for unchanged components
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->GetObjectPosition(m_ID, &s_Vector3.x, &s_Vector3.y, nullptr);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Perform the requested operation
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->SetObjectPosition(m_ID, s_Vector3.z, s_Vector3.y, z);
|
2015-11-01 00:31:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
Float32 CObject::GetRotationX() const
|
2015-11-01 00:31:57 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2016-05-22 05:20:38 +02:00
|
|
|
// Clear previous information, if any
|
|
|
|
s_Quaternion.x = 0.0f;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Query the server for the requested component value
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->GetObjectRotation(m_ID, &s_Quaternion.x, nullptr, nullptr, nullptr);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2016-02-20 23:25:00 +01:00
|
|
|
return s_Quaternion.x;
|
2015-11-01 00:31:57 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
Float32 CObject::GetRotationY() const
|
2015-11-01 00:31:57 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2016-05-22 05:20:38 +02:00
|
|
|
// Clear previous information, if any
|
|
|
|
s_Quaternion.y = 0.0f;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Query the server for the requested component value
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->GetObjectRotation(m_ID, nullptr, &s_Quaternion.y, nullptr, nullptr);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2016-02-20 23:25:00 +01:00
|
|
|
return s_Quaternion.y;
|
2015-11-01 00:31:57 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
Float32 CObject::GetRotationZ() const
|
2015-11-01 00:31:57 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2016-05-22 05:20:38 +02:00
|
|
|
// Clear previous information, if any
|
|
|
|
s_Quaternion.z = 0.0f;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Query the server for the requested component value
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->GetObjectRotation(m_ID, nullptr, nullptr, &s_Quaternion.z, nullptr);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2016-02-20 23:25:00 +01:00
|
|
|
return s_Quaternion.z;
|
2015-11-01 00:31:57 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
Float32 CObject::GetRotationW() const
|
2015-11-01 00:31:57 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2016-05-22 05:20:38 +02:00
|
|
|
// Clear previous information, if any
|
|
|
|
s_Quaternion.w = 0.0f;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Query the server for the requested component value
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->GetObjectRotation(m_ID, nullptr, nullptr, nullptr, &s_Quaternion.w);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2016-02-20 23:25:00 +01:00
|
|
|
return s_Quaternion.w;
|
2015-11-01 00:31:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
Float32 CObject::GetEulerRotationX() const
|
2015-11-01 00:31:57 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2016-05-22 05:20:38 +02:00
|
|
|
// Clear previous information, if any
|
|
|
|
s_Vector3.x = 0.0f;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Query the server for the requested component value
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->GetObjectRotationEuler(m_ID, &s_Vector3.x, nullptr, nullptr);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2016-02-20 23:25:00 +01:00
|
|
|
return s_Vector3.x;
|
2015-11-01 00:31:57 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
Float32 CObject::GetEulerRotationY() const
|
2015-11-01 00:31:57 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2016-05-22 05:20:38 +02:00
|
|
|
// Clear previous information, if any
|
|
|
|
s_Vector3.y = 0.0f;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Query the server for the requested component value
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->GetObjectRotationEuler(m_ID, nullptr, &s_Vector3.y, nullptr);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2016-02-20 23:25:00 +01:00
|
|
|
return s_Vector3.y;
|
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
Float32 CObject::GetEulerRotationZ() const
|
2016-02-20 23:25:00 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2016-05-22 05:20:38 +02:00
|
|
|
// Clear previous information, if any
|
|
|
|
s_Vector3.z = 0.0f;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Query the server for the requested component value
|
2016-05-22 05:20:38 +02:00
|
|
|
_Func->GetObjectRotationEuler(m_ID, nullptr, nullptr, &s_Vector3.z);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2016-02-20 23:25:00 +01:00
|
|
|
return s_Vector3.z;
|
2015-11-01 00:31:57 +01:00
|
|
|
}
|
|
|
|
|
2016-05-22 05:20:38 +02:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::MoveToX(Float32 x) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Clear previous information, if any
|
|
|
|
s_Vector3.Clear();
|
|
|
|
// Retrieve the current values for unchanged components
|
|
|
|
_Func->GetObjectPosition(m_ID, nullptr, &s_Vector3.y, &s_Vector3.z);
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->MoveObjectTo(m_ID, x, s_Vector3.y, s_Vector3.z, mMoveToDuration);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::MoveToY(Float32 y) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Clear previous information, if any
|
|
|
|
s_Vector3.Clear();
|
|
|
|
// Retrieve the current values for unchanged components
|
|
|
|
_Func->GetObjectPosition(m_ID, &s_Vector3.x, nullptr, &s_Vector3.z);
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->MoveObjectTo(m_ID, s_Vector3.x, y, s_Vector3.z, mMoveToDuration);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::MoveToZ(Float32 z) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Clear previous information, if any
|
|
|
|
s_Vector3.Clear();
|
|
|
|
// Retrieve the current values for unchanged components
|
|
|
|
_Func->GetObjectPosition(m_ID, &s_Vector3.x, &s_Vector3.y, nullptr);
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->MoveObjectTo(m_ID, s_Vector3.z, s_Vector3.y, z, mMoveToDuration);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::MoveByX(Float32 x) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->MoveObjectBy(m_ID, x, 0.0f, 0.0f, mMoveByDuration);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::MoveByY(Float32 y) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->MoveObjectBy(m_ID, 0.0f, y, 0.0f, mMoveByDuration);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::MoveByZ(Float32 z) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->MoveObjectBy(m_ID, 0.0f, 0.0f, z, mMoveByDuration);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::RotateToX(Float32 x) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Clear previous information, if any
|
|
|
|
s_Quaternion.Clear();
|
|
|
|
// Retrieve the current values for unchanged components
|
|
|
|
_Func->GetObjectRotation(m_ID, nullptr, &s_Quaternion.y, &s_Quaternion.z, &s_Quaternion.w);
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->RotateObjectTo(m_ID, x, s_Quaternion.y, s_Quaternion.z, s_Quaternion.w, mRotateToDuration);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::RotateToY(Float32 y) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Clear previous information, if any
|
|
|
|
s_Quaternion.Clear();
|
|
|
|
// Retrieve the current values for unchanged components
|
|
|
|
_Func->GetObjectRotation(m_ID, &s_Quaternion.x, nullptr, &s_Quaternion.z, &s_Quaternion.w);
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->RotateObjectTo(m_ID, s_Quaternion.x, y, s_Quaternion.z, s_Quaternion.w, mRotateToDuration);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::RotateToZ(Float32 z) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Clear previous information, if any
|
|
|
|
s_Quaternion.Clear();
|
|
|
|
// Retrieve the current values for unchanged components
|
|
|
|
_Func->GetObjectRotation(m_ID, &s_Quaternion.x, &s_Quaternion.y, nullptr, &s_Quaternion.w);
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->RotateObjectTo(m_ID, s_Quaternion.x, s_Quaternion.y, z, s_Quaternion.w, mRotateToDuration);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::RotateToW(Float32 w) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Clear previous information, if any
|
|
|
|
s_Quaternion.Clear();
|
|
|
|
// Retrieve the current values for unchanged components
|
|
|
|
_Func->GetObjectRotation(m_ID, &s_Quaternion.x, &s_Quaternion.y, &s_Quaternion.z, nullptr);
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->RotateObjectTo(m_ID, s_Quaternion.x, s_Quaternion.y, s_Quaternion.z, w, mRotateToDuration);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::RotateByX(Float32 x) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->RotateObjectBy(m_ID, x, 0.0f, 0.0f, 0.0f, mRotateByDuration);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::RotateByY(Float32 y) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->RotateObjectBy(m_ID, 0.0f, y, 0.0f, 0.0f, mRotateByDuration);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::RotateByZ(Float32 z) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->RotateObjectBy(m_ID, 0.0f, 0.0f, z, 0.0f, mRotateByDuration);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::RotateByW(Float32 w) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->RotateObjectBy(m_ID, 0.0f, 0.0f, 0.0f, w, mRotateByDuration);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::RotateToEulerX(Float32 x) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Clear previous information, if any
|
|
|
|
s_Vector3.Clear();
|
|
|
|
// Retrieve the current values for unchanged components
|
|
|
|
_Func->GetObjectRotationEuler(m_ID, nullptr, &s_Vector3.y, &s_Vector3.z);
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->RotateObjectToEuler(m_ID, x, s_Vector3.y, s_Vector3.z, mRotateToEulerDuration);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::RotateToEulerY(Float32 y) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Clear previous information, if any
|
|
|
|
s_Vector3.Clear();
|
|
|
|
// Retrieve the current values for unchanged components
|
|
|
|
_Func->GetObjectRotationEuler(m_ID, &s_Vector3.x, nullptr, &s_Vector3.z);
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->RotateObjectToEuler(m_ID, s_Vector3.x, y, s_Vector3.z, mRotateToEulerDuration);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::RotateToEulerZ(Float32 z) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Clear previous information, if any
|
|
|
|
s_Vector3.Clear();
|
|
|
|
// Retrieve the current values for unchanged components
|
|
|
|
_Func->GetObjectRotationEuler(m_ID, &s_Vector3.x, &s_Vector3.y, nullptr);
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->RotateObjectToEuler(m_ID, s_Vector3.z, s_Vector3.y, z, mRotateToEulerDuration);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::RotateByEulerX(Float32 x) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->RotateObjectByEuler(m_ID, x, 0.0f, 0.0f, mRotateByEulerDuration);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::RotateByEulerY(Float32 y) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->RotateObjectByEuler(m_ID, 0.0f, y, 0.0f, mRotateByEulerDuration);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::RotateByEulerZ(Float32 z) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perform the requested operation
|
|
|
|
_Func->RotateObjectByEuler(m_ID, 0.0f, 0.0f, z, mRotateByEulerDuration);
|
|
|
|
}
|
|
|
|
|
2015-11-01 00:31:57 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-03-10 04:57:13 +01:00
|
|
|
static Object & Object_CreateEx(Int32 model, Int32 world, Float32 x, Float32 y, Float32 z,
|
2016-02-20 23:25:00 +01:00
|
|
|
Int32 alpha)
|
2015-11-01 00:31:57 +01:00
|
|
|
{
|
2016-05-22 05:20:38 +02:00
|
|
|
return Core::Get().NewObject(model, world, x, y, z, alpha, SQMOD_CREATE_DEFAULT, NullObject());
|
2015-11-01 00:31:57 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
static Object & Object_CreateEx(Int32 model, Int32 world, Float32 x, Float32 y, Float32 z,
|
2016-02-20 23:25:00 +01:00
|
|
|
Int32 alpha, Int32 header, Object & payload)
|
2015-11-01 00:31:57 +01:00
|
|
|
{
|
2016-05-22 05:20:38 +02:00
|
|
|
return Core::Get().NewObject(model, world, x, y, z, alpha, header, payload);
|
2015-11-01 00:31:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-03-10 04:57:13 +01:00
|
|
|
static Object & Object_Create(Int32 model, Int32 world, const Vector3 & pos, Int32 alpha)
|
2015-11-01 00:31:57 +01:00
|
|
|
{
|
2016-05-22 05:20:38 +02:00
|
|
|
return Core::Get().NewObject(model, world, pos.x, pos.y, pos.z, alpha,
|
2016-02-20 23:25:00 +01:00
|
|
|
SQMOD_CREATE_DEFAULT, NullObject());
|
2015-11-01 00:31:57 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
static Object & Object_Create(Int32 model, Int32 world, const Vector3 & pos, Int32 alpha,
|
2016-02-20 23:25:00 +01:00
|
|
|
Int32 header, Object & payload)
|
2015-11-01 00:31:57 +01:00
|
|
|
{
|
2016-05-22 05:20:38 +02:00
|
|
|
return Core::Get().NewObject(model, world, pos.x, pos.y, pos.z, alpha, header, payload);
|
2015-11-01 00:31:57 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 05:18:39 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
static const Object & Object_FindByID(Int32 id)
|
|
|
|
{
|
|
|
|
// Perform a range check on the specified identifier
|
|
|
|
if (INVALID_ENTITYEX(id, SQMOD_OBJECT_POOL))
|
2016-03-12 21:51:44 +01:00
|
|
|
{
|
2016-03-21 21:37:58 +01:00
|
|
|
STHROWF("The specified object identifier is invalid: %d", id);
|
2016-03-12 21:51:44 +01:00
|
|
|
}
|
2016-03-10 05:18:39 +01:00
|
|
|
// Obtain the ends of the entity pool
|
2016-05-22 05:20:38 +02:00
|
|
|
Core::Objects::const_iterator itr = Core::Get().GetObjects().cbegin();
|
|
|
|
Core::Objects::const_iterator end = Core::Get().GetObjects().cend();
|
2016-03-10 05:18:39 +01:00
|
|
|
// Process each entity in the pool
|
|
|
|
for (; itr != end; ++itr)
|
|
|
|
{
|
|
|
|
// Does the identifier match the specified one?
|
|
|
|
if (itr->mID == id)
|
2016-03-12 21:51:44 +01:00
|
|
|
{
|
2016-03-10 05:18:39 +01:00
|
|
|
return itr->mObj; // Stop searching and return this entity
|
2016-03-12 21:51:44 +01:00
|
|
|
}
|
2016-03-10 05:18:39 +01:00
|
|
|
}
|
|
|
|
// Unable to locate a object matching the specified identifier
|
|
|
|
return NullObject();
|
|
|
|
}
|
|
|
|
|
2016-03-26 17:16:58 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-03-10 05:18:39 +01:00
|
|
|
static const Object & Object_FindByTag(CSStr tag)
|
|
|
|
{
|
|
|
|
// Perform a validity check on the specified tag
|
2016-03-12 21:51:44 +01:00
|
|
|
if (!tag || *tag == '\0')
|
2016-03-21 21:37:58 +01:00
|
|
|
STHROWF("The specified object tag is invalid: null/empty");
|
2016-03-10 05:18:39 +01:00
|
|
|
// Obtain the ends of the entity pool
|
2016-05-22 05:20:38 +02:00
|
|
|
Core::Objects::const_iterator itr = Core::Get().GetObjects().cbegin();
|
|
|
|
Core::Objects::const_iterator end = Core::Get().GetObjects().cend();
|
2016-03-10 05:18:39 +01:00
|
|
|
// Process each entity in the pool
|
|
|
|
for (; itr != end; ++itr)
|
|
|
|
{
|
|
|
|
// Does this entity even exist and does the tag match the specified one?
|
|
|
|
if (itr->mInst != nullptr && itr->mInst->GetTag().compare(tag) == 0)
|
2016-03-12 21:51:44 +01:00
|
|
|
{
|
2016-03-10 05:18:39 +01:00
|
|
|
return itr->mObj; // Stop searching and return this entity
|
2016-03-12 21:51:44 +01:00
|
|
|
}
|
2016-03-10 05:18:39 +01:00
|
|
|
}
|
|
|
|
// Unable to locate a object matching the specified tag
|
|
|
|
return NullObject();
|
|
|
|
}
|
|
|
|
|
2016-03-26 17:16:58 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
static Array Object_FindActive()
|
|
|
|
{
|
|
|
|
// Remember the initial stack size
|
|
|
|
StackGuard sg;
|
|
|
|
// Obtain the ends of the entity pool
|
2016-05-22 05:20:38 +02:00
|
|
|
Core::Objects::const_iterator itr = Core::Get().GetObjects().cbegin();
|
|
|
|
Core::Objects::const_iterator end = Core::Get().GetObjects().cend();
|
2016-03-26 17:16:58 +01:00
|
|
|
// Allocate an empty array on the stack
|
|
|
|
sq_newarray(DefaultVM::Get(), 0);
|
|
|
|
// Process each entity in the pool
|
|
|
|
for (; itr != end; ++itr)
|
|
|
|
{
|
|
|
|
// Is this entity instance active?
|
|
|
|
if (VALID_ENTITY(itr->mID))
|
|
|
|
{
|
|
|
|
// Push the script object on the stack
|
|
|
|
sq_pushobject(DefaultVM::Get(), (HSQOBJECT &)((*itr).mObj));
|
|
|
|
// Append the object at the back of the array
|
|
|
|
if (SQ_FAILED(sq_arrayappend(DefaultVM::Get(), -1)))
|
|
|
|
{
|
|
|
|
STHROWF("Unable to append entity instance to the list");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Return the array at the top of the stack
|
|
|
|
return Var< Array >(DefaultVM::Get(), -1).value;
|
|
|
|
}
|
|
|
|
|
2015-10-29 21:10:36 +01:00
|
|
|
// ================================================================================================
|
2016-02-20 23:25:00 +01:00
|
|
|
void Register_CObject(HSQUIRRELVM vm)
|
|
|
|
{
|
|
|
|
RootTable(vm).Bind(_SC("SqObject"),
|
|
|
|
Class< CObject, NoConstructor< CObject > >(vm, _SC("SqObject"))
|
2016-03-10 04:57:13 +01:00
|
|
|
// Metamethods
|
2016-02-20 23:25:00 +01:00
|
|
|
.Func(_SC("_cmp"), &CObject::Cmp)
|
2016-03-10 04:57:13 +01:00
|
|
|
.SquirrelFunc(_SC("_typename"), &CObject::Typename)
|
2016-02-20 23:25:00 +01:00
|
|
|
.Func(_SC("_tostring"), &CObject::ToString)
|
2016-03-10 05:18:39 +01:00
|
|
|
// Static Values
|
2016-03-10 04:57:13 +01:00
|
|
|
.SetStaticValue(_SC("MaxID"), CObject::Max)
|
2016-05-22 05:20:38 +02:00
|
|
|
// Member Variables
|
|
|
|
.Var(_SC("MoveToDuration"), &CObject::mMoveToDuration)
|
|
|
|
.Var(_SC("MoveByDuration"), &CObject::mMoveByDuration)
|
|
|
|
.Var(_SC("RotateToDuration"), &CObject::mRotateToDuration)
|
|
|
|
.Var(_SC("RotateByDuration"), &CObject::mRotateByDuration)
|
|
|
|
.Var(_SC("RotateToEulerDuration"), &CObject::mRotateToEulerDuration)
|
|
|
|
.Var(_SC("RotateByEulerDuration"), &CObject::mRotateByEulerDuration)
|
2016-03-10 04:57:13 +01:00
|
|
|
// Core Properties
|
2016-02-20 23:25:00 +01:00
|
|
|
.Prop(_SC("ID"), &CObject::GetID)
|
|
|
|
.Prop(_SC("Tag"), &CObject::GetTag, &CObject::SetTag)
|
|
|
|
.Prop(_SC("Data"), &CObject::GetData, &CObject::SetData)
|
|
|
|
.Prop(_SC("Active"), &CObject::IsActive)
|
2016-03-10 05:18:39 +01:00
|
|
|
// Core Methods
|
2016-02-20 23:25:00 +01:00
|
|
|
.Func(_SC("Bind"), &CObject::BindEvent)
|
2016-03-10 04:57:13 +01:00
|
|
|
// Core Overloads
|
2016-02-20 23:25:00 +01:00
|
|
|
.Overload< bool (CObject::*)(void) >(_SC("Destroy"), &CObject::Destroy)
|
|
|
|
.Overload< bool (CObject::*)(Int32) >(_SC("Destroy"), &CObject::Destroy)
|
|
|
|
.Overload< bool (CObject::*)(Int32, Object &) >(_SC("Destroy"), &CObject::Destroy)
|
2016-03-10 04:57:13 +01:00
|
|
|
// Properties
|
2016-02-20 23:25:00 +01:00
|
|
|
.Prop(_SC("Model"), &CObject::GetModel)
|
|
|
|
.Prop(_SC("World"), &CObject::GetWorld, &CObject::SetWorld)
|
|
|
|
.Prop(_SC("Alpha"), &CObject::GetAlpha, &CObject::SetAlpha)
|
|
|
|
.Prop(_SC("Pos"), &CObject::GetPosition, &CObject::SetPosition)
|
|
|
|
.Prop(_SC("Position"), &CObject::GetPosition, &CObject::SetPosition)
|
2016-05-22 05:20:38 +02:00
|
|
|
.Prop(_SC("Rot"), &CObject::GetRotation)
|
2016-02-20 23:25:00 +01:00
|
|
|
.Prop(_SC("Rotation"), &CObject::GetRotation)
|
2016-05-22 05:20:38 +02:00
|
|
|
.Prop(_SC("EulerRot"), &CObject::GetRotationEuler)
|
|
|
|
.Prop(_SC("EulerRotation"), &CObject::GetRotationEuler)
|
2016-02-20 23:25:00 +01:00
|
|
|
.Prop(_SC("ShotReport"), &CObject::GetShotReport, &CObject::SetShotReport)
|
2016-05-22 05:20:38 +02:00
|
|
|
.Prop(_SC("BumpReport"), &CObject::GetTouchedReport, &CObject::SetTouchedReport)
|
|
|
|
.Prop(_SC("TouchedReport"), &CObject::GetTouchedReport, &CObject::SetTouchedReport)
|
|
|
|
.Prop(_SC("PosX"), &CObject::GetPositionX, &CObject::SetPositionX)
|
|
|
|
.Prop(_SC("PosY"), &CObject::GetPositionY, &CObject::SetPositionY)
|
|
|
|
.Prop(_SC("PosZ"), &CObject::GetPositionZ, &CObject::SetPositionZ)
|
|
|
|
.Prop(_SC("RotX"), &CObject::GetRotationX)
|
|
|
|
.Prop(_SC("RotY"), &CObject::GetRotationY)
|
|
|
|
.Prop(_SC("RotZ"), &CObject::GetRotationZ)
|
|
|
|
.Prop(_SC("RotW"), &CObject::GetRotationW)
|
|
|
|
.Prop(_SC("EulerRotX"), &CObject::GetEulerRotationX)
|
|
|
|
.Prop(_SC("EulerRotY"), &CObject::GetEulerRotationY)
|
|
|
|
.Prop(_SC("EulerRotZ"), &CObject::GetEulerRotationZ)
|
|
|
|
.Prop(_SC("MoveToX"), &CObject::GetPositionX, &CObject::MoveToX)
|
|
|
|
.Prop(_SC("MoveToY"), &CObject::GetPositionY, &CObject::MoveToY)
|
|
|
|
.Prop(_SC("MoveToZ"), &CObject::GetPositionZ, &CObject::MoveToZ)
|
|
|
|
.Prop(_SC("MoveByX"), &CObject::GetPositionX, &CObject::MoveByX)
|
|
|
|
.Prop(_SC("MoveByY"), &CObject::GetPositionY, &CObject::MoveByY)
|
|
|
|
.Prop(_SC("MoveByZ"), &CObject::GetPositionZ, &CObject::MoveByZ)
|
|
|
|
.Prop(_SC("RotateToX"), &CObject::GetRotationX, &CObject::RotateToX)
|
|
|
|
.Prop(_SC("RotateToY"), &CObject::GetRotationY, &CObject::RotateToY)
|
|
|
|
.Prop(_SC("RotateToZ"), &CObject::GetRotationZ, &CObject::RotateToZ)
|
|
|
|
.Prop(_SC("RotateToW"), &CObject::GetRotationW, &CObject::RotateToW)
|
|
|
|
.Prop(_SC("RotateByX"), &CObject::GetRotationX, &CObject::RotateByX)
|
|
|
|
.Prop(_SC("RotateByY"), &CObject::GetRotationY, &CObject::RotateByY)
|
|
|
|
.Prop(_SC("RotateByZ"), &CObject::GetRotationZ, &CObject::RotateByZ)
|
|
|
|
.Prop(_SC("RotateByW"), &CObject::GetRotationW, &CObject::RotateByW)
|
|
|
|
.Prop(_SC("RotateToEulerX"), &CObject::GetEulerRotationX, &CObject::RotateToEulerX)
|
|
|
|
.Prop(_SC("RotateToEulerY"), &CObject::GetEulerRotationY, &CObject::RotateToEulerY)
|
|
|
|
.Prop(_SC("RotateToEulerZ"), &CObject::GetEulerRotationZ, &CObject::RotateToEulerZ)
|
|
|
|
.Prop(_SC("RotateByEulerX"), &CObject::GetEulerRotationX, &CObject::RotateByEulerX)
|
|
|
|
.Prop(_SC("RotateByEulerY"), &CObject::GetEulerRotationY, &CObject::RotateByEulerY)
|
|
|
|
.Prop(_SC("RotateByEulerZ"), &CObject::GetEulerRotationZ, &CObject::RotateByEulerZ)
|
2016-03-10 05:18:39 +01:00
|
|
|
// Member Methods
|
2016-02-20 23:25:00 +01:00
|
|
|
.Func(_SC("StreamedFor"), &CObject::IsStreamedFor)
|
|
|
|
.Func(_SC("SetAlpha"), &CObject::SetAlphaEx)
|
|
|
|
.Func(_SC("SetPosition"), &CObject::SetPositionEx)
|
2016-03-10 05:18:39 +01:00
|
|
|
// Member Overloads
|
2016-05-22 05:20:38 +02:00
|
|
|
.Overload< void (CObject::*)(const Vector3 &, Uint32) const >
|
2016-02-20 23:25:00 +01:00
|
|
|
(_SC("MoveTo"), &CObject::MoveTo)
|
2016-05-22 05:20:38 +02:00
|
|
|
.Overload< void (CObject::*)(Float32, Float32, Float32, Uint32) const >
|
2016-02-20 23:25:00 +01:00
|
|
|
(_SC("MoveTo"), &CObject::MoveToEx)
|
2016-05-22 05:20:38 +02:00
|
|
|
.Overload< void (CObject::*)(const Vector3 &, Uint32) const >
|
2016-02-20 23:25:00 +01:00
|
|
|
(_SC("MoveBy"), &CObject::MoveBy)
|
2016-05-22 05:20:38 +02:00
|
|
|
.Overload< void (CObject::*)(Float32, Float32, Float32, Uint32) const >
|
2016-02-20 23:25:00 +01:00
|
|
|
(_SC("MoveBy"), &CObject::MoveByEx)
|
2016-05-22 05:20:38 +02:00
|
|
|
.Overload< void (CObject::*)(const Quaternion &, Uint32) const >
|
2016-02-20 23:25:00 +01:00
|
|
|
(_SC("RotateTo"), &CObject::RotateTo)
|
2016-05-22 05:20:38 +02:00
|
|
|
.Overload< void (CObject::*)(Float32, Float32, Float32, Float32, Uint32) const >
|
2016-02-20 23:25:00 +01:00
|
|
|
(_SC("RotateTo"), &CObject::RotateToEx)
|
2016-05-22 05:20:38 +02:00
|
|
|
.Overload< void (CObject::*)(const Vector3 &, Uint32) const >
|
2016-02-20 23:25:00 +01:00
|
|
|
(_SC("RotateToEuler"), &CObject::RotateToEuler)
|
2016-05-22 05:20:38 +02:00
|
|
|
.Overload< void (CObject::*)(Float32, Float32, Float32, Uint32) const >
|
2016-02-20 23:25:00 +01:00
|
|
|
(_SC("RotateToEuler"), &CObject::RotateToEulerEx)
|
2016-05-22 05:20:38 +02:00
|
|
|
.Overload< void (CObject::*)(const Quaternion &, Uint32) const >
|
2016-02-20 23:25:00 +01:00
|
|
|
(_SC("RotateBy"), &CObject::RotateBy)
|
2016-05-22 05:20:38 +02:00
|
|
|
.Overload< void (CObject::*)(Float32, Float32, Float32, Float32, Uint32) const >
|
2016-02-20 23:25:00 +01:00
|
|
|
(_SC("RotateBy"), &CObject::RotateByEx)
|
2016-05-22 05:20:38 +02:00
|
|
|
.Overload< void (CObject::*)(const Vector3 &, Uint32) const >
|
2016-02-20 23:25:00 +01:00
|
|
|
(_SC("RotateByEuler"), &CObject::RotateByEuler)
|
2016-05-22 05:20:38 +02:00
|
|
|
.Overload< void (CObject::*)(Float32, Float32, Float32, Uint32) const >
|
2016-02-20 23:25:00 +01:00
|
|
|
(_SC("RotateByEuler"), &CObject::RotateByEulerEx)
|
2016-03-10 05:18:39 +01:00
|
|
|
// Static Functions
|
|
|
|
.StaticFunc(_SC("FindByID"), &Object_FindByID)
|
|
|
|
.StaticFunc(_SC("FindByTag"), &Object_FindByTag)
|
2016-03-26 17:16:58 +01:00
|
|
|
.StaticFunc(_SC("FindActive"), &Object_FindActive)
|
2016-03-10 04:57:13 +01:00
|
|
|
// Static Overloads
|
|
|
|
.StaticOverload< Object & (*)(Int32, Int32, Float32, Float32, Float32, Int32) >
|
|
|
|
(_SC("CreateEx"), &Object_CreateEx)
|
|
|
|
.StaticOverload< Object & (*)(Int32, Int32, Float32, Float32, Float32, Int32, Int32, Object &) >
|
|
|
|
(_SC("CreateEx"), &Object_CreateEx)
|
|
|
|
.StaticOverload< Object & (*)(Int32, Int32, const Vector3 &, Int32) >
|
|
|
|
(_SC("Create"), &Object_Create)
|
|
|
|
.StaticOverload< Object & (*)(Int32, Int32, const Vector3 &, Int32, Int32, Object &) >
|
|
|
|
(_SC("Create"), &Object_Create)
|
2015-09-30 02:56:11 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
} // Namespace:: SqMod
|