Vivid
Loading...
Searching...
No Matches
Vivid::Entity Class Reference

Contains an Entity. More...

#include <Entity.h>

Public Member Functions

 Entity (int id, String name)
 
void Draw (Camera *camera)
 
void ImguiRender ()
 
void DrawGizmo (Camera *camera)
 
int GetEntityID () const
 
String GetName () const
 
void SetName (String &name)
 
void SetName (String &&name)
 
int HasComponent (ComponentType ct)
 Checks if the Entity has a component.
 
void RemoveComponent (const int &componentID)
 
void AddComponent (const int &componentID)
 

Detailed Description

Contains an Entity.

Contains an Entity Every Entity contains a vector of components which can further be Added and Removed

Entity is an object you see in the scene-tree. It contains a vector of componentsIDs which can be added and removed. All the Entities are stored in a gloabal map in the

Definition at line 18 of file Entity.h.

Constructor & Destructor Documentation

◆ Entity()

Vivid::Entity::Entity ( int  id,
String  name 
)

Definition at line 11 of file Entity.cpp.

Member Function Documentation

◆ AddComponent()

void Vivid::Entity::AddComponent ( const int &  componentID)

Definition at line 81 of file Entity.cpp.

◆ Draw()

void Vivid::Entity::Draw ( Camera camera)

Definition at line 36 of file Entity.cpp.

◆ DrawGizmo()

void Vivid::Entity::DrawGizmo ( Camera camera)

Definition at line 44 of file Entity.cpp.

◆ GetEntityID()

int Vivid::Entity::GetEntityID ( ) const
inline

Definition at line 35 of file Entity.h.

◆ GetName()

String Vivid::Entity::GetName ( ) const
inline

Definition at line 37 of file Entity.h.

◆ HasComponent()

int Vivid::Entity::HasComponent ( ComponentType  ct)

Checks if the Entity has a component.

Checks if the Entity has a component of the given type.

Parameters
ctThe type of the component.
Returns
The ID of the component if found, -1 if not found.

Definition at line 54 of file Entity.cpp.

◆ ImguiRender()

void Vivid::Entity::ImguiRender ( )

Definition at line 19 of file Entity.cpp.

◆ RemoveComponent()

void Vivid::Entity::RemoveComponent ( const int &  componentID)

Definition at line 67 of file Entity.cpp.

◆ SetName() [1/2]

void Vivid::Entity::SetName ( String &&  name)
inline

Definition at line 39 of file Entity.h.

◆ SetName() [2/2]

void Vivid::Entity::SetName ( String &  name)
inline

Definition at line 38 of file Entity.h.


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