|
Hymn to Beauty
C++ 3D Engine
|
Component that allows interacting with other physics components. More...
#include <RigidBody.hpp>
Public Member Functions | |
| RigidBody ()=default | |
| Constructor. More... | |
| ~RigidBody () | |
| Destructor. More... | |
| void | Serialize (Json::Value &node, bool load) override |
| Save or load component values to/from JSON. More... | |
| bool | IsKinematic () const |
| bool | IsGhost () const |
| float | GetFriction () const |
| float | GetRollingFriction () const |
| Get the rolling friction coefficient of the rigid body. More... | |
| float | GetSpinningFriction () const |
| Get the spinning friction coefficient of the rigid body. More... | |
| float | GetRestitution () const |
| Get the coefficient of restitution of the rigid body. More... | |
| float | GetLinearDamping () const |
| Get the linear damping of the rigid body. More... | |
| float | GetAngularDamping () const |
| Get the angular damping of the rigid body. More... | |
Public Member Functions inherited from Component::SuperComponent | |
| SuperComponent () | |
| Create new SuperComponent. More... | |
| virtual | ~SuperComponent () |
| Destructor. More... | |
| void | Kill () |
| Kill the component, will be removed at the end of the frame. More... | |
| bool | IsKilled () const |
| Get whether component has been killed. More... | |
Friends | |
| class | ::PhysicsManager |
| class | ::Physics::Trigger |
| class | Shape |
Additional Inherited Members | |
Public Attributes inherited from Component::SuperComponent | |
| Entity * | entity = nullptr |
| Pointer to which entity this component corresponds. More... | |
Component that allows interacting with other physics components.
|
default |
Constructor.
| Component::RigidBody::~RigidBody | ( | ) |
Destructor.
| float Component::RigidBody::GetAngularDamping | ( | ) | const |
Get the angular damping of the rigid body.
| float Component::RigidBody::GetFriction | ( | ) | const |
Get the friction coefficient of the rigid body. Note that this does not necessarily match the real world as objects don't have one single value for friction.
| float Component::RigidBody::GetLinearDamping | ( | ) | const |
Get the linear damping of the rigid body.
| float Component::RigidBody::GetRestitution | ( | ) | const |
Get the coefficient of restitution of the rigid body.
| float Component::RigidBody::GetRollingFriction | ( | ) | const |
Get the rolling friction coefficient of the rigid body.
| float Component::RigidBody::GetSpinningFriction | ( | ) | const |
Get the spinning friction coefficient of the rigid body.
| bool Component::RigidBody::IsGhost | ( | ) | const |
Return a value indicating whether the rigid body is a ghost object, meaning that it disregards all collisions and only act as a collider for trigger purposes. Similar to a kinematic rigid body, movement is determined from the owning entity.
| bool Component::RigidBody::IsKinematic | ( | ) | const |
Return a value indicating whether the rigid body is kinematic or dynamic. In the former case the transform is determined by that of its entity. In the latter case, Bullet calculates it.
|
overridevirtual |
Save or load component values to/from JSON.
| node | The JSON node to save to or load from. |
| load | Whether to load (otherwise saves). |
Implements Component::SuperComponent.
|
friend |
|
friend |
|
friend |