#include <phyzent.h>
Inheritance diagram for ctPhysicalEntity:
Public Methods | |
ctPhysicalEntity () | |
Default refrence frame will be inertial frame. | |
ctPhysicalEntity (ctReferenceFrame &ref, ctDeltaReferenceFrame &dref) | |
Use specified reference frame. | |
virtual | ~ctPhysicalEntity () |
virtual void | init_state () |
Init values that will influence the calculation of the change in state. | |
virtual int | get_state_size () |
Return the size of this entity's state vector. | |
virtual int | set_state (real *sa) |
Add this body's state to the state vector buffer passed in. More... | |
virtual int | get_state (const real *sa) |
Download state from buffer into this entity. | |
virtual int | set_delta_state (real *state_array) |
Add change in state vector over time to state buffer parameter. | |
virtual void | rotate_around_line (ctVector3 &paxis, real ptheta) |
change orientation in radians. | |
virtual void | set_pos (const ctVector3 &px) |
Set position. | |
virtual void | set_v (const ctVector3 &pv) |
virtual because v is calculated from P ( momentum ) in rigid bodies. | |
virtual ctVector3 | get_v () |
Get linear velocity. | |
virtual void | set_angular_v (const ctVector3 &pw) |
Set angular velocity. | |
virtual ctVector3 | get_angular_v () |
Get angular velocity. | |
ctVector3 | get_F () |
Get total added force for frame. | |
ctVector3 | get_torque () |
Get total torque for frame. | |
void | set_F (const ctVector3 &pF) |
Set total force for frame. | |
void | set_torque (const ctVector3 &pT) |
Set total force for frame. | |
void | sum_force (const ctVector3 &f) |
Add additional force. | |
void | sum_torque (const ctVector3 &t) |
Add additional torque. | |
virtual void | apply_given_F (ctForce &frc) |
Add this force to the list of forces that will be applied each frame. | |
void | print_force () |
For debugging. | |
virtual ctPhysicalEntity* | get_collidable_entity () |
collision routines. | |
virtual void | apply_impulse (ctVector3 impulse_point, ctVector3 impulse_vector) |
Can use this to impart and impulse to this object. More... | |
virtual void | get_impulse_m_and_I_inv (real *pm, ctMatrix3 *pI_inv, const ctVector3 &impulse_point, const ctVector3 &unit_length_impulse_vector) |
Fill out mass and inverse inertia tensor behaviour for an impulse response impulse_point is point of collision in world frame. | |
const ctMatrix3& | get_R () |
const ctMatrix3& | get_T () |
const ctVector3& | get_pos () |
const ctVector3& | get_org_world () |
const ctMatrix3& | get_world_to_this () |
const ctMatrix3& | get_this_to_world () |
void | v_this_to_world (ctVector3 &pv) |
ctVector3 | get_v_this_to_world (ctVector3 &pv) |
ctReferenceFrame* | get_RF () |
ctDeltaReferenceFrame* | get_dRF () |
Protected Attributes | |
ctReferenceFrame& | RF |
Frame of reference. Orientation and position are stored here. | |
ctDeltaReferenceFrame& | dRF |
Change of RF wrt time. ( angular and linear velocity ). | |
ctVector3 | F |
Total added Force for a frame. | |
ctVector3 | T |
Total Torque for a frame. |
|
Can use this to impart and impulse to this object. Impulse_point is vector from center of body to point of collision in world coordinates. Impulse_vector is in world coords Reimplemented in ctArticulatedBody, and ctRigidBody. |
|
Add this body's state to the state vector buffer passed in. Increment state buffer to point after added state. Upload Reimplemented in ctArticulatedBody, and ctRigidBody. |