Khaotic Engine Reborn
Loading...
Searching...
No Matches
ecs Namespace Reference

Classes

class  Component
 
class  Entity
 
class  EntityManager
 
class  IdentityComponent
 
class  ModelPathComponent
 
class  PhysicsComponent
 
class  RenderComponent
 
class  RenderSystem
 
class  ShaderComponent
 
class  TransformComponent
 

Typedefs

using ComponentPtr = std::shared_ptr<Component>
 
using ComponentTypeID = std::type_index
 
using EntityID = uint32_t
 

Enumerations

enum class  ObjectType { Sphere , Cube , Terrain , Unknown }
 
enum class  TextureType {
  Diffuse , Normal , Specular , Alpha ,
  Reflection
}
 
enum class  ShaderType {
  CEL_SHADING , LIGHTING , NORMAL_MAPPING , SPECULAR_MAPPING ,
  REFLECTION , REFRACTION , TEXTURE , SKYBOX ,
  SUNLIGHT , ALPHA_MAPPING
}
 

Functions

template<typename T >
ComponentTypeID GetComponentTypeID ()
 

Detailed Description

namespace for the Entity-Component-System (ECS)

Typedef Documentation

◆ ComponentPtr

using ecs::ComponentPtr = std::shared_ptr<Component>

Type alias for a shared pointer to a Component.

Definition at line 43 of file component.h.

◆ ComponentTypeID

using ecs::ComponentTypeID = std::type_index

Type alias for a unique identifier for a component type.

Definition at line 48 of file component.h.

◆ EntityID

using ecs::EntityID = uint32_t

Type alias for a unique identifier for an entity.

Definition at line 13 of file entity.h.

Enumeration Type Documentation

◆ ObjectType

enum class ecs::ObjectType
strong

Enum for different types of objects in the ECS. The object types is used to specify the collision type of the object.

Definition at line 10 of file identity_component.h.

11 {
12 Sphere,
13 Cube,
14 Terrain,
15 Unknown
16 };

◆ ShaderType

enum class ecs::ShaderType
strong

Enum for different shader types used in rendering. This enum is used to specify the type of shader to be applied to a model.

Definition at line 10 of file shader_component.h.

11{
12 CEL_SHADING,
13 LIGHTING,
14 NORMAL_MAPPING,
15 SPECULAR_MAPPING,
16 REFLECTION,
17 REFRACTION,
18 TEXTURE,
19 SKYBOX,
20 SUNLIGHT,
21 ALPHA_MAPPING
22};

◆ TextureType

enum class ecs::TextureType
strong

Enum for different types of textures used in rendering.

Definition at line 20 of file render_component.h.

21 {
22 Diffuse,
23 Normal,
24 Specular,
25 Alpha,
26 Reflection
27 };

Function Documentation

◆ GetComponentTypeID()

template<typename T >
ComponentTypeID ecs::GetComponentTypeID ( )

Function to get the unique type ID for a component type.

Definition at line 54 of file component.h.

54 {
55 static_assert(std::is_base_of<Component, T>::value, "T must derive from Component");
56 return std::type_index(typeid(T));
57}