Overload  1.1
Game engine with editor
Public Member Functions | List of all members
OvPhysics::Entities::PhysicalSphere Class Reference

#include <PhysicalSphere.h>

Inheritance diagram for OvPhysics::Entities::PhysicalSphere:
OvPhysics::Entities::PhysicalObject

Public Member Functions

 PhysicalSphere (float p_radius=1.f)
 
 PhysicalSphere (OvMaths::FTransform &p_transform, float p_radius=1.f)
 
void SetRadius (float p_radius)
 
float GetRadius () const
 
- Public Member Functions inherited from OvPhysics::Entities::PhysicalObject
 PhysicalObject ()
 
 PhysicalObject (OvMaths::FTransform &p_transform)
 
 ~PhysicalObject ()
 
void AddForce (const OvMaths::FVector3 &p_force)
 
void AddImpulse (const OvMaths::FVector3 &p_impulse)
 
void ClearForces ()
 
void AddFlag (btCollisionObject::CollisionFlags p_flag)
 
void RemoveFlag (btCollisionObject::CollisionFlags p_flag)
 
float GetMass () const
 
const ECollisionDetectionModeGetCollisionDetectionMode () const
 
float GetBounciness () const
 
float GetFriction () const
 
OvMaths::FVector3 GetLinearVelocity () const
 
OvMaths::FVector3 GetAngularVelocity () const
 
OvMaths::FVector3 GetLinearFactor () const
 
OvMaths::FVector3 GetAngularFactor () const
 
bool IsTrigger () const
 
bool IsKinematic () const
 
EActivationState GetActivationState () const
 
OvMaths::FTransformGetTransform ()
 
void SetMass (float p_mass)
 
void SetCollisionDetectionMode (ECollisionDetectionMode p_mode)
 
void SetBounciness (float p_bounciness)
 
void SetFriction (float p_friction)
 
void SetLinearVelocity (const OvMaths::FVector3 &p_linearVelocity)
 
void SetAngularVelocity (const OvMaths::FVector3 &p_angularVelocity)
 
void SetLinearFactor (const OvMaths::FVector3 &p_linearFactor)
 
void SetAngularFactor (const OvMaths::FVector3 &p_angularFactor)
 
void SetTrigger (bool p_trigger)
 
void SetKinematic (bool p_kinematic)
 
void SetActivationState (EActivationState p_activationState)
 
void SetEnabled (bool p_enabled)
 
bool IsEnabled () const
 
template<typename T >
GetUserData () const
 
template<typename T >
void SetUserData (T p_data)
 

Additional Inherited Members

- Public Types inherited from OvPhysics::Entities::PhysicalObject
enum  ECollisionDetectionMode { ECollisionDetectionMode::DISCRETE, ECollisionDetectionMode::CONTINUOUS }
 
enum  EActivationState {
  EActivationState::ACTIVE = 1, EActivationState::SLEEPING = 2, EActivationState::LOOKING_FOR_SLEEP = 3, EActivationState::ALWAYS_ACTIVE = 4,
  EActivationState::ALWAYS_SLEEPING = 5
}
 
- Public Attributes inherited from OvPhysics::Entities::PhysicalObject
OvTools::Eventing::Event< PhysicalObject & > CollisionStartEvent
 
OvTools::Eventing::Event< PhysicalObject & > CollisionStayEvent
 
OvTools::Eventing::Event< PhysicalObject & > CollisionStopEvent
 
OvTools::Eventing::Event< PhysicalObject & > TriggerStartEvent
 
OvTools::Eventing::Event< PhysicalObject & > TriggerStayEvent
 
OvTools::Eventing::Event< PhysicalObject & > TriggerStopEvent
 
- Protected Member Functions inherited from OvPhysics::Entities::PhysicalObject
void Init ()
 
void RecreateBody ()
 
void ApplyInertia ()
 
void Consider ()
 
void Unconsider ()
 
- Protected Attributes inherited from OvPhysics::Entities::PhysicalObject
std::unique_ptr< btCollisionShape > m_shape
 

Detailed Description

PhysicalObject with a sphere shape

Constructor & Destructor Documentation

◆ PhysicalSphere() [1/2]

OvPhysics::Entities::PhysicalSphere::PhysicalSphere ( float  p_radius = 1.f)

PhysicalSphere constructor (Internal transform management)

Parameters
p_radius
p_height@project: Overload
Author
: Overload Tech. @restrictions: This software may not be resold, redistributed or otherwise conveyed to a third party.

◆ PhysicalSphere() [2/2]

OvPhysics::Entities::PhysicalSphere::PhysicalSphere ( OvMaths::FTransform p_transform,
float  p_radius = 1.f 
)

PhysicalSphere constructor (External transform management)

Parameters
p_transform
p_radius
p_height

Member Function Documentation

◆ GetRadius()

float OvPhysics::Entities::PhysicalSphere::GetRadius ( ) const

Returns the actual radius of the sphere

◆ SetRadius()

void OvPhysics::Entities::PhysicalSphere::SetRadius ( float  p_radius)

Defines a new radius for the sphere

Parameters
p_radius

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