Radium Engine  1.5.0
Ra::Engine::Scene::ItemEntry Struct Reference

#include <Engine/Scene/ItemEntry.hpp>

+ Collaboration diagram for Ra::Engine::Scene::ItemEntry:

Public Member Functions

 ItemEntry ()=default
 Create an invalid entry.
 
 ItemEntry (Entity *ent, Component *comp=nullptr, Ra::Core::Utils::Index ro=Ra::Core::Utils::Index::Invalid())
 
bool operator== (const ItemEntry &rhs) const
 Compare two items.
 
bool isValid () const
 Returns true if the item represents any valid object.
 
bool isSelectable () const
 Returns true if the item can be selected.
 
bool isEntityNode () const
 Returns true if the item represents an entity.
 
bool isComponentNode () const
 Returns true if the item represents a component.
 
bool isRoNode () const
 Returns true if the item represents a render object.
 
void checkConsistency () const
 Debug checks.
 

Public Attributes

Entitym_entity { nullptr }
 The entity represented by the item, or owning the object represented.
 
Componentm_component { nullptr }
 
Ra::Core::Utils::Index m_roIndex {}
 RO index of the represented object.
 

Detailed Description

This represent a handle for an entity, component or render object. There are 4 possible states for this object :

  • All members are invalid -> No object.
  • Entity pointer valid, all others invalid -> Entity
  • Entity and component pointers valid, RO index invalid -> Component
  • Entity, component and RO index valid : -> RO

Definition at line 25 of file ItemEntry.hpp.

Constructor & Destructor Documentation

◆ ItemEntry()

Ra::Engine::Scene::ItemEntry::ItemEntry ( Entity ent,
Component comp = nullptr,
Ra::Core::Utils::Index  ro = Ra::Core::Utils::Index::Invalid() 
)
inlineexplicit

Create an entry. ItemEntry(entity) creates an entity entry. ItemEntry(entity, component) creates a component entry ItemEntry(entity, component, RO) creates a render object entity.

Definition at line 33 of file ItemEntry.hpp.

Member Data Documentation

◆ m_component

Component* Ra::Engine::Scene::ItemEntry::m_component { nullptr }

Component represented by the item or owning the represented RO. If null, the item represents an entity.

Definition at line 64 of file ItemEntry.hpp.


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