luna engine
software engine
Loading...
Searching...
No Matches
luna::Node Class Reference

#include <scene.h>

Inheritance diagram for luna::Node:
Collaboration diagram for luna::Node:

Public Member Functions

 Node ()=default
 
 Node (entt::entity handle, luna::scene *scene)
 
 Node (uint64_t id, luna::scene *scene)
 
 Node (scene *scene)
 
virtual ~Node ()=default
 
void setName (std::string name)
 
void addChild (Node node)
 
virtual void init (scene *scene) override
 
template<typename T , typename... Args>
T & addComponent (Args &&... args)
 
template<typename T , typename... Args>
T & addOrReplaceComponent (Args &&... args)
 
template<typename T >
T & getComponent ()
 
template<typename T >
bool hasComponent ()
 
template<typename T >
void removeComponent ()
 
 operator bool () const
 
 operator entt::entity () const
 
 operator uint32_t () const
 
 operator scene * () const
 
uuid getUUID ()
 
const std::string & getName ()
 
bool operator== (const Node &other) const
 
bool operator!= (const Node &other) const
 
- Public Member Functions inherited from luna::object
virtual void init (scene *scene)=0
 
virtual void bindMethods ()
 

Protected Attributes

entt::entity entityHandle { entt::null }
 
scenescene = nullptr
 

Friends

class scene
 
class sceneHierarchyPanel
 

Constructor & Destructor Documentation

◆ Node() [1/4]

luna::Node::Node ( )
default

◆ Node() [2/4]

luna::Node::Node ( entt::entity  handle,
luna::scene scene 
)

◆ Node() [3/4]

luna::Node::Node ( uint64_t  id,
luna::scene scene 
)

◆ Node() [4/4]

luna::Node::Node ( luna::scene scene)

◆ ~Node()

virtual luna::Node::~Node ( )
virtualdefault

Member Function Documentation

◆ addChild()

void luna::Node::addChild ( Node  node)

◆ addComponent()

template<typename T , typename... Args>
T & luna::Node::addComponent ( Args &&...  args)
inline

◆ addOrReplaceComponent()

template<typename T , typename... Args>
T & luna::Node::addOrReplaceComponent ( Args &&...  args)
inline

◆ getComponent()

template<typename T >
T & luna::Node::getComponent ( )
inline

◆ getName()

const std::string & luna::Node::getName ( )
inline

◆ getUUID()

uuid luna::Node::getUUID ( )
inline

◆ hasComponent()

template<typename T >
bool luna::Node::hasComponent ( )
inline

◆ init()

◆ operator bool()

luna::Node::operator bool ( ) const
inline

◆ operator entt::entity()

luna::Node::operator entt::entity ( ) const
inline

◆ operator scene *()

luna::Node::operator scene * ( ) const
inline

◆ operator uint32_t()

luna::Node::operator uint32_t ( ) const
inline

◆ operator!=()

bool luna::Node::operator!= ( const Node other) const
inline

◆ operator==()

bool luna::Node::operator== ( const Node other) const
inline

◆ removeComponent()

template<typename T >
void luna::Node::removeComponent ( )
inline

◆ setName()

void luna::Node::setName ( std::string  name)

Friends And Related Function Documentation

◆ scene

friend class scene
friend

◆ sceneHierarchyPanel

friend class sceneHierarchyPanel
friend

Member Data Documentation

◆ entityHandle

entt::entity luna::Node::entityHandle { entt::null }
protected

◆ scene

scene* luna::Node::scene = nullptr
protected

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