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


Public Member Functions | |
| void | AttachShape (BoundingBox box) |
| void | AttachShape (BoundingSphere sphere) |
| void | UpdateMassAndInertia () |
| void | ApplyForce (Vector3 force) |
| void | ApplyForce (Vector3 force, Vector3 center) |
| void | ApplyTorque (Vector3 force) |
| void | ApplyAcceleration (Vector3 acc) |
| void | ApplyAngularAcceleration (Vector3 acc) |
| void | SetKinematic (bool isKinematic) |
| void | AddLinearVelocity (Vector3 v) |
| void | AddAngularVelocity (Vector3 v) |
| IDynamicCollider (IntPtr natPtr) | |
| virtual float | GetAngularDamping () const =0 |
| Gets the angular damping of the dynamic collider. | |
| virtual void | SetAngularDamping (float angularDamping)=0 |
| Sets the angular damping of the dynamic collider. | |
| virtual Math::Vector3 | GetLinearVelocity () const =0 |
| Gets the velocity of the dynamic collider. | |
| virtual void | SetLinearVelocity (const Math::Vector3 &linearVelocity)=0 |
| Sets the velocity of the dynamic collider. | |
| virtual Math::Vector3 | GetAngularVelocity () const =0 |
| Gets the angular velocity of the dynamic collider. | |
| virtual void | SetAngularVelocity (const Math::Vector3 &angularVelocity)=0 |
| Sets the angular velocity of the dynamic collider. | |
| virtual Math::Vector3 | GetMaxAngularVelocity () const =0 |
| Gets the maximum angular velocity of the dynamic collider. | |
| virtual void | SetMaxAngularVelocity (const Math::Vector3 &maxAngularVelocity)=0 |
| Sets the maximum angular velocity of the dynamic collider. | |
| virtual void | AttachShape (const Math::BoundingBox &box)=0 |
| Attaches an box shape to this dynamic collider. | |
| virtual void | AttachShape (const Math::BoundingSphere &sphere)=0 |
| Attaches an sphere shape to this dynamic collider. | |
| virtual void | UpdateMassAndInertia ()=0 |
| Updates the mass and inertia. | |
| virtual void | ApplyForce (const Math::Vector3 &force)=0 |
| Applies an linear force to this dynamic collider. | |
| virtual void | ApplyForce (const Math::Vector3 &force, const Math::Vector3 ¢er)=0 |
| Applies an force to this dynamic collider with a center that can cause angular motion. | |
| virtual void | ApplyTorque (const Math::Vector3 &force)=0 |
| Applies an torque to this dynamic collider. | |
| virtual void | ApplyAcceleration (const Math::Vector3 &acc)=0 |
| Applies acceleration to this dynamic collider. | |
| virtual void | ApplyAngularAcceleration (const Math::Vector3 &acc)=0 |
| Applies angular acceleration to this dynamic collider. | |
| virtual void | SetKinematic (bool isKinematic)=0 |
| Sets whether this dynamic collider is kinematic or not. | |
| virtual void | AddLinearVelocity (const Math::Vector3 &v)=0 |
| Adds linear velocity to this dynamic collider. | |
| virtual void | AddAngularVelocity (const Math::Vector3 &v)=0 |
| Adds angular velocity to this dynamic collider. | |
| Public Member Functions inherited from Engine3DRadSpace.Physics.IStaticCollider | |
| IStaticCollider (IntPtr natPtr) | |
| virtual float | GetLinearDamping () const =0 |
| Gets the linear damping of the static collider. | |
| virtual void | SetLinearDamping (float linearDamping)=0 |
| Sets the linear damping of the static collider. | |
| virtual float | GetStaticFriction () const =0 |
| Gets the static friction of the static collider. | |
| virtual void | SetStaticFriction (float friction)=0 |
| Sets the static friction of the static collider. | |
| virtual float | GetDynamicFriction () const =0 |
| Gets the dynamic friction of the static collider. | |
| virtual void | SetDynamicFriction (float friction)=0 |
| Sets the dynamic friction of the static collider. | |
| virtual float | GetRestitution () const =0 |
| Gets the restitution of the static collider. | |
| virtual void | SetRestitution (float restitution)=0 |
| Sets the restitution of the static collider. | |
| Public Member Functions inherited from Engine3DRadSpace.Physics.ICollider | |
| 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 | |
| IDynamicCollider (IPhysicsEngine *physics) | |
| IDynamicCollider (const IDynamicCollider &)=delete | |
| IDynamicCollider & | operator= (const IDynamicCollider &)=delete |
| IDynamicCollider (IDynamicCollider &&) noexcept=default | |
| IDynamicCollider & | operator= (IDynamicCollider &&) noexcept=default |
| Protected Member Functions inherited from Engine3DRadSpace.Physics.IStaticCollider | |
| IStaticCollider (IntPtr natPtr, bool ownsHandle) | |
| IStaticCollider (IPhysicsEngine *physics) | |
| IStaticCollider (const IStaticCollider &)=delete | |
| IStaticCollider & | operator= (const IStaticCollider &)=delete |
| IStaticCollider (IStaticCollider &&) noexcept=default | |
| IStaticCollider & | operator= (IStaticCollider &&) noexcept=default |
| Protected Member Functions inherited from Engine3DRadSpace.Physics.ICollider | |
| 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 | |
| float | _angularDamping = 0 |
| Math::Vector3 | _linearVelocity = Math::Vector3::Zero() |
| Math::Vector3 | _angularVelocity = Math::Vector3::Zero() |
| Math::Vector3 | _maxAngularVelocity = Math::Vector3(100.0f, 100.0f, 100.0f) |
| Protected Attributes inherited from Engine3DRadSpace.Physics.IStaticCollider | |
| float | _linearDamping = 0.01f |
| float | _staticFriction = 0.5f |
| float | _dynamicFriction = 0.5f |
| float | _restitution = 0.1f |
| Protected Attributes inherited from Engine3DRadSpace.Physics.ICollider | |
| IPhysicsEngine * | _physics |
| float | _mass = 1.0f |
| Math::Vector3 | _position |
| Math::Quaternion | _rotation |
| Protected Attributes inherited from Engine3DRadSpace.NatPtrWrapper | |
| IntPtr | _handle |
| bool | _disposed |
Properties | |
| float | AngularDamping [get, set] |
| Vector3 | LinearVelocity [get, set] |
| Vector3 | AngularVelocity [get, set] |
| Vector3 | MaxAngularVelocity [get, set] |
| Properties inherited from Engine3DRadSpace.Physics.IStaticCollider | |
| float | LinearDamping [get, set] |
| float | StaticFriction [get, set] |
| float | DynamicFriction [get, set] |
| float | Restitution [get, set] |
| Properties inherited from Engine3DRadSpace.Physics.ICollider | |
| 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 dynamic physics objects that can move and interact with forces in the scene.
|
inline |
|
protected |
|
protecteddelete |
|
protecteddefaultnoexcept |
|
inline |
|
pure virtual |
Adds angular velocity to this dynamic collider.
| v | angular velocity to add |
|
inline |
|
pure virtual |
Adds linear velocity to this dynamic collider.
| v | linear velocity to add |
|
inline |
|
pure virtual |
Applies acceleration to this dynamic collider.
| acc | acceleration |
|
inline |
|
pure virtual |
Applies angular acceleration to this dynamic collider.
| acc | angular acceleration |
|
inline |
|
pure virtual |
Applies an linear force to this dynamic collider.
| force | force |
|
pure virtual |
Applies an force to this dynamic collider with a center that can cause angular motion.
| force | force |
| center | center |
|
inline |
|
pure virtual |
Applies an torque to this dynamic collider.
| force | force |
|
inline |
|
inline |
|
pure virtual |
Attaches an box shape to this dynamic collider.
| box | boundingbox |
|
pure virtual |
Attaches an sphere shape to this dynamic collider.
| sphere | boundingsphere |
|
pure virtual |
Gets the angular damping of the dynamic collider.
Implemented in Engine3DRadSpace.Physics::NVPhysX::DynamicCollider.
|
pure virtual |
Gets the angular velocity of the dynamic collider.
Implemented in Engine3DRadSpace.Physics::NVPhysX::DynamicCollider.
|
pure virtual |
Gets the velocity of the dynamic collider.
Implemented in Engine3DRadSpace.Physics::NVPhysX::DynamicCollider.
|
pure virtual |
Gets the maximum angular velocity of the dynamic collider.
Implemented in Engine3DRadSpace.Physics::NVPhysX::DynamicCollider.
|
protecteddelete |
|
protecteddefaultnoexcept |
|
pure virtual |
Sets the angular damping of the dynamic collider.
| angularDamping | The angular damping value. |
Implemented in Engine3DRadSpace.Physics::NVPhysX::DynamicCollider.
|
pure virtual |
Sets the angular velocity of the dynamic collider.
| angularVelocity | The angular velocity vector. |
|
inline |
|
pure virtual |
Sets whether this dynamic collider is kinematic or not.
Kinematic colliders are not affected by forces and can be moved manually, while non-kinematic colliders are affected by physics forces and collisions.
| isKinematic | true to make the collider kinematic, false otherwise |
Implemented in Engine3DRadSpace.Physics::NVPhysX::DynamicCollider.
|
pure virtual |
Sets the velocity of the dynamic collider.
| linearVelocity | The linear velocity vector. |
|
pure virtual |
Sets the maximum angular velocity of the dynamic collider.
|
inline |
|
pure virtual |
Updates the mass and inertia.
Implemented in Engine3DRadSpace.Physics::NVPhysX::DynamicCollider.
|
protected |
|
protected |
|
protected |
|
protected |
|
getset |
|
getset |
|
getset |
|
getset |