#include <cmpPhys.h>

Public Member Functions | |
| CCmpPhys (CGameEntity *pGE) | |
| Create with default values. | |
Virtual methods | |
| virtual int | set (const EDIT_DATA &editData) |
| Set a value. | |
| virtual int | get (EDIT_DATA &editData) const |
| Get a value. | |
| virtual int | act (const ACTION_DATA &actData) |
| Preform an action. | |
| virtual void | update () |
| Update this Cmp for a single frame. | |
Force/Velocity/Torque methods | |
| void | add_force (const CVector3D &vForce) |
| Apply a force to the center of mass (time corrected). | |
| void | add_force (CVector3D &vForce, unit fric) |
| Add force using friction. | |
| void | add_vel (const CVector3D &vel) |
| Add velocity of the object directly. | |
| void | vel (const CVector3D &vel) |
| Set the velocity of the object directly. | |
| void | add_torque (const CAngle3D &aTorque) |
| Apply a torque around the center of mass. | |
| void | aVel (const CAngle3D &ang) |
| Set the angular velocity of the object directly. | |
Info methods | |
| bool | collided () const |
| |
| unit | dist () const |
| |
| unit | mass () const |
| |
| const CVector3D & | vel () const |
| |
| const CAngle3D & | aVel () const |
| |
| unit | speed () const |
| |
(c) 2007-2008 oP group Germany GbR. All rights reserved.
This source code is provided "as is" with no warranty and must not be distributed without written permission.
| int CCmpPhys::set | ( | const EDIT_DATA & | editData | ) | [virtual] |
Set a value.
If we have data of this type, use editData to set its value.
| editData | Data type and value (see EDIT_DATA struct). |
Implements CCmp.
| int CCmpPhys::get | ( | EDIT_DATA & | editData | ) | const [virtual] |
Get a value.
If we have data of this type, use editData to get its value.
| editData | Data type we are looking for, and memory to store value (see EDIT_DATA struct). |
Implements CCmp.
| int CCmpPhys::act | ( | const ACTION_DATA & | actData | ) | [virtual] |
Preform an action.
Handle the action passed in (ignore if we do not handle the action type).
| actData | The data used to preform the action (see ACTION_DATA struct). |
Implements CCmp.
1.5.4