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"
|
2015-11-01 00:31:57 +01:00
|
|
|
#include "Core.hpp"
|
2018-07-29 11:25:44 +02:00
|
|
|
#include "Misc/Tasks.hpp"
|
2015-09-30 02:56:11 +02:00
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
namespace SqMod {
|
|
|
|
|
2016-11-15 20:16:24 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
SQMODE_DECL_TYPENAME(Typename, _SC("SqObject"))
|
|
|
|
|
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-08-07 00:54:33 +02:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
SQInteger CObject::SqGetNull(HSQUIRRELVM vm)
|
|
|
|
{
|
2020-04-17 16:42:09 +02:00
|
|
|
sq_pushobject(vm, Core::Get().GetNullObject().GetObj());
|
2016-08-07 00:54:33 +02:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2017-02-21 20:24:59 +01:00
|
|
|
LightObj & CObject::GetNull()
|
2016-08-07 00:54:33 +02:00
|
|
|
{
|
|
|
|
return Core::Get().GetNullObject();
|
|
|
|
}
|
|
|
|
|
2016-02-20 23:25:00 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
CObject::CObject(Int32 id)
|
|
|
|
: m_ID(VALID_ENTITYGETEX(id, SQMOD_OBJECT_POOL))
|
2016-08-18 15:37:55 +02:00
|
|
|
, m_Tag(ToStrF("%d", id)), m_Data(), m_CircularLocks(0)
|
2016-05-22 05:20:38 +02:00
|
|
|
, 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-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
|
|
|
// ------------------------------------------------------------------------------------------------
|
2019-02-17 16:23:59 +01:00
|
|
|
void CObject::SetTag(StackStrF & tag)
|
2016-02-20 23:25:00 +01:00
|
|
|
{
|
2016-11-16 13:48:48 +01:00
|
|
|
if (tag.mLen > 0)
|
|
|
|
{
|
2020-03-22 09:00:31 +01:00
|
|
|
m_Tag.assign(tag.mPtr, static_cast< size_t >(tag.mLen));
|
2016-11-16 13:48:48 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_Tag.clear();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2019-02-17 16:23:59 +01:00
|
|
|
CObject & CObject::ApplyTag(StackStrF & tag)
|
2016-11-16 13:48:48 +01:00
|
|
|
{
|
|
|
|
SetTag(tag);
|
|
|
|
return *this;
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2017-02-21 20:24:59 +01:00
|
|
|
LightObj & 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
|
|
|
// ------------------------------------------------------------------------------------------------
|
2017-02-21 20:24:59 +01:00
|
|
|
void CObject::SetData(LightObj & data)
|
2016-02-20 23:25:00 +01:00
|
|
|
{
|
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
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2017-02-21 20:24:59 +01:00
|
|
|
bool CObject::Destroy(Int32 header, LightObj & 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
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2017-02-21 20:24:59 +01:00
|
|
|
LightObj & CObject::GetEvents() const
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2017-02-21 20:24:59 +01:00
|
|
|
// Return the associated event table
|
2020-04-17 16:42:09 +02:00
|
|
|
return Core::Get().GetObj(m_ID).mEvents;
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-07-26 23:13:50 +02:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2017-02-21 20:24:59 +01:00
|
|
|
void CObject::CustomEvent(Int32 header, LightObj & payload) const
|
2016-07-26 23:13:50 +02:00
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
|
|
|
// Perfrom the requested action
|
|
|
|
Core::Get().EmitObjectCustom(m_ID, header, payload);
|
|
|
|
}
|
|
|
|
|
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-08-18 15:37:55 +02:00
|
|
|
void CObject::SetWorld(Int32 world)
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2016-08-18 15:37:55 +02:00
|
|
|
// Grab the current value for this property
|
|
|
|
const Int32 current = _Func->GetObjectWorld(m_ID);
|
|
|
|
// Don't even bother if it's the same value
|
|
|
|
if (current == world)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
// Avoid property unwind from a recursive call
|
2016-03-10 04:57:13 +01:00
|
|
|
_Func->SetObjectWorld(m_ID, world);
|
2016-08-18 15:37:55 +02:00
|
|
|
// Avoid infinite recursive event loops
|
|
|
|
if (!(m_CircularLocks & OBJECTCL_EMIT_OBJECT_WORLD))
|
|
|
|
{
|
|
|
|
// Prevent this event from triggering while executed
|
|
|
|
BitGuardU32 bg(m_CircularLocks, OBJECTCL_EMIT_OBJECT_WORLD);
|
|
|
|
// Now forward the event call
|
|
|
|
Core::Get().EmitObjectWorld(m_ID, current, 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-08-18 15:50:30 +02:00
|
|
|
void CObject::SetAlpha(Int32 alpha)
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-08-18 15:50:30 +02:00
|
|
|
SetAlphaEx(alpha, 0);
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-08-18 15:50:30 +02:00
|
|
|
void CObject::SetAlphaEx(Int32 alpha, Uint32 time)
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2016-08-18 15:50:30 +02:00
|
|
|
// Grab the current value for this property
|
|
|
|
const Int32 current = _Func->GetObjectAlpha(m_ID);
|
|
|
|
// Don't even bother if it's the same value
|
|
|
|
if (current == alpha)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
// Avoid property unwind from a recursive call
|
2016-03-10 04:57:13 +01:00
|
|
|
_Func->SetObjectAlpha(m_ID, alpha, time);
|
2016-08-18 15:50:30 +02:00
|
|
|
// Avoid infinite recursive event loops
|
|
|
|
if (!(m_CircularLocks & OBJECTCL_EMIT_OBJECT_ALPHA))
|
|
|
|
{
|
|
|
|
// Prevent this event from triggering while executed
|
|
|
|
BitGuardU32 bg(m_CircularLocks, OBJECTCL_EMIT_OBJECT_ALPHA);
|
|
|
|
// Now forward the event call
|
|
|
|
Core::Get().EmitObjectAlpha(m_ID, current, 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
|
|
|
// ------------------------------------------------------------------------------------------------
|
2017-08-06 20:15:32 +02:00
|
|
|
Vector3 CObject::GetPosition()
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2017-08-06 20:15:32 +02:00
|
|
|
// Create a default vector instance
|
|
|
|
Vector3 vec;
|
2016-05-22 05:20:38 +02:00
|
|
|
// Query the server for the values
|
2017-08-06 20:15:32 +02:00
|
|
|
_Func->GetObjectPosition(m_ID, &vec.x, &vec.y, &vec.z);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2017-08-06 20:15:32 +02:00
|
|
|
return vec;
|
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::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
|
|
|
// ------------------------------------------------------------------------------------------------
|
2017-08-06 20:15:32 +02:00
|
|
|
Quaternion CObject::GetRotation()
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2017-08-06 20:15:32 +02:00
|
|
|
// Create a default quaternion instance
|
|
|
|
Quaternion quat;
|
2016-05-22 05:20:38 +02:00
|
|
|
// Query the server for the values
|
2017-08-06 20:15:32 +02:00
|
|
|
_Func->GetObjectRotation(m_ID, &quat.x, &quat.y, &quat.z, &quat.w);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2017-08-06 20:15:32 +02:00
|
|
|
return quat;
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2017-08-06 20:15:32 +02:00
|
|
|
Vector3 CObject::GetRotationEuler()
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2017-08-06 20:15:32 +02:00
|
|
|
// Create a default vector instance
|
|
|
|
Vector3 vec;
|
2016-05-22 05:20:38 +02:00
|
|
|
// Query the server for the values
|
2017-08-06 20:15:32 +02:00
|
|
|
_Func->GetObjectRotationEuler(m_ID, &vec.x, &vec.y, &vec.z);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2017-08-06 20:15:32 +02:00
|
|
|
return vec;
|
2015-10-29 21:10:36 +01:00
|
|
|
}
|
|
|
|
|
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
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-08-18 16:12:00 +02:00
|
|
|
void CObject::SetShotReport(bool toggle)
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2016-08-18 16:12:00 +02:00
|
|
|
// Grab the current value for this property
|
|
|
|
const bool current = _Func->IsObjectShotReportEnabled(m_ID);
|
|
|
|
// Don't even bother if it's the same value
|
|
|
|
if (current == toggle)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
// Avoid property unwind from a recursive call
|
2020-03-22 09:00:31 +01:00
|
|
|
_Func->SetObjectShotReportEnabled(m_ID, static_cast< uint8_t >(toggle));
|
2016-08-18 16:12:00 +02:00
|
|
|
// Avoid infinite recursive event loops
|
|
|
|
if (!(m_CircularLocks & OBJECTCL_EMIT_OBJECT_REPORT))
|
|
|
|
{
|
|
|
|
// Prevent this event from triggering while executed
|
|
|
|
BitGuardU32 bg(m_CircularLocks, OBJECTCL_EMIT_OBJECT_REPORT);
|
|
|
|
// Now forward the event call
|
|
|
|
Core::Get().EmitObjectReport(m_ID, current, toggle, false);
|
|
|
|
}
|
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-08-18 16:12:00 +02:00
|
|
|
void CObject::SetTouchedReport(bool toggle)
|
2015-10-29 21:10:36 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2016-08-18 16:12:00 +02:00
|
|
|
// Grab the current value for this property
|
|
|
|
const bool current = _Func->IsObjectTouchedReportEnabled(m_ID);
|
|
|
|
// Don't even bother if it's the same value
|
|
|
|
if (current == toggle)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
// Avoid property unwind from a recursive call
|
2020-03-22 09:00:31 +01:00
|
|
|
_Func->SetObjectTouchedReportEnabled(m_ID, static_cast< uint8_t >(toggle));
|
2016-08-18 16:12:00 +02:00
|
|
|
// Avoid infinite recursive event loops
|
|
|
|
if (!(m_CircularLocks & OBJECTCL_EMIT_OBJECT_REPORT))
|
|
|
|
{
|
|
|
|
// Prevent this event from triggering while executed
|
|
|
|
BitGuardU32 bg(m_CircularLocks, OBJECTCL_EMIT_OBJECT_REPORT);
|
|
|
|
// Now forward the event call
|
|
|
|
Core::Get().EmitObjectReport(m_ID, current, toggle, true);
|
|
|
|
}
|
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
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 x = 0.0f, dummy;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Query the server for the requested component value
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectPosition(m_ID, &x, &dummy, &dummy);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2017-08-06 20:15:32 +02:00
|
|
|
return 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
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 y = 0.0f, dummy;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Query the server for the requested component value
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectPosition(m_ID, &dummy, &y, &dummy);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2017-08-06 20:15:32 +02:00
|
|
|
return 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
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 z = 0.0f, dummy;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Query the server for the requested component value
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectPosition(m_ID, &dummy, &dummy, &z);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2017-08-06 20:15:32 +02:00
|
|
|
return 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();
|
2017-08-06 20:15:32 +02:00
|
|
|
// Reserve some temporary floats to retrieve the missing components
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 y, z, dummy;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Retrieve the current values for unchanged components
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectPosition(m_ID, &dummy, &y, &z);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Perform the requested operation
|
2017-08-06 20:15:32 +02:00
|
|
|
_Func->SetObjectPosition(m_ID, x, y, 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();
|
2017-08-06 20:15:32 +02:00
|
|
|
// Reserve some temporary floats to retrieve the missing components
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 x, z, dummy;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Retrieve the current values for unchanged components
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectPosition(m_ID, &x, &dummy, &z);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Perform the requested operation
|
2017-08-06 20:15:32 +02:00
|
|
|
_Func->SetObjectPosition(m_ID, x, y, 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();
|
2017-08-06 20:15:32 +02:00
|
|
|
// Reserve some temporary floats to retrieve the missing components
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 x, y, dummy;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Retrieve the current values for unchanged components
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectPosition(m_ID, &x, &y, &dummy);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Perform the requested operation
|
2017-08-06 20:15:32 +02:00
|
|
|
_Func->SetObjectPosition(m_ID, z, 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
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 x = 0.0f, dummy;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Query the server for the requested component value
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectRotation(m_ID, &x, &dummy, &dummy, &dummy);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2017-08-06 20:15:32 +02:00
|
|
|
return 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
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 y = 0.0f, dummy;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Query the server for the requested component value
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectRotation(m_ID, &dummy, &y, &dummy, &dummy);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2017-08-06 20:15:32 +02:00
|
|
|
return 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
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 z = 0.0f, dummy;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Query the server for the requested component value
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectRotation(m_ID, &dummy, &dummy, &z, &dummy);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2017-08-06 20:15:32 +02:00
|
|
|
return 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
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 w = 0.0f, dummy;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Query the server for the requested component value
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectRotation(m_ID, &dummy, &dummy, &dummy, &w);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2017-08-06 20:15:32 +02:00
|
|
|
return 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
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 x = 0.0f, dummy;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Query the server for the requested component value
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectRotationEuler(m_ID, &x, &dummy, &dummy);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2017-08-06 20:15:32 +02:00
|
|
|
return 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
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 y = 0.0f, dummy;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Query the server for the requested component value
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectRotationEuler(m_ID, &dummy, &y, &dummy);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2017-08-06 20:15:32 +02:00
|
|
|
return y;
|
2016-02-20 23:25:00 +01:00
|
|
|
}
|
|
|
|
|
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
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 z = 0.0f, dummy;
|
2016-03-10 04:57:13 +01:00
|
|
|
// Query the server for the requested component value
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectRotationEuler(m_ID, &dummy, &dummy, &z);
|
2016-03-10 04:57:13 +01:00
|
|
|
// Return the requested information
|
2017-08-06 20:15:32 +02:00
|
|
|
return 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();
|
2017-08-06 20:15:32 +02:00
|
|
|
// Reserve some temporary floats to retrieve the missing components
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 y, z, dummy;
|
2016-05-22 05:20:38 +02:00
|
|
|
// Retrieve the current values for unchanged components
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectPosition(m_ID, &dummy, &y, &z);
|
2016-05-22 05:20:38 +02:00
|
|
|
// Perform the requested operation
|
2017-08-06 20:15:32 +02:00
|
|
|
_Func->MoveObjectTo(m_ID, x, y, z, mMoveToDuration);
|
2016-05-22 05:20:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::MoveToY(Float32 y) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2017-08-06 20:15:32 +02:00
|
|
|
// Reserve some temporary floats to retrieve the missing components
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 x, z, dummy;
|
2016-05-22 05:20:38 +02:00
|
|
|
// Retrieve the current values for unchanged components
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectPosition(m_ID, &x, &dummy, &z);
|
2016-05-22 05:20:38 +02:00
|
|
|
// Perform the requested operation
|
2017-08-06 20:15:32 +02:00
|
|
|
_Func->MoveObjectTo(m_ID, x, y, z, mMoveToDuration);
|
2016-05-22 05:20:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::MoveToZ(Float32 z) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2017-08-06 20:15:32 +02:00
|
|
|
// Reserve some temporary floats to retrieve the missing components
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 x, y, dummy;
|
2016-05-22 05:20:38 +02:00
|
|
|
// Retrieve the current values for unchanged components
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectPosition(m_ID, &x, &y, &dummy);
|
2016-05-22 05:20:38 +02:00
|
|
|
// Perform the requested operation
|
2017-08-06 20:15:32 +02:00
|
|
|
_Func->MoveObjectTo(m_ID, z, y, z, mMoveToDuration);
|
2016-05-22 05:20:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
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();
|
2017-08-06 20:15:32 +02:00
|
|
|
// Reserve some temporary floats to retrieve the missing components
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 y, z, w, dummy;
|
2016-05-22 05:20:38 +02:00
|
|
|
// Retrieve the current values for unchanged components
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectRotation(m_ID, &dummy, &y, &z, &w);
|
2016-05-22 05:20:38 +02:00
|
|
|
// Perform the requested operation
|
2017-08-06 20:15:32 +02:00
|
|
|
_Func->RotateObjectTo(m_ID, x, y, z, w, mRotateToDuration);
|
2016-05-22 05:20:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::RotateToY(Float32 y) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2017-08-06 20:15:32 +02:00
|
|
|
// Reserve some temporary floats to retrieve the missing components
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 x, z, w, dummy;
|
2016-05-22 05:20:38 +02:00
|
|
|
// Retrieve the current values for unchanged components
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectRotation(m_ID, &x, &dummy, &z, &w);
|
2016-05-22 05:20:38 +02:00
|
|
|
// Perform the requested operation
|
2017-08-06 20:15:32 +02:00
|
|
|
_Func->RotateObjectTo(m_ID, x, y, z, w, mRotateToDuration);
|
2016-05-22 05:20:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::RotateToZ(Float32 z) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2017-08-06 20:15:32 +02:00
|
|
|
// Reserve some temporary floats to retrieve the missing components
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 x, y, w, dummy;
|
2016-05-22 05:20:38 +02:00
|
|
|
// Retrieve the current values for unchanged components
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectRotation(m_ID, &x, &y, &dummy, &w);
|
2016-05-22 05:20:38 +02:00
|
|
|
// Perform the requested operation
|
2017-08-06 20:15:32 +02:00
|
|
|
_Func->RotateObjectTo(m_ID, x, y, z, w, mRotateToDuration);
|
2016-05-22 05:20:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::RotateToW(Float32 w) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2017-08-06 20:15:32 +02:00
|
|
|
// Reserve some temporary floats to retrieve the missing components
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 x, y, z, dummy;
|
2016-05-22 05:20:38 +02:00
|
|
|
// Retrieve the current values for unchanged components
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectRotation(m_ID, &x, &y, &z, &dummy);
|
2016-05-22 05:20:38 +02:00
|
|
|
// Perform the requested operation
|
2017-08-06 20:15:32 +02:00
|
|
|
_Func->RotateObjectTo(m_ID, x, y, z, w, mRotateToDuration);
|
2016-05-22 05:20:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
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();
|
2017-08-06 20:15:32 +02:00
|
|
|
// Reserve some temporary floats to retrieve the missing components
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 y, z, dummy;
|
2016-05-22 05:20:38 +02:00
|
|
|
// Retrieve the current values for unchanged components
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectRotationEuler(m_ID, &dummy, &y, &z);
|
2016-05-22 05:20:38 +02:00
|
|
|
// Perform the requested operation
|
2017-08-06 20:15:32 +02:00
|
|
|
_Func->RotateObjectToEuler(m_ID, x, y, z, mRotateToEulerDuration);
|
2016-05-22 05:20:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::RotateToEulerY(Float32 y) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2017-08-06 20:15:32 +02:00
|
|
|
// Reserve some temporary floats to retrieve the missing components
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 x, z, dummy;
|
2016-05-22 05:20:38 +02:00
|
|
|
// Retrieve the current values for unchanged components
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectRotationEuler(m_ID, &x, &dummy, &z);
|
2016-05-22 05:20:38 +02:00
|
|
|
// Perform the requested operation
|
2017-08-06 20:15:32 +02:00
|
|
|
_Func->RotateObjectToEuler(m_ID, x, y, z, mRotateToEulerDuration);
|
2016-05-22 05:20:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CObject::RotateToEulerZ(Float32 z) const
|
|
|
|
{
|
|
|
|
// Validate the managed identifier
|
|
|
|
Validate();
|
2017-08-06 20:15:32 +02:00
|
|
|
// Reserve some temporary floats to retrieve the missing components
|
2018-01-30 18:09:54 +01:00
|
|
|
Float32 x, y, dummy;
|
2016-05-22 05:20:38 +02:00
|
|
|
// Retrieve the current values for unchanged components
|
2018-01-30 18:09:54 +01:00
|
|
|
_Func->GetObjectRotationEuler(m_ID, &x, &y, &dummy);
|
2016-05-22 05:20:38 +02:00
|
|
|
// Perform the requested operation
|
2017-08-06 20:15:32 +02:00
|
|
|
_Func->RotateObjectToEuler(m_ID, z, y, z, mRotateToEulerDuration);
|
2016-05-22 05:20:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
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
|
|
|
// ------------------------------------------------------------------------------------------------
|
2017-02-21 20:24:59 +01:00
|
|
|
static LightObj & 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
|
|
|
{
|
2017-02-21 20:24:59 +01:00
|
|
|
return Core::Get().NewObject(model, world, x, y, z, alpha, SQMOD_CREATE_DEFAULT, NullLightObj());
|
2015-11-01 00:31:57 +01:00
|
|
|
}
|
|
|
|
|
2017-02-21 20:24:59 +01:00
|
|
|
static LightObj & Object_CreateEx(Int32 model, Int32 world, Float32 x, Float32 y, Float32 z,
|
|
|
|
Int32 alpha, Int32 header, LightObj & 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
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2017-02-21 20:24:59 +01:00
|
|
|
static LightObj & 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,
|
2017-02-21 20:24:59 +01:00
|
|
|
SQMOD_CREATE_DEFAULT, NullLightObj());
|
2015-11-01 00:31:57 +01:00
|
|
|
}
|
|
|
|
|
2017-02-21 20:24:59 +01:00
|
|
|
static LightObj & Object_Create(Int32 model, Int32 world, const Vector3 & pos, Int32 alpha,
|
|
|
|
Int32 header, LightObj & 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
|
|
|
}
|
|
|
|
|
2015-10-29 21:10:36 +01:00
|
|
|
// ================================================================================================
|
2020-03-22 09:00:31 +01:00
|
|
|
#pragma clang diagnostic push
|
|
|
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
2016-02-20 23:25:00 +01:00
|
|
|
void Register_CObject(HSQUIRRELVM vm)
|
2020-03-22 09:00:31 +01:00
|
|
|
#pragma clang diagnostic pop
|
2016-02-20 23:25:00 +01:00
|
|
|
{
|
2016-11-15 20:16:24 +01:00
|
|
|
RootTable(vm).Bind(Typename::Str,
|
|
|
|
Class< CObject, NoConstructor< CObject > >(vm, Typename::Str)
|
2016-06-03 20:26:19 +02:00
|
|
|
// Meta-methods
|
2016-11-15 20:16:24 +01:00
|
|
|
.SquirrelFunc(_SC("_typename"), &Typename::Fn)
|
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
|
2017-02-21 20:24:59 +01:00
|
|
|
.Prop(_SC("On"), &CObject::GetEvents)
|
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-11-16 13:48:48 +01:00
|
|
|
.FmtFunc(_SC("SetTag"), &CObject::ApplyTag)
|
2016-07-26 23:13:50 +02:00
|
|
|
.Func(_SC("CustomEvent"), &CObject::CustomEvent)
|
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)
|
2017-02-21 20:24:59 +01:00
|
|
|
.Overload< bool (CObject::*)(Int32, LightObj &) >(_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 04:57:13 +01:00
|
|
|
// Static Overloads
|
2017-02-21 20:24:59 +01:00
|
|
|
.StaticOverload< LightObj & (*)(Int32, Int32, Float32, Float32, Float32, Int32) >
|
2016-03-10 04:57:13 +01:00
|
|
|
(_SC("CreateEx"), &Object_CreateEx)
|
2017-02-21 20:24:59 +01:00
|
|
|
.StaticOverload< LightObj & (*)(Int32, Int32, Float32, Float32, Float32, Int32, Int32, LightObj &) >
|
2016-03-10 04:57:13 +01:00
|
|
|
(_SC("CreateEx"), &Object_CreateEx)
|
2017-02-21 20:24:59 +01:00
|
|
|
.StaticOverload< LightObj & (*)(Int32, Int32, const Vector3 &, Int32) >
|
2016-03-10 04:57:13 +01:00
|
|
|
(_SC("Create"), &Object_Create)
|
2017-02-21 20:24:59 +01:00
|
|
|
.StaticOverload< LightObj & (*)(Int32, Int32, const Vector3 &, Int32, Int32, LightObj &) >
|
2016-03-10 04:57:13 +01:00
|
|
|
(_SC("Create"), &Object_Create)
|
2016-08-07 00:54:33 +02:00
|
|
|
// Raw Squirrel Methods
|
|
|
|
.SquirrelFunc(_SC("NullInst"), &CObject::SqGetNull)
|
2016-11-16 23:23:59 +01:00
|
|
|
.SquirrelFunc(_SC("MakeTask"), &Tasks::MakeTask< CObject, ENT_OBJECT >)
|
|
|
|
.SquirrelFunc(_SC("DropTask"), &Tasks::DropTask< CObject, ENT_OBJECT >)
|
|
|
|
.SquirrelFunc(_SC("DoesTask"), &Tasks::DoesTask< CObject, ENT_OBJECT >)
|
2016-11-17 16:04:21 +01:00
|
|
|
.SquirrelFunc(_SC("FindTask"), &Tasks::FindTask< CObject, ENT_OBJECT >)
|
2015-09-30 02:56:11 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
} // Namespace:: SqMod
|