CORGI
An open source project by FPL.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Groups Pages
PhysicsData Struct Reference

Data for scene object Components. More...

#include <physics.h>

Detailed Description

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...
 
PhysicsDataoperator= (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...
 

Constructor & Destructor Documentation

PhysicsData::PhysicsData ( PhysicsData &&  src)

The move constructor for PhysicsData.

Parameters
[in]srcThe other PhysicsData to move into this PhysicsData.

Member Function Documentation

mathfu::vec3 PhysicsData::AngularVelocity ( ) const

Get the angular velocity of the Entity.

Returns
Returns the angular velocity of the Entity as a mathfu::vec3.
int PhysicsData::body_count ( ) const
inline

Get the number of physics shapes for this Entity.

Returns
Returns an int corresponding to the body count.
bool PhysicsData::enabled ( ) const
inline

Check if this physics is enabled for this Entity.

Returns
Returns 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.

Parameters
[in]rigid_body_idxThe index of the rigid body whose AABB should be returned though min and max.
[out]minA mathfu::vec3 pointer that captures the output of the mininum corner of the AABB.
[out]maxA 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.

Parameters
[in]srcThe 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.

Parameters
[in]user_tagA const reference to a std::string of the tag for the desired rigid body.
Returns
Returns an int corresponding to the index of the rigid body.
void PhysicsData::SetAngularVelocity ( const mathfu::vec3 &  velocity)

Set the angular velocity of the Entity.

Parameters
[in]velocityA 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.

Parameters
[in]velocityA const mathfu::vec3 reference to the velocity to set for this Entity.
mathfu::vec3 PhysicsData::Velocity ( ) const

Get the velocity of the Entity.

Returns
Returns the velocity of this Entity as a mathfu::vec3.

The documentation for this struct was generated from the following file: