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

#include <PhysicalBox.h>

Inheritance diagram for OvPhysics::Entities::PhysicalBox:
OvPhysics::Entities::PhysicalObject

Public Member Functions

 PhysicalBox (const OvMaths::FVector3 &p_size={0.5f, 0.5f, 0.5f})
 
 PhysicalBox (OvMaths::FTransform &p_transform, const OvMaths::FVector3 &p_size={ 0.5f, 0.5f, 0.5f })
 
void SetSize (const OvMaths::FVector3 &p_size)
 
OvMaths::FVector3 GetSize () 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 box shape

Constructor & Destructor Documentation

◆ PhysicalBox() [1/2]

OvPhysics::Entities::PhysicalBox::PhysicalBox ( const OvMaths::FVector3 p_size = {0.5f, 0.5f, 0.5f})

PhysicalBox 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.

◆ PhysicalBox() [2/2]

OvPhysics::Entities::PhysicalBox::PhysicalBox ( OvMaths::FTransform p_transform,
const OvMaths::FVector3 p_size = { 0.5f, 0.5f, 0.5f } 
)

PhysicalBox constructor (External transform management)

Parameters
p_transform
p_radius
p_height

Member Function Documentation

◆ GetSize()

OvMaths::FVector3 OvPhysics::Entities::PhysicalBox::GetSize ( ) const

Returns the size of the physical box

◆ SetSize()

void OvPhysics::Entities::PhysicalBox::SetSize ( const OvMaths::FVector3 p_size)

Defines the size of the physical box

Parameters
p_size

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