mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-09-05 23:08:31 +00:00
format codebase
This commit is contained in:
@@ -12,59 +12,59 @@
|
||||
#include "NiQuaternion.h"
|
||||
#include "Component.h"
|
||||
|
||||
/**
|
||||
* Component that handles rigid bodies that can be interacted with, mostly client-side rendered. An example is the
|
||||
* bananas that fall from trees in GF.
|
||||
*/
|
||||
/**
|
||||
* Component that handles rigid bodies that can be interacted with, mostly client-side rendered. An example is the
|
||||
* bananas that fall from trees in GF.
|
||||
*/
|
||||
class RigidbodyPhantomPhysicsComponent : public Component {
|
||||
public:
|
||||
static const uint32_t ComponentType = COMPONENT_TYPE_PHANTOM_PHYSICS;
|
||||
|
||||
RigidbodyPhantomPhysicsComponent(Entity* parent);
|
||||
~RigidbodyPhantomPhysicsComponent() override;
|
||||
|
||||
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate, unsigned int& flags);
|
||||
static const uint32_t ComponentType = COMPONENT_TYPE_PHANTOM_PHYSICS;
|
||||
|
||||
/**
|
||||
* Returns the position of this entity
|
||||
* @return the position of this entity
|
||||
*/
|
||||
NiPoint3& GetPosition() { return m_Position; }
|
||||
RigidbodyPhantomPhysicsComponent(Entity* parent);
|
||||
~RigidbodyPhantomPhysicsComponent() override;
|
||||
|
||||
/**
|
||||
* Sets the position of this entity
|
||||
* @param pos the position to set
|
||||
*/
|
||||
void SetPosition(const NiPoint3& pos) { m_Position = pos; m_IsDirty = true; }
|
||||
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate, unsigned int& flags);
|
||||
|
||||
/**
|
||||
* Returns the rotation of this entity
|
||||
* @return the rotation of this entity
|
||||
*/
|
||||
NiQuaternion& GetRotation() { return m_Rotation; }
|
||||
/**
|
||||
* Returns the position of this entity
|
||||
* @return the position of this entity
|
||||
*/
|
||||
NiPoint3& GetPosition() { return m_Position; }
|
||||
|
||||
/**
|
||||
* Sets the rotation for this entity
|
||||
* @param rot the rotation to tset
|
||||
*/
|
||||
void SetRotation(const NiQuaternion& rot) { m_Rotation = rot; m_IsDirty = true; }
|
||||
/**
|
||||
* Sets the position of this entity
|
||||
* @param pos the position to set
|
||||
*/
|
||||
void SetPosition(const NiPoint3& pos) { m_Position = pos; m_IsDirty = true; }
|
||||
|
||||
/**
|
||||
* Returns the rotation of this entity
|
||||
* @return the rotation of this entity
|
||||
*/
|
||||
NiQuaternion& GetRotation() { return m_Rotation; }
|
||||
|
||||
/**
|
||||
* Sets the rotation for this entity
|
||||
* @param rot the rotation to tset
|
||||
*/
|
||||
void SetRotation(const NiQuaternion& rot) { m_Rotation = rot; m_IsDirty = true; }
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* The position of this entity
|
||||
*/
|
||||
NiPoint3 m_Position;
|
||||
/**
|
||||
* The position of this entity
|
||||
*/
|
||||
NiPoint3 m_Position;
|
||||
|
||||
/**
|
||||
* The rotation of this entity
|
||||
*/
|
||||
NiQuaternion m_Rotation;
|
||||
/**
|
||||
* The rotation of this entity
|
||||
*/
|
||||
NiQuaternion m_Rotation;
|
||||
|
||||
/**
|
||||
* Whether or not the component should be serialized
|
||||
*/
|
||||
bool m_IsDirty;
|
||||
/**
|
||||
* Whether or not the component should be serialized
|
||||
*/
|
||||
bool m_IsDirty;
|
||||
};
|
||||
|
||||
#endif // RIGIDBODYPHANTOMPHYSICS_H
|
||||
|
Reference in New Issue
Block a user