Nazara Engine
0.4
A fast, complete, cross-platform API designed for game development
|
NDK class that represents the component for physics (meant for dynamic objects) More...
Inherits Ndk::Component< ComponentType >.
Public Member Functions | |
PhysicsComponent3D (const PhysicsComponent3D &physics) | |
Constructs a PhysicsComponent3D object by copy semantic. More... | |
void | AddForce (const Nz::Vector3f &force, Nz::CoordSys coordSys=Nz::CoordSys_Global) |
Applies a force to the entity. More... | |
void | AddForce (const Nz::Vector3f &force, const Nz::Vector3f &point, Nz::CoordSys coordSys=Nz::CoordSys_Global) |
Applies a force to the entity. More... | |
void | AddTorque (const Nz::Vector3f &torque, Nz::CoordSys coordSys=Nz::CoordSys_Global) |
Applies a torque to the entity. More... | |
void | EnableAutoSleep (bool autoSleep) |
Enables auto sleep of physics object. More... | |
Nz::Boxf | GetAABB () const |
Gets the AABB of the physics object. More... | |
Nz::Vector3f | GetAngularVelocity () const |
Gets the angular velocity of the physics object. More... | |
float | GetGravityFactor () const |
Gets the gravity factor of the physics object. More... | |
float | GetMass () const |
Gets the mass of the physics object. More... | |
Nz::Vector3f | GetMassCenter (Nz::CoordSys coordSys=Nz::CoordSys_Local) const |
Gets the gravity center of the physics object. More... | |
const Nz::Matrix4f & | GetMatrix () const |
Gets the matrix of the physics object. More... | |
Nz::Vector3f | GetPosition () const |
Gets the position of the physics object. More... | |
Nz::Quaternionf | GetRotation () const |
Gets the rotation of the physics object. More... | |
Nz::Vector3f | GetVelocity () const |
Gets the velocity of the physics object. More... | |
bool | IsAutoSleepEnabled () const |
Checks whether the auto sleep is enabled. More... | |
bool | IsMoveable () const |
bool | IsSleeping () const |
Checks whether the entity is currently sleeping. More... | |
void | SetAngularVelocity (const Nz::Vector3f &angularVelocity) |
Sets the angular velocity of the physics object. More... | |
void | SetGravityFactor (float gravityFactor) |
Sets the gravity factor of the physics object. More... | |
void | SetMass (float mass) |
Sets the mass of the physics object. More... | |
void | SetMassCenter (const Nz::Vector3f ¢er) |
Sets the gravity center of the physics object. More... | |
void | SetPosition (const Nz::Vector3f &position) |
Sets the position of the physics object. More... | |
void | SetRotation (const Nz::Quaternionf &rotation) |
Sets the rotation of the physics object. More... | |
void | SetVelocity (const Nz::Vector3f &velocity) |
Sets the velocity of the physics object. More... | |
Static Public Attributes | |
static ComponentIndex | componentIndex |
Friends | |
class | CollisionComponent3D |
class | PhysicsSystem3D |
NDK class that represents the component for physics (meant for dynamic objects)
|
inline |
Constructs a PhysicsComponent3D object by copy semantic.
physics | PhysicsComponent3D to copy |
|
inline |
Applies a force to the entity.
force | Force to apply on the entity |
coordSys | System coordinates to consider |
|
inline |
Applies a force to the entity.
force | Force to apply on the entity |
point | Point where to apply the force |
coordSys | System coordinates to consider |
|
inline |
Applies a torque to the entity.
torque | Torque to apply on the entity |
coordSys | System coordinates to consider |
|
inline |
Enables auto sleep of physics object.
autoSleep | Should the physics of the object be disabled when too far from others |
|
inline |
Gets the AABB of the physics object.
|
inline |
Gets the angular velocity of the physics object.
|
inline |
Gets the gravity factor of the physics object.
|
inline |
Gets the mass of the physics object.
|
inline |
Gets the gravity center of the physics object.
coordSys | System coordinates to consider |
|
inline |
Gets the matrix of the physics object.
|
inline |
Gets the position of the physics object.
|
inline |
Gets the rotation of the physics object.
|
inline |
Gets the velocity of the physics object.
|
inline |
Checks whether the auto sleep is enabled.
|
inline |
Checks whether the entity is currently sleeping.
|
inline |
Sets the angular velocity of the physics object.
angularVelocity | Angular velocity of the object |
|
inline |
Sets the gravity factor of the physics object.
gravityFactor | Gravity factor of the object |
|
inline |
Sets the mass of the physics object.
mass | Mass of the object |
|
inline |
Sets the gravity center of the physics object.
center | Gravity center of the object |
|
inline |
Sets the position of the physics object.
position | Position of the object |
|
inline |
Sets the rotation of the physics object.
rotation | Rotation of the object |
|
inline |
Sets the velocity of the physics object.
velocity | Velocity of the object |