|
VisuTwin Canvas
C++ 3D Engine — Metal Backend
|
#include <framework/components/rigidbody/rigidBodyComponent.h>
Public Member Functions | |
| CollisionComponent * | collision () const |
| void | initializeComponentData () override |
| RigidBodyComponent (IComponentSystem *system, Entity *entity) | |
| void | setType (const RigidBodyType type) |
| void | setType (const std::string &type) |
| RigidBodyType | type () const |
| ~RigidBodyComponent () override | |
| Public Member Functions inherited from visutwin::canvas::Component | |
| virtual void | cloneFrom (const Component *source) |
| Component (IComponentSystem *system, Entity *entity) | |
| virtual bool | enabled () const |
| Entity * | entity () const |
| virtual void | onDisable () |
| virtual void | onEnable () |
| virtual void | onPostStateChange () |
| virtual void | setEnabled (bool value) |
| IComponentSystem * | system () const |
| virtual | ~Component ()=default |
| Public Member Functions inherited from visutwin::canvas::EventHandler | |
| template<typename... Args> | |
| EventHandler * | fire (const std::string &name, Args &&... args) |
| bool | hasEvent (const std::string &name) const |
| void | initEventHandler () |
| template<typename Callback> requires (!std::is_same_v<std::decay_t<Callback>, HandleEventCallback>) | |
| EventHandler * | off (const std::string &name, Callback &&callback, void *scope=nullptr) |
| EventHandler * | off (const std::string &name="", const HandleEventCallback &callback=HandleEventCallback(), void *scope=nullptr) |
| EventHandler * | offByHandle (EventHandle *handle) |
| template<typename Callback> requires (!std::is_same_v<std::decay_t<Callback>, HandleEventCallback>) | |
| EventHandle * | on (const std::string &name, Callback &&callback, void *scope=nullptr) |
| EventHandle * | on (const std::string &name, HandleEventCallback callback, void *scope=nullptr) |
| template<typename Callback> requires (!std::is_same_v<std::decay_t<Callback>, HandleEventCallback>) | |
| EventHandle * | once (const std::string &name, Callback &&callback, void *scope=nullptr) |
| EventHandle * | once (const std::string &name, HandleEventCallback callback, void *scope=nullptr) |
| virtual | ~EventHandler ()=default |
Static Public Member Functions | |
| static const std::vector< RigidBodyComponent * > & | instances () |
Additional Inherited Members | |
| Protected Member Functions inherited from visutwin::canvas::Component | |
| virtual void | onSetEnabled (bool oldValue, bool newValue) |
| Protected Member Functions inherited from visutwin::canvas::EventHandler | |
| EventHandle * | addCallback (const std::string &name, HandleEventCallback callback, void *scope=nullptr, bool once=false) |
| Protected Attributes inherited from visutwin::canvas::Component | |
| bool | _enabled = true |
| Entity * | _entity |
Definition at line 22 of file rigidBodyComponent.h.
| visutwin::canvas::RigidBodyComponent::RigidBodyComponent | ( | IComponentSystem * | system, |
| Entity * | entity ) |
Definition at line 10 of file rigidBodyComponent.cpp.
References visutwin::canvas::Component::Component(), visutwin::canvas::Component::entity(), and visutwin::canvas::Component::system().
|
override |
Definition at line 16 of file rigidBodyComponent.cpp.
| CollisionComponent * visutwin::canvas::RigidBodyComponent::collision | ( | ) | const |
Definition at line 32 of file rigidBodyComponent.cpp.
References visutwin::canvas::Component::entity(), and visutwin::canvas::Entity::findComponent().
|
inlineoverridevirtual |
Implements visutwin::canvas::Component.
Definition at line 28 of file rigidBodyComponent.h.
|
inlinestatic |
Definition at line 30 of file rigidBodyComponent.h.
Referenced by visutwin::canvas::RigidBodyComponentSystem::raycastAll().
|
inline |
Definition at line 33 of file rigidBodyComponent.h.
References type().
| void visutwin::canvas::RigidBodyComponent::setType | ( | const std::string & | type | ) |
Definition at line 21 of file rigidBodyComponent.cpp.
References visutwin::canvas::Dynamic, visutwin::canvas::Kinematic, visutwin::canvas::Static, and type().
|
inline |
Definition at line 32 of file rigidBodyComponent.h.