Loading [MathJax]/extensions/TeX/AMSmath.js
Radium Engine  1.5.28
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 24 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 32 of file ItemEntry.hpp.

Member Function Documentation

◆ checkConsistency()

void Ra::Engine::Scene::ItemEntry::checkConsistency ( ) const
inline

Debug checks.

Definition at line 94 of file ItemEntry.hpp.

◆ isComponentNode()

bool Ra::Engine::Scene::ItemEntry::isComponentNode ( ) const
inline

Returns true if the item represents a component.

Definition at line 84 of file ItemEntry.hpp.

+ Here is the call graph for this function:

◆ isEntityNode()

bool Ra::Engine::Scene::ItemEntry::isEntityNode ( ) const
inline

Returns true if the item represents an entity.

Definition at line 79 of file ItemEntry.hpp.

+ Here is the call graph for this function:

◆ isRoNode()

bool Ra::Engine::Scene::ItemEntry::isRoNode ( ) const
inline

Returns true if the item represents a render object.

Definition at line 89 of file ItemEntry.hpp.

+ Here is the call graph for this function:

◆ isSelectable()

bool Ra::Engine::Scene::ItemEntry::isSelectable ( ) const

Returns true if the item can be selected.

Definition at line 53 of file ItemEntry.cpp.

+ Here is the call graph for this function:

◆ isValid()

bool Ra::Engine::Scene::ItemEntry::isValid ( ) const

Returns true if the item represents any valid object.

Definition at line 43 of file ItemEntry.cpp.

+ Here is the call graph for this function:

◆ operator==()

bool Ra::Engine::Scene::ItemEntry::operator== ( const ItemEntry & rhs) const
inline

Compare two items.

Definition at line 100 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 63 of file ItemEntry.hpp.

◆ m_entity

Entity* Ra::Engine::Scene::ItemEntry::m_entity { nullptr }

The entity represented by the item, or owning the object represented.

Definition at line 59 of file ItemEntry.hpp.

◆ m_roIndex

Ra::Core::Utils::Index Ra::Engine::Scene::ItemEntry::m_roIndex {}

RO index of the represented object.

Definition at line 66 of file ItemEntry.hpp.


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