|
3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
|
Base polymorphic type for physics objects that interact with the scene. More...
#include <ICollider.hpp>


Public Member Functions | |
| IPhysicsEngine | GetPhysics () |
| bool | ApplyForce (Vector3 force) |
| bool | ApplyForce (Vector3 force, Vector3 center) |
| bool | ApplyTorque (Vector3 force) |
| bool | ApplyAcceleration (Vector3 acc) |
| bool | ApplyAngularAcceleration (Vector3 acc) |
| float? | Intersects (Ray r) |
| void | UpdateTransform () |
| void | UpdateTransform (Vector3 position, Quaternion rotation) |
| ICollider (IntPtr natPtr) | |
| virtual float | GetMass () const =0 |
| Gets the mass of this collider. | |
| virtual void | SetMass (float mass)=0 |
| Sets the mass of this collider. | |
| virtual Math::Vector3 | GetPosition () const =0 |
| Gets the position of this collider. | |
| virtual void | SetPosition (const Math::Vector3 &position)=0 |
| Sets the position of this collider. | |
| virtual Math::Quaternion | GetRotation () const =0 |
| Gets the rotation of this collider. | |
| virtual void | SetRotation (const Math::Quaternion &rotation)=0 |
| Sets the rotation of this collider. | |
| IPhysicsEngine * | GetPhysics () const noexcept |
| Gets the physics engine that this collider is associated with. | |
| virtual std::optional< float > | Intersects (const Math::Ray &r)=0 |
| Returns the distance from the ray origin to the intersection point if the ray intersects with this collider, or std::nullopt if there is no intersection. | |
| virtual void | UpdateTransform ()=0 |
| Update the transform of this collider in the physics engine. This method should be called after changing the position or rotation of the collider to ensure that the physics engine is aware of the changes. | |
| virtual void | UpdateTransform (const Math::Vector3 &position, const Math::Quaternion &rotation)=0 |
| Update the transform of this collider in the physics engine with the specified position and rotation. This method should be called after changing the position or rotation of the collider to ensure that the physics engine is aware of the changes. | |
| virtual | ~ICollider ()=default |
| Public Member Functions inherited from Engine3DRadSpace.NatPtrWrapper | |
| virtual void | Dispose () |
Protected Member Functions | |
| ICollider (IntPtr natPtr, bool ownsHandle) | |
| ICollider (IPhysicsEngine *physics) | |
| ICollider (const ICollider &)=delete | |
| ICollider & | operator= (const ICollider &)=delete |
| ICollider (ICollider &&) noexcept=default | |
| ICollider & | operator= (ICollider &&) noexcept=default |
| Protected Member Functions inherited from Engine3DRadSpace.NatPtrWrapper | |
| NatPtrWrapper (IntPtr handle, Action< IntPtr > fnDestroy) | |
| NatPtrWrapper (Action< IntPtr > fnDestroy) | |
| void | Reset (IntPtr newObj) |
| void | Dispose (bool disposing) |
Protected Attributes | |
| IPhysicsEngine * | _physics |
| float | _mass = 1.0f |
| Math::Vector3 | _position |
| Math::Quaternion | _rotation |
| Protected Attributes inherited from Engine3DRadSpace.NatPtrWrapper | |
| IntPtr | _handle |
| bool | _disposed |
Properties | |
| float | Mass [get, set] |
| Vector3 | Position [get, set] |
| Quaternion | Rotation [get, set] |
| float | LinearDamping [get, set] |
| float | AngularDamping [get, set] |
| float | StaticFriction [get, set] |
| float | DynamicFriction [get, set] |
| float | Restitution [get, set] |
| Vector3 | LinearVelocity [get, set] |
| Vector3 | AngularVelocity [get, set] |
| Vector3 | MaxAngularVelocity [get, set] |
| Properties inherited from Engine3DRadSpace.NatPtrWrapper | |
| IntPtr | Handle [get] |
Base polymorphic type for physics objects that interact with the scene.
|
inline |
|
inlineprotected |
|
protected |
|
protecteddelete |
|
protecteddefaultnoexcept |
|
virtualdefault |
|
pure virtual |
Gets the mass of this collider.
Implemented in Engine3DRadSpace.Physics::NVPhysX::CharacterController, Engine3DRadSpace.Physics::NVPhysX::DynamicCollider, and Engine3DRadSpace.Physics::NVPhysX::StaticMeshCollider.
|
inline |
|
noexcept |
Gets the physics engine that this collider is associated with.
|
pure virtual |
Gets the position of this collider.
Implemented in Engine3DRadSpace.Physics::NVPhysX::CharacterController, Engine3DRadSpace.Physics::NVPhysX::DynamicCollider, and Engine3DRadSpace.Physics::NVPhysX::StaticMeshCollider.
|
pure virtual |
Gets the rotation of this collider.
Implemented in Engine3DRadSpace.Physics::NVPhysX::CharacterController, Engine3DRadSpace.Physics::NVPhysX::DynamicCollider, and Engine3DRadSpace.Physics::NVPhysX::StaticMeshCollider.
|
pure virtual |
Returns the distance from the ray origin to the intersection point if the ray intersects with this collider, or std::nullopt if there is no intersection.
| r | The ray to test for intersection. |
|
pure virtual |
Sets the mass of this collider.
| mass | Mass in kilograms |
Implemented in Engine3DRadSpace.Physics::NVPhysX::CharacterController, Engine3DRadSpace.Physics::NVPhysX::DynamicCollider, and Engine3DRadSpace.Physics::NVPhysX::StaticMeshCollider.
|
pure virtual |
Sets the position of this collider.
| position | The position vector. |
|
pure virtual |
Sets the rotation of this collider.
| rotation | The rotation quaternion. |
|
inline |
|
inline |
|
pure virtual |
Update the transform of this collider in the physics engine. This method should be called after changing the position or rotation of the collider to ensure that the physics engine is aware of the changes.
Implemented in Engine3DRadSpace.Physics::NVPhysX::CharacterController, Engine3DRadSpace.Physics::NVPhysX::DynamicCollider, and Engine3DRadSpace.Physics::NVPhysX::StaticMeshCollider.
|
pure virtual |
Update the transform of this collider in the physics engine with the specified position and rotation. This method should be called after changing the position or rotation of the collider to ensure that the physics engine is aware of the changes.
| position | The position vector. |
| rotation | The rotation quaternion. |
|
protected |
|
protected |
|
protected |
|
protected |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |