2020-03-22 00:45:04 +01:00
|
|
|
#pragma once
|
2015-09-30 02:56:11 +02:00
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2021-01-30 07:51:39 +01:00
|
|
|
#include "Core/Common.hpp"
|
2015-09-30 02:56:11 +02:00
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
namespace SqMod {
|
|
|
|
|
2016-08-18 15:37:55 +02:00
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Circular locks employed by the object manager.
|
|
|
|
*/
|
|
|
|
enum ObjectCircularLocks
|
|
|
|
{
|
2020-03-22 09:00:31 +01:00
|
|
|
OBJECTCL_EMIT_OBJECT_WORLD = (1u << 0u),
|
|
|
|
OBJECTCL_EMIT_OBJECT_ALPHA = (2u << 0u),
|
|
|
|
OBJECTCL_EMIT_OBJECT_REPORT = (3u << 0u)
|
2016-08-18 15:37:55 +02:00
|
|
|
};
|
|
|
|
|
2015-09-30 02:56:11 +02:00
|
|
|
/* ------------------------------------------------------------------------------------------------
|
2016-03-10 04:57:13 +01:00
|
|
|
* Manages a single object entity.
|
2015-09-30 02:56:11 +02:00
|
|
|
*/
|
2016-02-20 23:25:00 +01:00
|
|
|
class CObject
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
// --------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
friend class Core;
|
2021-01-30 07:51:39 +01:00
|
|
|
friend class ObjectInst;
|
2016-02-20 23:25:00 +01:00
|
|
|
|
|
|
|
private:
|
2015-10-29 21:10:36 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
* Identifier of the managed entity.
|
2015-10-29 21:10:36 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
int32_t m_ID;
|
2015-10-29 21:10:36 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-03-10 04:57:13 +01:00
|
|
|
* User tag associated with this instance.
|
2015-10-29 21:10:36 +01:00
|
|
|
*/
|
2017-02-21 20:24:59 +01:00
|
|
|
String m_Tag;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* User data associated with this instance.
|
|
|
|
*/
|
2017-02-21 20:24:59 +01:00
|
|
|
LightObj m_Data;
|
2015-10-29 21:10:36 +01:00
|
|
|
|
2016-08-18 15:37:55 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Prevent events from triggering themselves.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
uint32_t m_CircularLocks;
|
2016-08-18 15:37:55 +02:00
|
|
|
|
2015-10-29 21:10:36 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
* Base constructor.
|
2015-10-29 21:10:36 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
explicit CObject(int32_t id);
|
2015-10-29 21:10:36 +01:00
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
public:
|
|
|
|
|
2016-05-22 05:20:38 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* The default duration to use when moving the object.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
uint32_t mMoveToDuration;
|
|
|
|
uint32_t mMoveByDuration;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* The default duration to use when rotating the object to Quaternion.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
uint32_t mRotateToDuration;
|
|
|
|
uint32_t mRotateByDuration;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* The default duration to use when rotating the object to Euler.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
uint32_t mRotateToEulerDuration;
|
|
|
|
uint32_t mRotateByEulerDuration;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
2015-10-29 21:10:36 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-03-10 04:57:13 +01:00
|
|
|
* Maximum possible number that could represent an identifier for this entity type.
|
2015-10-29 21:10:36 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
static const int32_t Max;
|
2015-10-29 21:10:36 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-03-10 04:57:13 +01:00
|
|
|
* Copy constructor. (disabled)
|
2015-10-29 21:10:36 +01:00
|
|
|
*/
|
2016-03-10 04:57:13 +01:00
|
|
|
CObject(const CObject &) = delete;
|
2015-10-29 21:10:36 +01:00
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Move constructor. (disabled)
|
|
|
|
*/
|
|
|
|
CObject(CObject &&) = delete;
|
2015-10-29 21:10:36 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-03-10 04:57:13 +01:00
|
|
|
* Copy assignment operator. (disabled)
|
|
|
|
*/
|
|
|
|
CObject & operator = (const CObject &) = delete;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Move assignment operator. (disabled)
|
2015-10-29 21:10:36 +01:00
|
|
|
*/
|
2016-03-10 04:57:13 +01:00
|
|
|
CObject & operator = (CObject &&) = delete;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* See whether this instance manages a valid entity instance otherwise throw an exception.
|
|
|
|
*/
|
|
|
|
void Validate() const
|
2016-02-20 23:25:00 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
if (INVALID_ENTITY(m_ID))
|
2016-03-12 21:51:44 +01:00
|
|
|
{
|
2021-02-03 16:50:39 +01:00
|
|
|
STHROWF("Invalid object reference [{}]", m_Tag);
|
2016-03-12 21:51:44 +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
|
|
|
* Used by the script engine to convert an instance of this type to a string.
|
2015-10-29 21:10:36 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD const String & ToString() const;
|
2015-10-29 21:10:36 +01:00
|
|
|
|
2016-08-07 00:54:33 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the associated null entity instance.
|
|
|
|
*/
|
|
|
|
static SQInteger SqGetNull(HSQUIRRELVM vm);
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the associated null entity instance.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD static LightObj & GetNull();
|
2016-08-07 00:54:33 +02:00
|
|
|
|
2015-10-29 21:10:36 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-03-10 04:57:13 +01:00
|
|
|
* Retrieve the identifier of the entity managed by this instance.
|
2015-10-29 21:10:36 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetID() const
|
2016-03-10 04:57:13 +01:00
|
|
|
{
|
|
|
|
return m_ID;
|
|
|
|
}
|
2015-10-29 21:10:36 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
* Check whether this instance manages a valid entity.
|
2015-10-29 21:10:36 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD bool IsActive() const
|
2016-03-10 04:57:13 +01:00
|
|
|
{
|
|
|
|
return VALID_ENTITY(m_ID);
|
|
|
|
}
|
2015-10-29 21:10:36 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
* Retrieve the associated user tag.
|
2015-10-29 21:10:36 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD const String & GetTag() const;
|
2015-10-29 21:10:36 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
* Modify the associated user tag.
|
2015-10-29 21:10:36 +01:00
|
|
|
*/
|
2019-02-17 16:23:59 +01:00
|
|
|
void SetTag(StackStrF & tag);
|
2016-11-16 13:48:48 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the associated user tag.
|
|
|
|
*/
|
2019-02-17 16:23:59 +01:00
|
|
|
CObject & ApplyTag(StackStrF & tag);
|
2015-10-29 21:10:36 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
* Retrieve the associated user data.
|
2015-10-29 21:10:36 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD LightObj & GetData();
|
2015-10-29 21:10:36 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
* Modify the associated user data.
|
2015-10-29 21:10:36 +01:00
|
|
|
*/
|
2017-02-21 20:24:59 +01:00
|
|
|
void SetData(LightObj & data);
|
2015-10-29 21:10:36 +01:00
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Destroy the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
bool Destroy0() const // NOLINT(modernize-use-nodiscard)
|
2016-03-10 04:57:13 +01:00
|
|
|
{
|
2017-02-21 20:24:59 +01:00
|
|
|
return Destroy(0, NullLightObj());
|
2016-03-10 04:57:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Destroy the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
bool Destroy1(int32_t header) const // NOLINT(modernize-use-nodiscard)
|
2016-03-10 04:57:13 +01:00
|
|
|
{
|
2017-02-21 20:24:59 +01:00
|
|
|
return Destroy(header, NullLightObj());
|
2016-03-10 04:57:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Destroy the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
bool Destroy(int32_t header, LightObj & payload) const; // NOLINT(modernize-use-nodiscard)
|
2015-10-29 21:10:36 +01:00
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
2017-02-21 20:24:59 +01:00
|
|
|
* Retrieve the events table of this entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD LightObj & GetEvents() const;
|
2015-10-29 21:10:36 +01:00
|
|
|
|
2016-07-26 23:13:50 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Emit a custom event for the managed entity
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void CustomEvent(int32_t header, LightObj & payload) const;
|
2016-07-26 23:13:50 +02:00
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* See if the managed object entity is streamed for the specified player.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD bool IsStreamedFor(CPlayer & player) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the model of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetModel() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the world in which the managed object entity exists.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetWorld() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the world in which the managed object entity exists.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetWorld(int32_t world);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the alpha of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetAlpha() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the alpha of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetAlpha(int32_t alpha);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the alpha of the managed object entity over the specified time.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetAlphaEx(int32_t alpha, uint32_t time);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Move the managed object entity to the specified position over the specified time.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void MoveTo(const Vector3 & pos, uint32_t time) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Move the managed object entity to the specified position over the specified time.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void MoveToEx(float x, float y, float z, uint32_t time) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Move the managed object entity by the specified position over the specified time.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void MoveBy(const Vector3 & pos, uint32_t time) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Move the managed object entity by the specified position over the specified time.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void MoveByEx(float x, float y, float z, uint32_t time) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the position of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD Vector3 GetPosition() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the position of the managed object entity.
|
|
|
|
*/
|
2016-02-20 23:25:00 +01:00
|
|
|
void SetPosition(const Vector3 & pos) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the position of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetPositionEx(float x, float y, float z) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Rotate the managed object entity to the specified rotation over the specified time.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RotateTo(const Quaternion & rot, uint32_t time) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Rotate the managed object entity to the specified rotation over the specified time.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RotateToEx(float x, float y, float z, float w, uint32_t time) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Rotate the managed object entity to the specified Euler rotation over the specified time.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RotateToEuler(const Vector3 & rot, uint32_t time) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Rotate the managed object entity to the specified Euler rotation over the specified time.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RotateToEulerEx(float x, float y, float z, uint32_t time) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Rotate the managed object entity by the specified rotation over the specified time.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RotateBy(const Quaternion & rot, uint32_t time) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Rotate the managed object entity by the specified rotation over the specified time.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RotateByEx(float x, float y, float z, float w, uint32_t time) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Rotate the managed object entity by the specified Euler rotation over the specified time.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RotateByEuler(const Vector3 & rot, uint32_t time) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Rotate the managed object entity by the specified Euler rotation over the specified time.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RotateByEulerEx(float x, float y, float z, uint32_t time) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the rotation of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD Quaternion GetRotation() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the Euler rotation of the managed object entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD Vector3 GetRotationEuler() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* See whether the managed object entity reports gunshots.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD bool GetShotReport() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Set whether the managed object entity reports gunshots.
|
|
|
|
*/
|
2016-08-18 16:12:00 +02:00
|
|
|
void SetShotReport(bool toggle);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* See whether the managed object entity reports player bumps.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD bool GetTouchedReport() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Set whether the managed object entity reports player bumps.
|
|
|
|
*/
|
2016-08-18 16:12:00 +02:00
|
|
|
void SetTouchedReport(bool toggle);
|
2016-02-20 23:25:00 +01:00
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the position on the x axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD float GetPositionX() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the position on the y axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD float GetPositionY() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the position on the z axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD float GetPositionZ() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the position on the x axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetPositionX(float x) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the position on the y axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetPositionY(float y) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the position on the z axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetPositionZ(float z) const;
|
2016-02-20 23:25:00 +01:00
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the rotation on the x axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD float GetRotationX() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the rotation on the y axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD float GetRotationY() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the rotation on the z axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD float GetRotationZ() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the rotation amount of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD float GetRotationW() const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the Euler rotation on the x axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD float GetEulerRotationX() const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the Euler rotation on the y axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD float GetEulerRotationY() const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the Euler rotation on the z axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD float GetEulerRotationZ() const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the position on the x axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void MoveToX(float x) const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the position on the y axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void MoveToY(float y) const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the position on the z axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void MoveToZ(float z) const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the position on the x axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void MoveByX(float x) const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the position on the y axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void MoveByY(float y) const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the position on the z axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void MoveByZ(float z) const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the rotation on the x axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RotateToX(float x) const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the rotation on the y axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RotateToY(float y) const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the rotation on the z axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RotateToZ(float z) const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the rotation on the w axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RotateToW(float w) const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the rotation on the x axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RotateByX(float x) const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the rotation on the y axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RotateByY(float y) const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the rotation on the z axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RotateByZ(float z) const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the rotation on the w axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RotateByW(float w) const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the rotation on the x axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RotateToEulerX(float x) const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the rotation on the y axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RotateToEulerY(float y) const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the rotation on the z axis of the managed object entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RotateToEulerZ(float z) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Modify the rotation on the x axis of the managed object entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RotateByEulerX(float x) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Modify the rotation on the y axis of the managed object entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RotateByEulerY(float y) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Modify the rotation on the z axis of the managed object entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RotateByEulerZ(float z) const;
|
2022-07-23 21:09:30 +02:00
|
|
|
#ifdef VCMP_ENABLE_OFFICIAL
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve legacy object instance for this entity.
|
|
|
|
*/
|
|
|
|
LightObj & GetLegacyObject() const;
|
|
|
|
#endif
|
2015-09-30 02:56:11 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // Namespace:: SqMod
|