|
3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
|
Represents the interface for character controllers in physics engine implementations. More...
#include <ICharacterController.hpp>


Public Member Functions | |
| void | Move (Vector3 displacement) |
| void | Jump (float height) |
| bool | IsGrounded () |
| ICharacterController (IntPtr natPtr) | |
| virtual void | Move (const Math::Vector3 &displacement)=0 |
| Move the character with the specified displacement. | |
| virtual void | Jump (float height)=0 |
| Try to jump the character with the specified height. | |
| virtual float | GetHeight () const =0 |
| Gets the height of the character controller capsule collider. | |
| virtual void | SetHeight (float height)=0 |
| Sets the height of the character controller capsule collider. | |
| virtual float | GetRadius () const =0 |
| Gets the radius of the character controller capsule collider. | |
| virtual void | SetRadius (float radius)=0 |
| Sets the radius of the character controller capsule collider. | |
| virtual void | SetMaxSlopeAngle (float angle)=0 |
| Sets the maximum slope angle the character can walk on. | |
| virtual float | GetMaxSlopeAngle () const =0 |
| Gets the maximum slope angle the character can walk on. | |
| virtual void | SetGravity (const Math::Vector3 &gravity)=0 |
| Sets the gravity affecting the character. | |
| virtual Math::Vector3 | GetGravity () const =0 |
| Gets the gravity affecting the character. | |
| virtual bool | IsGrounded ()=0 |
| Checks if the character is grounded. | |
| ~ICharacterController () override=default | |
| 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 | |
| ICharacterController (IPhysicsEngine *physics) | |
| ICharacterController (ICharacterController &&) noexcept=default | |
| ICharacterController & | operator= (ICharacterController &&) noexcept=default |
| ICharacterController (const ICharacterController &)=delete | |
| ICharacterController & | operator= (const ICharacterController &)=delete |
| 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 | _height |
| float | _radius |
| float | _maxSlopeAngle = std::numbers::pi_v<float> / 4.0f |
| Math::Vector3 | _gravity |
| 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 | Height [get, set] |
| float | Radius [get, set] |
| float | MaxSlopeAngle [get, set] |
| Vector3 | Gravity [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] |
Represents the interface for character controllers in physics engine implementations.
|
inline |
|
protected |
|
protecteddefaultnoexcept |
|
protecteddelete |
|
overridedefault |
|
pure virtual |
Gets the gravity affecting the character.
Implemented in Engine3DRadSpace.Physics::NVPhysX::CharacterController.
|
pure virtual |
Gets the height of the character controller capsule collider.
Implemented in Engine3DRadSpace.Physics::NVPhysX::CharacterController.
|
pure virtual |
Gets the maximum slope angle the character can walk on.
Implemented in Engine3DRadSpace.Physics::NVPhysX::CharacterController.
|
pure virtual |
Gets the radius of the character controller capsule collider.
Implemented in Engine3DRadSpace.Physics::NVPhysX::CharacterController.
|
inline |
|
pure virtual |
Checks if the character is grounded.
Implemented in Engine3DRadSpace.Physics::NVPhysX::CharacterController.
|
inline |
|
pure virtual |
Try to jump the character with the specified height.
| height | The height to jump. |
Implemented in Engine3DRadSpace.Physics::NVPhysX::CharacterController.
|
inline |
|
pure virtual |
Move the character with the specified displacement.
| displacement | The displacement vector to move the character by. |
|
protecteddelete |
|
protecteddefaultnoexcept |
|
pure virtual |
Sets the gravity affecting the character.
| gravity | The gravity vector. |
|
pure virtual |
Sets the height of the character controller capsule collider.
| height |
Implemented in Engine3DRadSpace.Physics::NVPhysX::CharacterController.
|
pure virtual |
Sets the maximum slope angle the character can walk on.
| angle | The maximum slope angle in radians. |
Implemented in Engine3DRadSpace.Physics::NVPhysX::CharacterController.
|
pure virtual |
Sets the radius of the character controller capsule collider.
| radius | The radius of the character controller capsule collider. |
Implemented in Engine3DRadSpace.Physics::NVPhysX::CharacterController.
|
protected |
|
protected |
|
protected |
|
protected |
|
getset |
|
getset |
|
getset |
|
getset |