Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
|
A scene node. Extends the registry with hierarchical information. More...
#include <foray_node.hpp>
Public Member Functions | |
Node (Scene *scene, Node *parent=nullptr) | |
FORAY_PROPERTY_V (Parent) | |
FORAY_PROPERTY_R (Children) | |
FORAY_PROPERTY_R (Name) | |
ncomp::Transform * | GetTransform () |
template<typename TComponent > | |
int32_t | FindChildrenWithComponent (std::vector< Node * > &outnodes) |
template<typename TComponent > | |
int32_t | FindComponentsRecursive (std::vector< TComponent * > &outnodes) |
virtual | ~Node () |
![]() | |
Registry () | |
Registry (CallbackDispatcher *root) | |
template<typename TComponent , typename... Args> | |
TComponent * | MakeComponent (Args &&... args) |
Instantiates a new componente. | |
template<typename TComponent > | |
void | AddComponent (TComponent *component) |
Adds a manually instantiated component instance (initiate with new, Registry manages finalization) | |
template<typename TComponent > | |
void | MoveComponent (TComponent *component) |
Moves a component registered to a different Registry to this. | |
template<typename TComponent > | |
bool | HasComponent () const |
Test wether a component matching type TComponent is registered. | |
template<typename TComponent > | |
TComponent * | GetComponent () |
Gets first component that can be cast to TComponent type. | |
template<typename TComponent > | |
const TComponent * | GetComponent () const |
Gets first component that can be cast to TComponent type. | |
template<typename TComponent > | |
int32_t | GetComponents (std::vector< TComponent * > &out) |
Appends all components which can be cast to TComponent type to the out vector. | |
template<typename TComponent > | |
int32_t | GetComponents (std::vector< const TComponent * > &out) const |
Appends all components which can be cast to TComponent type to the out vector. | |
bool | RemoveDeleteComponent (Component *component) |
Removes and finalizes a component. | |
virtual void | Destroy () |
Finalizes all attached components. | |
virtual | ~Registry () |
Registry & | SetCallbackDispatcher (CallbackDispatcher *rootRegistry) |
The root registry manages global callbacks invokable on the components. | |
![]() | |
NoMoveDefaults ()=default | |
NoMoveDefaults (const NoMoveDefaults &other)=delete | |
NoMoveDefaults (NoMoveDefaults &&other)=default | |
NoMoveDefaults & | operator= (const NoMoveDefaults &other)=delete |
Protected Attributes | |
Node * | mParent = nullptr |
std::vector< Node * > | mChildren = {} |
std::string | mName = "" |
![]() | |
CallbackDispatcher * | mCallbackDispatcher = nullptr |
All components attached to the registry. | |
std::vector< Component * > | mComponents = {} |
Additional Inherited Members | |
![]() | |
void | Register (Component *component) |
bool | Unregister (Component *component) |
void | RegisterToRoot (Component *component) |
void | UnregisterFromRoot (Component *component) |
A scene node. Extends the registry with hierarchical information.
|
inlinevirtual |
|
inline |
|
inline |
foray::scene::Node::FORAY_PROPERTY_R | ( | Children | ) |
foray::scene::Node::FORAY_PROPERTY_R | ( | Name | ) |
foray::scene::Node::FORAY_PROPERTY_V | ( | Parent | ) |
ncomp::Transform * foray::scene::Node::GetTransform | ( | ) |
|
protected |
|
protected |