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

#include <scene.h>

Collaboration diagram for luna::scene:

Public Member Functions

 scene ()=default
 
 ~scene ()
 
template<typename T >
T & addNode (std::string name=std::string())
 
template<typename T >
bool destroyNode (const T &Node)
 
template<typename T >
void onComponentAdded (Node Node, T &component)
 
template<typename... components>
auto getAllEntitiesWith ()
 
void onUpdateEditor (utils::timestep ts)
 
void onUpdate (utils::timestep ts)
 
entt::entity create ()
 
void onEvent (Event &event)
 

Private Attributes

entt::registry m_Registry
 
uint32_t m_ViewportWidth = 0
 
uint32_t m_ViewportHeight = 0
 
bool m_IsRunning = false
 
bool m_IsPaused = false
 
int m_StepFrames = 0
 
utils::objectStorage< entt::entity > enttityStorage
 

Friends

class Node
 
class sceneSerializer
 
class sceneHierarchyPanel
 

Constructor & Destructor Documentation

◆ scene()

luna::scene::scene ( )
default

◆ ~scene()

luna::scene::~scene ( )

Member Function Documentation

◆ addNode()

template<typename T >
T & luna::scene::addNode ( std::string  name = std::string())
inline

◆ create()

entt::entity luna::scene::create ( )
inline

◆ destroyNode()

template<typename T >
bool luna::scene::destroyNode ( const T &  Node)

◆ getAllEntitiesWith()

template<typename... components>
auto luna::scene::getAllEntitiesWith ( )
inline

◆ onComponentAdded()

template<typename T >
void luna::scene::onComponentAdded ( Node  Node,
T &  component 
)
inline

◆ onEvent()

void luna::scene::onEvent ( Event event)

◆ onUpdate()

void luna::scene::onUpdate ( utils::timestep  ts)

◆ onUpdateEditor()

void luna::scene::onUpdateEditor ( utils::timestep  ts)

Friends And Related Function Documentation

◆ Node

friend class Node
friend

◆ sceneHierarchyPanel

friend class sceneHierarchyPanel
friend

◆ sceneSerializer

friend class sceneSerializer
friend

Member Data Documentation

◆ enttityStorage

utils::objectStorage<entt::entity> luna::scene::enttityStorage
private

◆ m_IsPaused

bool luna::scene::m_IsPaused = false
private

◆ m_IsRunning

bool luna::scene::m_IsRunning = false
private

◆ m_Registry

entt::registry luna::scene::m_Registry
private

◆ m_StepFrames

int luna::scene::m_StepFrames = 0
private

◆ m_ViewportHeight

uint32_t luna::scene::m_ViewportHeight = 0
private

◆ m_ViewportWidth

uint32_t luna::scene::m_ViewportWidth = 0
private

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