Elevate Engine 1
Loading...
Searching...
No Matches
EECategory Class Reference

#include <EEObject.h>

Public Member Functions

 EECategory ()
 
 EECategory (const std::string &path)
 
 EECategory (const EECategory &other)
 
const std::string & GetName () const
 
const std::string & GetPath () const
 
size_t GetDepth ()
 
bool operator< (const EECategory &other) const
 
bool operator== (const EECategory &other) const
 
glm::vec4 GetCategoryColor ()
 
std::string GetNameAtDepth (size_t index) const
 

Detailed Description

Definition at line 7 of file EEObject.h.

Constructor & Destructor Documentation

◆ EECategory() [1/3]

EECategory::EECategory ( )
inline

Definition at line 10 of file EEObject.h.

10: EECategory("") { }

◆ EECategory() [2/3]

EECategory::EECategory ( const std::string &  path)
inline

Definition at line 11 of file EEObject.h.

11 :
12 m_path(path), m_name(GenerateName()), m_depth(GenerateDepth()) { }

◆ EECategory() [3/3]

EECategory::EECategory ( const EECategory other)
inline

Definition at line 13 of file EEObject.h.

14 : m_depth(other.m_depth), m_name(other.m_name), m_path(other.m_path) { }

Member Function Documentation

◆ GetCategoryColor()

glm::vec4 EECategory::GetCategoryColor ( )
inline

Definition at line 41 of file EEObject.h.

41 {
42 if (m_path == "Physics") return glm::vec4(0.3f, 0.6f, 0.3f, 1.0f); // Dark Vibrant Green
43 if (m_path == "Rendering") return glm::vec4(0.7f, 0.4f, 0.2f, 1.0f); // Dark Vibrant Orange
44 if (m_path == "Audio") return glm::vec4(0.3f, 0.5f, 0.8f, 1.0f); // Dark Vibrant Blue
45 if (m_path == "Script") return glm::vec4(0.6f, 0.3f, 0.7f, 1.0f); // Dark Vibrant Purple
46 if (m_path == "Transform") return glm::vec4(0.9f, 0.9f, 0.3f, 1.0f); // Bright Yellow
47 return glm::vec4(0.2f, 0.3f, 0.4f, 1.0f); // Dark Blue-Grey for Default
48 }

◆ GetDepth()

size_t EECategory::GetDepth ( )
inline

Definition at line 26 of file EEObject.h.

27 {
28 return m_depth;
29 }

◆ GetName()

const std::string & EECategory::GetName ( ) const
inline

Definition at line 16 of file EEObject.h.

17 {
18 return m_name;
19 }

◆ GetNameAtDepth()

std::string EECategory::GetNameAtDepth ( size_t  index) const
inline

Definition at line 50 of file EEObject.h.

51 {
52 size_t start = 0;
53 size_t end = m_path.find('/');
54
55 for (size_t i = 0; i < index; i++)
56 {
57 if (end == std::string::npos)
58 {
59 return "";
60 }
61 start = end + 1;
62 end = m_path.find('/', start);
63 }
64
65 if (end == std::string::npos)
66 {
67 return m_path.substr(start);
68 }
69 else
70 {
71 return m_path.substr(start, end - start);
72 }
73 }

◆ GetPath()

const std::string & EECategory::GetPath ( ) const
inline

Definition at line 21 of file EEObject.h.

22 {
23 return m_path;
24 }

◆ operator<()

bool EECategory::operator< ( const EECategory other) const
inline

Definition at line 31 of file EEObject.h.

32 {
33 return m_path < other.m_path;
34 }

◆ operator==()

bool EECategory::operator== ( const EECategory other) const
inline

Definition at line 36 of file EEObject.h.

37 {
38 return m_path == other.m_path;
39 }

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