|
Couch
|
#include <Rigidbody.h>


Public Member Functions | |
| virtual void | Translate (Vector3 offset) |
| void | SetCollisionShape (CollisionShape collisionShape) |
| float | GetMass () |
| void | SetMass (float mass) |
| void | ApplyImpulse (Vector3 impulse) |
| void | ApplyForce (Vector3 force) |
| bool | GetCharacter () |
| void | SetCharacter (bool character) |
| virtual Rigidbody * | Create () |
| virtual Rigidbody * | Duplicate () |
| virtual Rigidbody * | Instance () |
Public Member Functions inherited from Spatial | |
| virtual Name | GetType () const |
| Transform | GetTransform () |
| void | SetTransform (Transform transform) |
| Transform | GetGlobalTransform () |
| void | SetGlobalTransform (Transform globalTransform) |
| void | RotateX (float phi) |
| void | RotateY (float phi) |
| void | RotateZ (float phi) |
| void | UniformScale (float scale) |
Public Member Functions inherited from Node | |
| Node (bool isPrefab) | |
| bool | IsPrefab () |
| NodeList | GetChildren () |
| void | AddChild (Node *child) |
| Node * | GetParent () |
| void | QueueFree () |
| void | DoFree () |
Friends | |
| class | World |
Additional Inherited Members | |
Static Public Member Functions inherited from Node | |
| static Node * | GetRoot () |
Rigidbodies are any body that interacts with the physics bodies
| void Rigidbody::ApplyForce | ( | Vector3 | force | ) |
Add a force to this object, scaled to the time step. Can be called every update.
| The | (unscaled) force |
| void Rigidbody::ApplyImpulse | ( | Vector3 | impulse | ) |
Add an instantaneous impulse to the object. Probably shouldn't be called every update.
| impulse | The impulse vector |
|
virtual |
Allocates a new "default" version of this node.
Reimplemented from Spatial.
|
virtual |
| bool Rigidbody::GetCharacter | ( | ) |
If this is a character object, meaning it's rotation is not controlled by the physics engine
| float Rigidbody::GetMass | ( | ) |
Gets the mass of this rigidbody
|
virtual |
Creates an instanced version of this node, by calling Duplicate. Subclasses should override this to perform neccesary tasks for instantiation, i.e. adding a physic object to the physics world. Any children of this node will also be instanced.
Reimplemented from Spatial.
| void Rigidbody::SetCharacter | ( | bool | character | ) |
Sets if this object's rotation is controlled by the physics engine
| character | true if this is a character object |
| void Rigidbody::SetCollisionShape | ( | CollisionShape | collisionShape | ) |
Sets the collision shape of this rigidbody
| collisionShape | The collision shape |
| void Rigidbody::SetMass | ( | float | mass | ) |
Sets the mass of this rigidbody. Note that setting mass equal to 0.0 will make it an infinite mass object
| mass | The desired mass |
|
virtual |
Directly translate this physics object.
| offset | The desired translation offset. |
Reimplemented from Spatial.