|
VisuTwin Canvas
C++ 3D Engine — Metal Backend
|
#include <framework/components/collision/collisionComponent.h>
Public Member Functions | |
| CollisionComponent (IComponentSystem *system, Entity *entity) | |
| const Vector3 & | halfExtents () const |
| float | height () const |
| void | initializeComponentData () override |
| float | radius () const |
| void | setHalfExtents (const Vector3 &value) |
| void | setHeight (const float value) |
| void | setRadius (const float value) |
| void | setType (const std::string &type) |
| const std::string & | type () const |
| BoundingSphere | worldBounds () const |
| ~CollisionComponent () 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< CollisionComponent * > & | 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 17 of file collisionComponent.h.
| visutwin::canvas::CollisionComponent::CollisionComponent | ( | IComponentSystem * | system, |
| Entity * | entity ) |
Definition at line 10 of file collisionComponent.cpp.
References visutwin::canvas::Component::Component(), visutwin::canvas::Component::entity(), and visutwin::canvas::Component::system().
|
override |
Definition at line 16 of file collisionComponent.cpp.
|
inline |
Definition at line 30 of file collisionComponent.h.
|
inline |
Definition at line 36 of file collisionComponent.h.
|
inlineoverridevirtual |
Implements visutwin::canvas::Component.
Definition at line 23 of file collisionComponent.h.
|
inlinestatic |
Definition at line 25 of file collisionComponent.h.
|
inline |
Definition at line 33 of file collisionComponent.h.
|
inline |
Definition at line 31 of file collisionComponent.h.
|
inline |
Definition at line 37 of file collisionComponent.h.
|
inline |
Definition at line 34 of file collisionComponent.h.
|
inline |
Definition at line 28 of file collisionComponent.h.
References type().
|
inline |
Definition at line 27 of file collisionComponent.h.
Referenced by setType().
| BoundingSphere visutwin::canvas::CollisionComponent::worldBounds | ( | ) | const |
Definition at line 21 of file collisionComponent.cpp.
References visutwin::canvas::BoundingBox::add(), visutwin::canvas::BoundingBox::center(), visutwin::canvas::Component::entity(), visutwin::canvas::BoundingBox::halfExtents(), and visutwin::canvas::Vector3::length().