CORGI
An open source project by
FPL.
|
Data for scene object Components. More...
#include <physics.h>
Data for scene object Components.
Public Member Functions | |
PhysicsData () | |
Constructor for PhysicsData. | |
~PhysicsData () | |
Destructor for PhysicsData. | |
PhysicsData (PhysicsData &&src) | |
The move constructor for PhysicsData. More... | |
PhysicsData & | operator= (PhysicsData &&src) |
The move assignment operator for PhysicsData. More... | |
mathfu::vec3 | Velocity () const |
Get the velocity of the Entity. More... | |
void | SetVelocity (const mathfu::vec3 &velocity) |
Set the velocity of the Entity. More... | |
mathfu::vec3 | AngularVelocity () const |
Get the angular velocity of the Entity. More... | |
void | SetAngularVelocity (const mathfu::vec3 &velocity) |
Set the angular velocity of the Entity. More... | |
int | RigidBodyIndex (const std::string &user_tag) const |
Get the index for the RigidBody for a given tag. More... | |
void | GetAabb (int rigid_body_idx, mathfu::vec3 *min, mathfu::vec3 *max) const |
Get the axis-aligned bounding box (AABB) of a rigid body at a given index. More... | |
bool | enabled () const |
Check if this physics is enabled for this Entity. More... | |
int | body_count () const |
Get the number of physics shapes for this Entity. More... | |
PhysicsData::PhysicsData | ( | PhysicsData && | src | ) |
The move constructor for PhysicsData.
[in] | src | The other PhysicsData to move into this PhysicsData. |
mathfu::vec3 PhysicsData::AngularVelocity | ( | ) | const |
Get the angular velocity of the Entity.
|
inline |
Get the number of physics shapes for this Entity.
|
inline |
Check if this physics is enabled for this Entity.
true
if the physics is enabled. Otherwise, return false
. void PhysicsData::GetAabb | ( | int | rigid_body_idx, |
mathfu::vec3 * | min, | ||
mathfu::vec3 * | max | ||
) | const |
Get the axis-aligned bounding box (AABB) of a rigid body at a given index.
[in] | rigid_body_idx | The index of the rigid body whose AABB should be returned though min and max . |
[out] | min | A mathfu::vec3 pointer that captures the output of the mininum corner of the AABB. |
[out] | max | A mathfu::vec3 pointer that captures the output of the maximum corner of the AABB. |
PhysicsData& PhysicsData::operator= | ( | PhysicsData && | src | ) |
The move assignment operator for PhysicsData.
[in] | src | The other PhysicsData to move into this PhysicsData. |
int PhysicsData::RigidBodyIndex | ( | const std::string & | user_tag | ) | const |
Get the index for the RigidBody for a given tag.
[in] | user_tag | A const reference to a std::string of the tag for the desired rigid body. |
void PhysicsData::SetAngularVelocity | ( | const mathfu::vec3 & | velocity | ) |
Set the angular velocity of the Entity.
[in] | velocity | A const mathfu::vec3 reference to the angular velocity to set for the Entity. |
void PhysicsData::SetVelocity | ( | const mathfu::vec3 & | velocity | ) |
Set the velocity of the Entity.
[in] | velocity | A const mathfu::vec3 reference to the velocity to set for this Entity. |
mathfu::vec3 PhysicsData::Velocity | ( | ) | const |
Get the velocity of the Entity.