format codebase

This commit is contained in:
aronwk-aaron
2022-07-28 08:39:57 -05:00
parent 4f7aa11067
commit 19e77a38d8
881 changed files with 34700 additions and 38689 deletions

View File

@@ -25,191 +25,191 @@ class dpEntity;
*/
class PhantomPhysicsComponent : public Component {
public:
static const uint32_t ComponentType = COMPONENT_TYPE_PHANTOM_PHYSICS;
PhantomPhysicsComponent(Entity* parent);
~PhantomPhysicsComponent() override;
void Update(float deltaTime) override;
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate, unsigned int& flags);
void ResetFlags();
static const uint32_t ComponentType = COMPONENT_TYPE_PHANTOM_PHYSICS;
/**
* Creates the physics shape for this entity based on LDF data
*/
PhantomPhysicsComponent(Entity* parent);
~PhantomPhysicsComponent() override;
void Update(float deltaTime) override;
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate, unsigned int& flags);
void ResetFlags();
/**
* Creates the physics shape for this entity based on LDF data
*/
void CreatePhysics();
/**
* Sets the direction this physics object is pointed at
* @param pos the direction to set
*/
void SetDirection(const NiPoint3& pos);
/**
* Sets the direction this physics object is pointed at
* @param pos the direction to set
*/
void SetDirection(const NiPoint3& pos);
/**
* Returns the direction this physics object is pointed at
* @return the direction this physics object is pointed at
*/
const NiPoint3& GetDirection() const { return m_Direction; }
/**
* Returns the direction this physics object is pointed at
* @return the direction this physics object is pointed at
*/
const NiPoint3& GetDirection() const { return m_Direction; }
/**
* Returns the multiplier by which the direction coordinates are multiplied
* @return the multiplier by which the direction coordinates are multiplied
*/
float GetDirectionalMultiplier() const { return m_DirectionalMultiplier; }
/**
* Returns the multiplier by which the direction coordinates are multiplied
* @return the multiplier by which the direction coordinates are multiplied
*/
float GetDirectionalMultiplier() const { return m_DirectionalMultiplier; }
/**
* Sets the multiplier by which direction coordinates are multiplied
* @param mul the multiplier to set
*/
void SetDirectionalMultiplier(float mul);
/**
* Sets the multiplier by which direction coordinates are multiplied
* @param mul the multiplier to set
*/
void SetDirectionalMultiplier(float mul);
/**
* Returns whether or not there's currently an effect active
* @return true if there's an effect active, false otherwise
*/
bool GetPhysicsEffectActive() const { return m_IsPhysicsEffectActive; }
/**
* Returns whether or not there's currently an effect active
* @return true if there's an effect active, false otherwise
*/
bool GetPhysicsEffectActive() const { return m_IsPhysicsEffectActive; }
/**
* Sets whether or not there's a physics effect active
* @param val whether or not there's an effect active
*/
void SetPhysicsEffectActive(bool val) { m_IsPhysicsEffectActive = val; m_EffectInfoDirty = true; }
/**
* Sets whether or not there's a physics effect active
* @param val whether or not there's an effect active
*/
void SetPhysicsEffectActive(bool val) { m_IsPhysicsEffectActive = val; m_EffectInfoDirty = true; }
/**
* Returns the position of this physics object
* @return the position of this physics object
*/
const NiPoint3& GetPosition() const { return m_Position; }
/**
* Returns the position of this physics object
* @return the position of this physics object
*/
const NiPoint3& GetPosition() const { return m_Position; }
/**
* Sets the position of this physics object
* @param pos the position to set
*/
void SetPosition(const NiPoint3& pos);
/**
* Sets the position of this physics object
* @param pos the position to set
*/
void SetPosition(const NiPoint3& pos);
/**
* Returns the rotation of this physics object
* @return the rotation of this physics object
*/
const NiQuaternion& GetRotation() const { return m_Rotation; }
/**
* Returns the rotation of this physics object
* @return the rotation of this physics object
*/
const NiQuaternion& GetRotation() const { return m_Rotation; }
/**
* Sets the rotation of this physics object
* @param rot the rotation to set
*/
void SetRotation(const NiQuaternion& rot);
/**
* Sets the rotation of this physics object
* @param rot the rotation to set
*/
void SetRotation(const NiQuaternion& rot);
/**
* Returns the effect that's currently active, defaults to 0
* @return the effect that's currently active
*/
uint32_t GetEffectType() const { return m_EffectType; }
/**
* Returns the effect that's currently active, defaults to 0
* @return the effect that's currently active
*/
uint32_t GetEffectType() const { return m_EffectType; }
/**
* Sets the effect that's currently active
* @param type the effect to set
*/
void SetEffectType(uint32_t type);
/**
* Sets the effect that's currently active
* @param type the effect to set
*/
void SetEffectType(uint32_t type);
/**
* Returns the Physics entity for the component
* @return Physics entity for the component
*/
/**
* Returns the Physics entity for the component
* @return Physics entity for the component
*/
dpEntity* GetdpEntity() const { return m_dpEntity; }
dpEntity* GetdpEntity() const { return m_dpEntity; }
/**
* Spawns an object at each of the vertices for debugging purposes
*/
void SpawnVertices();
/**
* Spawns an object at each of the vertices for debugging purposes
*/
void SpawnVertices();
/**
* Legacy stuff no clue what this does
*/
void SetMin(uint32_t min);
/**
* Legacy stuff no clue what this does
*/
void SetMin(uint32_t min);
/**
* Legacy stuff no clue what this does
*/
void SetMax(uint32_t max);
/**
* Legacy stuff no clue what this does
*/
void SetMax(uint32_t max);
private:
/**
* The position of the physics object
*/
NiPoint3 m_Position;
/**
* The position of the physics object
*/
NiPoint3 m_Position;
/**
* The rotation of the physics object
*/
NiQuaternion m_Rotation;
/**
* The rotation of the physics object
*/
NiQuaternion m_Rotation;
/**
* A scale to apply to the size of the physics object
*/
/**
* A scale to apply to the size of the physics object
*/
float m_Scale;
/**
* Whether or not the position has changed and needs to be serialized
*/
bool m_PositionInfoDirty;
/**
* Whether or not the position has changed and needs to be serialized
*/
bool m_PositionInfoDirty;
/**
* Whether or not the effect has changed and needs to be serialized
*/
bool m_EffectInfoDirty;
/**
* Whether or not the effect has changed and needs to be serialized
*/
bool m_EffectInfoDirty;
/**
* Whether or not there's currently a physics effect active
*/
bool m_IsPhysicsEffectActive;
/**
* Whether or not there's currently a physics effect active
*/
bool m_IsPhysicsEffectActive;
/**
* The physics effect that's currently active, defaults to 0
*/
uint32_t m_EffectType;
/**
* The physics effect that's currently active, defaults to 0
*/
uint32_t m_EffectType;
/**
* A scaling multiplier to add to the directional vector
*/
float m_DirectionalMultiplier;
bool m_MinMax;
uint32_t m_Min;
uint32_t m_Max;
/**
* A scaling multiplier to add to the directional vector
*/
float m_DirectionalMultiplier;
/**
* Whether or not this physics object is pointed in some direction
*/
bool m_IsDirectional;
bool m_MinMax;
uint32_t m_Min;
uint32_t m_Max;
/**
* The direction this physics object is pointed in, if any
*/
NiPoint3 m_Direction;
/**
* Whether or not this physics object is pointed in some direction
*/
bool m_IsDirectional;
/**
* The parent entity of this component
*/
dpEntity* m_dpEntity;
/**
* The direction this physics object is pointed in, if any
*/
NiPoint3 m_Direction;
/**
* Whether or not the physics object has been created yet
*/
/**
* The parent entity of this component
*/
dpEntity* m_dpEntity;
/**
* Whether or not the physics object has been created yet
*/
bool m_HasCreatedPhysics = false;
/**
* Whether or not this physics object represents an object that updates the respawn pos of an entity that crosses it
*/
/**
* Whether or not this physics object represents an object that updates the respawn pos of an entity that crosses it
*/
bool m_IsRespawnVolume = false;
/**
* If this is a respawn volume, the exact position an entity will respawn
*/
/**
* If this is a respawn volume, the exact position an entity will respawn
*/
NiPoint3 m_RespawnPos;
/**
* If this is a respawn volume, the exact rotation an entity will respawn
*/
/**
* If this is a respawn volume, the exact rotation an entity will respawn
*/
NiQuaternion m_RespawnRot;
};
};