|
Wasabi
|
#include <WRigidBody.hpp>
Public Member Functions | |
| WRigidBody (class Wasabi *const app, uint32_t ID=0) | |
| WError | BuildFromGeometries (W_RIGIDBODYTYPE type, class WGeometry *const *geometries, uint32_t numGeometries, bool bFixed=false, bool bSimplify=true, void *mopp=nullptr, uint32_t moppsize=0) |
| void | Destroy () |
| void | BindObject (class WObject *const object) |
| void | UnbindObject (class WObject *const object) |
| void | UnbindObject (uint32_t ID) |
| void | Enable () |
| void | Disable () |
| bool | Enabled () const |
| void | SetLinearVelocity (float velX, float velY, float velZ) |
| void | SetAngularVelocity (float velX, float velY, float velZ) |
| void | SetLinearDamping (float power) |
| void | SetAngularDamping (float power) |
| void | SetMaxLinearVelocity (float fScalarVelocity) |
| void | SetMaxAngularVelocity (float fScalarVelocity) |
| void | SetMotionType (W_MOTIONTYPE type) |
| void | SetBouncingPower (float bouncing) |
| void | SetMass (float mass) |
| void | SetMassCenter (float x, float y, float z) |
| void | SetFriction (float friction) |
| void | SetCollisionQuality (W_COLLISIONQUALITY quality) |
| void | UpdateLocals () |
| WMatrix | GetWorldMatrix () |
| hkQuaternion | GetRotationQuat () |
| W_RIGIDBODYTYPE | GetType () const |
| hkpRigidBody * | GetRigidBody () const |
| bool | Valid () const |
| void | OnStateChange (STATE_CHANGE_TYPE type) |
| WRigidBody (class Wasabi *const app, uint32_t ID=0) | |
| virtual WError | Create (W_RIGID_BODY_CREATE_INFO createInfo, bool bSaveInfo=false)=0 |
| virtual void | Update (float deltaTime)=0 |
| virtual void | BindObject (WOrientation *obj, WBase *objBase=nullptr)=0 |
| virtual void | SetLinearVelocity (WVector3 vel)=0 |
| virtual void | SetAngularVelocity (WVector3 vel)=0 |
| virtual void | SetLinearDamping (float power)=0 |
| virtual void | SetAngularDamping (float power)=0 |
| virtual void | SetBouncingPower (float bouncing)=0 |
| virtual void | SetMass (float mass)=0 |
| virtual void | SetMassCenter (float x, float y, float z)=0 |
| virtual void | SetFriction (float friction)=0 |
| virtual void | ApplyForce (WVector3 force)=0 |
| virtual void | ApplyForce (WVector3 force, WVector3 relative_pos)=0 |
| virtual void | ApplyImpulse (WVector3 impulse)=0 |
| virtual void | ApplyImpulse (WVector3 impulse, WVector3 relative_pos)=0 |
| virtual void | ApplyTorque (WVector3 torque)=0 |
| virtual WVector3 | getLinearVelocity () const =0 |
| virtual WVector3 | getAngularVelocity () const =0 |
| virtual WVector3 | getTotalForce () const =0 |
| virtual WVector3 | getTotalTorque () const =0 |
| virtual void | OnStateChange (STATE_CHANGE_TYPE type)=0 |
| virtual WError | SaveToStream (WFile *file, std::ostream &outputStream)=0 |
| virtual WError | LoadFromStream (WFile *file, std::istream &inputStream, std::vector< void * > &args, std::string nameSuffix)=0 |
Public Member Functions inherited from WBase | |
| WBase (class Wasabi *const app, uint32_t ID=0) | |
| virtual void | SetID (uint32_t newID)=0 |
| virtual void | SetName (std::string newName)=0 |
| uint32_t | GetID () const |
| std::string | GetName () const |
| class Wasabi * | GetAppPtr () const |
| void | AddReference () |
| void | RemoveReference () |
Public Member Functions inherited from WOrientation | |
| void | SetPosition (float x, float y, float z) |
| void | SetPosition (const WVector3 pos) |
| void | Point (float x, float y, float z) |
| void | Point (WVector3 target) |
| void | SetAngle (WQuaternion quat) |
| void | SetToRotation (const WOrientation *const device) |
| void | SetULRVectors (WVector3 up, WVector3 look, WVector3 right) |
| void | SetToTransformation (WMatrix mtx) |
| void | Yaw (float angle) |
| void | Roll (float angle) |
| void | Pitch (float angle) |
| void | Move (float units) |
| void | Strafe (float units) |
| void | Fly (float units) |
| float | GetPositionX () const |
| float | GetPositionY () const |
| float | GetPositionZ () const |
| WVector3 | GetPosition () const |
| float | GetAngleX () const |
| float | GetAngleY () const |
| float | GetAngleZ () const |
| WQuaternion | GetRotation () const |
| WVector3 | GetUVector () const |
| WVector3 | GetLVector () const |
| WVector3 | GetRVector () const |
| virtual void | SetBindingMatrix (WMatrix mtx) |
| void | RemoveBinding () |
| WMatrix | GetBindingMatrix () const |
| bool | IsBound () const |
| WMatrix | ComputeTransformation () const |
| WMatrix | ComputeInverseTransformation () const |
Additional Inherited Members | |
Protected Attributes inherited from WBase | |
| class Wasabi * | m_app |
| uint32_t | m_ID |
| std::string | m_name |
This is an interface for implementing a rigid body.
|
pure virtual |
Applies force to the center of the rigid body
Implemented in WBulletRigidBody.
Applies force to the rigid body relative to a coordinate (will also apply rotation)
Implemented in WBulletRigidBody.
|
pure virtual |
Applies an impulse to the center of the rigid body
Implemented in WBulletRigidBody.
Applies an impulse to the rigid body relative to a coordinate
Implemented in WBulletRigidBody.
|
pure virtual |
Applies torque to the rigid body
Implemented in WBulletRigidBody.
|
pure virtual |
Must be implemented to attach a WOrientation to this rigid body
| obj | A WOrientation (WObject, WCamera, etc...) to attach |
| objBase | An optional (but highly recommended) parameter to specify the WBase* pointer that obj is associated with. This will cause the rigid body to hold a reference to the object until unbound. |
Implemented in WBulletRigidBody.
|
pure virtual |
Must be implemented to initialize the rigid body.
| createInfo | Various parameters for the rigid body creation |
| bSaveInfo | If set to true, the rigid body will store the creation information so that it can be later saved to file |
Implemented in WBulletRigidBody.
|
pure virtual |
Retrieves the angular velocity of the rigid body
Implemented in WBulletRigidBody.
|
pure virtual |
Retrieves the linear velocity of the rigid body
Implemented in WBulletRigidBody.
|
pure virtual |
Retrieves the total force currently applied on the rigid body
Implemented in WBulletRigidBody.
|
pure virtual |
Retrieves the total torque currently applied on the rigid body
Implemented in WBulletRigidBody.
|
virtual |
A callback called by this class when the entity changes its position or orientation.
| type | Orientation change type |
Reimplemented from WOrientation.
|
pure virtual |
A callback called by this class when the entity changes its position or orientation.
| type | Orientation change type |
Reimplemented from WOrientation.
Implemented in WBulletRigidBody.
|
pure virtual |
Sets the angular damping of the rigid body
Implemented in WBulletRigidBody.
|
pure virtual |
Sets the angular velocity of the rigid body
Implemented in WBulletRigidBody.
|
pure virtual |
Sets the bouncing power (restitution) of the rigid body
Implemented in WBulletRigidBody.
|
pure virtual |
Sets the friction of the rigid body
Implemented in WBulletRigidBody.
|
pure virtual |
Sets the linear damping of the rigid body
Implemented in WBulletRigidBody.
|
pure virtual |
Sets the linear velocity of the rigid body
Implemented in WBulletRigidBody.
|
pure virtual |
Sets the mass of the rigid body
Implemented in WBulletRigidBody.
|
pure virtual |
Sets the center of mass of the rigid body
Implemented in WBulletRigidBody.
|
pure virtual |
Called by WBulletPhysics after stepping the physics simulation to update the rigid bodies.
| deltaTime | Time elapsed since last frame |
Implemented in WBulletRigidBody.
|
virtual |
Must be implemented by the child. This function should report the validity status of the object, in whatever sense of "validity" it chooses.
Implements WBase.
1.8.17