3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
Loading...
Searching...
No Matches
Engine3DRadSpace.Physics.IStaticCollider Class Referenceabstract

Base polymorphic interface for static colliders. More...

#include <IStaticCollider.hpp>

Inheritance diagram for Engine3DRadSpace.Physics.IStaticCollider:
Collaboration diagram for Engine3DRadSpace.Physics.IStaticCollider:

Public Member Functions

 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

 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 _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 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]

Detailed Description

Base polymorphic interface for static colliders.

Constructor & Destructor Documentation

◆ IStaticCollider() [1/5]

Engine3DRadSpace.Physics.IStaticCollider.IStaticCollider ( IntPtr natPtr)
inline

◆ IStaticCollider() [2/5]

Engine3DRadSpace.Physics.IStaticCollider.IStaticCollider ( IntPtr natPtr,
bool ownsHandle )
inlineprotected

◆ IStaticCollider() [3/5]

◆ IStaticCollider() [4/5]

◆ IStaticCollider() [5/5]

Member Function Documentation

◆ GetDynamicFriction()

virtual float Engine3DRadSpace.Physics.IStaticCollider.GetDynamicFriction ( ) const
pure virtual

Gets the dynamic friction of the static collider.

Returns
The dynamic friction value.

Implemented in Engine3DRadSpace.Physics::NVPhysX::DynamicCollider, and Engine3DRadSpace.Physics::NVPhysX::StaticMeshCollider.

◆ GetLinearDamping()

virtual float Engine3DRadSpace.Physics.IStaticCollider.GetLinearDamping ( ) const
pure virtual

Gets the linear damping of the static collider.

Returns
The linear damping value.

Implemented in Engine3DRadSpace.Physics::NVPhysX::DynamicCollider, and Engine3DRadSpace.Physics::NVPhysX::StaticMeshCollider.

◆ GetRestitution()

virtual float Engine3DRadSpace.Physics.IStaticCollider.GetRestitution ( ) const
pure virtual

Gets the restitution of the static collider.

Returns
The restitution value.

Implemented in Engine3DRadSpace.Physics::NVPhysX::DynamicCollider, and Engine3DRadSpace.Physics::NVPhysX::StaticMeshCollider.

◆ GetStaticFriction()

virtual float Engine3DRadSpace.Physics.IStaticCollider.GetStaticFriction ( ) const
pure virtual

Gets the static friction of the static collider.

Returns
The static friction value.

Implemented in Engine3DRadSpace.Physics::NVPhysX::DynamicCollider, and Engine3DRadSpace.Physics::NVPhysX::StaticMeshCollider.

◆ operator=() [1/2]

IStaticCollider & Engine3DRadSpace.Physics.IStaticCollider.operator= ( const IStaticCollider & )
protecteddelete

◆ operator=() [2/2]

IStaticCollider & Engine3DRadSpace.Physics.IStaticCollider.operator= ( IStaticCollider && )
protecteddefaultnoexcept

◆ SetDynamicFriction()

virtual void Engine3DRadSpace.Physics.IStaticCollider.SetDynamicFriction ( float friction)
pure virtual

Sets the dynamic friction of the static collider.

Parameters
frictionThe dynamic friction value.

Implemented in Engine3DRadSpace.Physics::NVPhysX::DynamicCollider, and Engine3DRadSpace.Physics::NVPhysX::StaticMeshCollider.

◆ SetLinearDamping()

virtual void Engine3DRadSpace.Physics.IStaticCollider.SetLinearDamping ( float linearDamping)
pure virtual

Sets the linear damping of the static collider.

Parameters
linearDampingThe linear damping value.

Implemented in Engine3DRadSpace.Physics::NVPhysX::DynamicCollider, and Engine3DRadSpace.Physics::NVPhysX::StaticMeshCollider.

◆ SetRestitution()

virtual void Engine3DRadSpace.Physics.IStaticCollider.SetRestitution ( float restitution)
pure virtual

Sets the restitution of the static collider.

Parameters
restitutionThe restitution value.

Implemented in Engine3DRadSpace.Physics::NVPhysX::DynamicCollider, and Engine3DRadSpace.Physics::NVPhysX::StaticMeshCollider.

◆ SetStaticFriction()

virtual void Engine3DRadSpace.Physics.IStaticCollider.SetStaticFriction ( float friction)
pure virtual

Sets the static friction of the static collider.

Parameters
frictionThe static friction value.

Implemented in Engine3DRadSpace.Physics::NVPhysX::DynamicCollider, and Engine3DRadSpace.Physics::NVPhysX::StaticMeshCollider.

Member Data Documentation

◆ _dynamicFriction

float Engine3DRadSpace.Physics.IStaticCollider._dynamicFriction = 0.5f
protected

◆ _linearDamping

float Engine3DRadSpace.Physics.IStaticCollider._linearDamping = 0.01f
protected

◆ _restitution

float Engine3DRadSpace.Physics.IStaticCollider._restitution = 0.1f
protected

◆ _staticFriction

float Engine3DRadSpace.Physics.IStaticCollider._staticFriction = 0.5f
protected

Property Documentation

◆ DynamicFriction

float Engine3DRadSpace.Physics.IStaticCollider.DynamicFriction
getset

◆ LinearDamping

float Engine3DRadSpace.Physics.IStaticCollider.LinearDamping
getset

◆ Restitution

float Engine3DRadSpace.Physics.IStaticCollider.Restitution
getset

◆ StaticFriction

float Engine3DRadSpace.Physics.IStaticCollider.StaticFriction
getset

The documentation for this class was generated from the following files: