Overload  1.1
Game engine with editor
Public Member Functions | List of all members
OvCore::ECS::Components::CPhysicalSphere Class Reference

#include <CPhysicalSphere.h>

Inheritance diagram for OvCore::ECS::Components::CPhysicalSphere:
OvCore::ECS::Components::CPhysicalObject OvCore::ECS::Components::AComponent OvCore::API::IInspectorItem OvCore::API::ISerializable

Public Member Functions

 CPhysicalSphere (ECS::Actor &p_owner)
 
std::string GetName () override
 
void SetRadius (float p_radius)
 
float GetRadius () const
 
virtual void OnSerialize (tinyxml2::XMLDocument &p_doc, tinyxml2::XMLNode *p_node) override
 
virtual void OnDeserialize (tinyxml2::XMLDocument &p_doc, tinyxml2::XMLNode *p_node) override
 
virtual void OnInspector (OvUI::Internal::WidgetContainer &p_root) override
 
- Public Member Functions inherited from OvCore::ECS::Components::CPhysicalObject
 CPhysicalObject (ECS::Actor &p_owner)
 
void AddForce (const OvMaths::FVector3 &p_force)
 
void AddImpulse (const OvMaths::FVector3 &p_impulse)
 
void ClearForces ()
 
float GetMass () const
 
OvPhysics::Entities::PhysicalObject::ECollisionDetectionMode GetCollisionDetectionMode () 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
 
OvPhysics::Entities::PhysicalObject::EActivationState GetActivationState () const
 
void SetMass (float p_mass)
 
void SetCollisionDetectionMode (OvPhysics::Entities::PhysicalObject::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 (OvPhysics::Entities::PhysicalObject::EActivationState p_activationState)
 
- Public Member Functions inherited from OvCore::ECS::Components::AComponent
 AComponent (ECS::Actor &p_owner)
 
virtual ~AComponent ()
 
virtual void OnAwake ()
 
virtual void OnStart ()
 
virtual void OnDestroy ()
 
virtual void OnUpdate (float p_deltaTime)
 
virtual void OnFixedUpdate (float p_deltaTime)
 
virtual void OnLateUpdate (float p_deltaTime)
 
virtual void OnCollisionEnter (Components::CPhysicalObject &p_otherObject)
 
virtual void OnCollisionStay (Components::CPhysicalObject &p_otherObject)
 
virtual void OnCollisionExit (Components::CPhysicalObject &p_otherObject)
 
virtual void OnTriggerEnter (Components::CPhysicalObject &p_otherObject)
 
virtual void OnTriggerStay (Components::CPhysicalObject &p_otherObject)
 
virtual void OnTriggerExit (Components::CPhysicalObject &p_otherObject)
 

Additional Inherited Members

- Public Attributes inherited from OvCore::ECS::Components::CPhysicalObject
OvTools::Eventing::Event< CPhysicalObject & > CollisionEnterEvent
 
OvTools::Eventing::Event< CPhysicalObject & > CollisionStayEvent
 
OvTools::Eventing::Event< CPhysicalObject & > CollisionExitEvent
 
OvTools::Eventing::Event< CPhysicalObject & > TriggerEnterEvent
 
OvTools::Eventing::Event< CPhysicalObject & > TriggerStayEvent
 
OvTools::Eventing::Event< CPhysicalObject & > TriggerExitEvent
 
- Public Attributes inherited from OvCore::ECS::Components::AComponent
ECS::Actorowner
 
- Protected Member Functions inherited from OvCore::ECS::Components::CPhysicalObject
template<typename T >
T & GetPhysicalObjectAs () const
 
void Init ()
 
void BindListener ()
 
- Protected Attributes inherited from OvCore::ECS::Components::CPhysicalObject
std::unique_ptr< OvPhysics::Entities::PhysicalObjectm_physicalObject
 

Detailed Description

Represent a physical object with a sphere shape

Constructor & Destructor Documentation

◆ CPhysicalSphere()

OvCore::ECS::Components::CPhysicalSphere::CPhysicalSphere ( ECS::Actor p_owner)

Constructor

Parameters
p_owner

Member Function Documentation

◆ GetName()

std::string OvCore::ECS::Components::CPhysicalSphere::GetName ( )
overridevirtual

Returns the name of the component

Implements OvCore::ECS::Components::AComponent.

◆ GetRadius()

float OvCore::ECS::Components::CPhysicalSphere::GetRadius ( ) const

Returns the radius of the sphere shape

◆ OnDeserialize()

void OvCore::ECS::Components::CPhysicalSphere::OnDeserialize ( tinyxml2::XMLDocument &  p_doc,
tinyxml2::XMLNode *  p_node 
)
overridevirtual

Deserialize the component

Parameters
p_doc
p_node

Reimplemented from OvCore::ECS::Components::CPhysicalObject.

◆ OnInspector()

void OvCore::ECS::Components::CPhysicalSphere::OnInspector ( OvUI::Internal::WidgetContainer p_root)
overridevirtual

Defines how the component should be drawn in the inspector

Parameters
p_root

Reimplemented from OvCore::ECS::Components::CPhysicalObject.

◆ OnSerialize()

void OvCore::ECS::Components::CPhysicalSphere::OnSerialize ( tinyxml2::XMLDocument &  p_doc,
tinyxml2::XMLNode *  p_node 
)
overridevirtual

Serialize the component

Parameters
p_doc
p_node

Reimplemented from OvCore::ECS::Components::CPhysicalObject.

◆ SetRadius()

void OvCore::ECS::Components::CPhysicalSphere::SetRadius ( float  p_radius)

Defines the radius of the sphere shape

Parameters
p_radius

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