# Khaotic Engine Reborn: ecs Namespace Reference

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.

{
Sphere,
Cube,
Terrain,
Unknown
};

## 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.

{
CEL_SHADING,
LIGHTING,
NORMAL_MAPPING,
SPECULAR_MAPPING,
REFLECTION,
REFRACTION,
TEXTURE,
SKYBOX,
SUNLIGHT,
ALPHA_MAPPING
};

## TextureType

enum class ecs::TextureType

strong

Enum for different types of textures used in rendering.

Definition at line 20 of file render_component.h.

{
Diffuse,
Normal,
Specular,
Alpha,
Reflection
};

## 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.

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