|
Monad Engine da02fba2
> Undercity Codex_
|
#include <PhysicsComponent.h>
Inheritance diagram for eng::PhysicsComponent:
Collaboration diagram for eng::PhysicsComponent:Public Member Functions | |
| PhysicsComponent ()=default | |
| PhysicsComponent (const std::shared_ptr< RigidBody > &body) | |
| void | LoadProperties (const nlohmann::json &json) override |
| void | Init () override |
| void | Update (float deltaTime) override |
| void | SetRigidBody (const std::shared_ptr< RigidBody > &body) |
| const std::shared_ptr< RigidBody > & | GetRigidBody () |
| virtual size_t | GetTypeId () const =0 |
| GameObject * | GetOwner () |
Static Public Member Functions | |
| template<typename T > | |
| static size_t | StaticTypeId () |
Protected Attributes | |
| GameObject * | m_owner = nullptr |
Definition at line 7 of file PhysicsComponent.h.
|
default |
| eng::PhysicsComponent::PhysicsComponent | ( | const std::shared_ptr< RigidBody > & | body | ) |
Definition at line 7 of file PhysicsComponent.cpp.
|
inherited |
Definition at line 15 of file Component.cpp.
References eng::Component::m_owner.
Referenced by eng::MeshComponent::Update(), and eng::SpriteComponent::Update().
| const std::shared_ptr< RigidBody > & eng::PhysicsComponent::GetRigidBody | ( | ) |
Definition at line 110 of file PhysicsComponent.cpp.
|
pure virtualinherited |
|
overridevirtual |
Reimplemented from eng::Component.
Definition at line 75 of file PhysicsComponent.cpp.
References eng::PhysicsManager::AddRigidBody(), eng::Engine::GetInstance(), eng::Engine::GetPhysicsManager(), eng::GameObject::GetWorldPosition(), eng::GameObject::GetWorldRotation(), and eng::Component::m_owner.
|
overridevirtual |
Reimplemented from eng::Component.
Definition at line 12 of file PhysicsComponent.cpp.
References eng::Dynamic, eng::Kinematic, SetRigidBody(), and eng::Static.
| void eng::PhysicsComponent::SetRigidBody | ( | const std::shared_ptr< RigidBody > & | body | ) |
Definition at line 105 of file PhysicsComponent.cpp.
Referenced by LoadProperties().
|
inlinestaticinherited |
Definition at line 26 of file Component.h.
|
overridevirtual |
Implements eng::Component.
Definition at line 91 of file PhysicsComponent.cpp.
References eng::Dynamic, eng::Component::m_owner, eng::GameObject::SetWorldPosition(), and eng::GameObject::SetWorldRotation().
|
protectedinherited |
Definition at line 33 of file Component.h.
Referenced by eng::GameObject::AddComponent(), eng::Component::GetOwner(), eng::CameraComponent::GetViewMatrix(), Init(), eng::PlayerControllerComponent::Init(), eng::AudioComponent::Update(), eng::AudioListenerComponent::Update(), Update(), and eng::PlayerControllerComponent::Update().