DirectZ
Loading...
Searching...
No Matches
dz::ecs::Entity Struct Reference

#include <Entity.hpp>

Inheritance diagram for dz::ecs::Entity:
dz::Provider< Entity >

Classes

struct  EntityReflectableGroup
struct  EntityTransformReflectable

Public Types

using ReflectableGroup = EntityReflectableGroup

Public Member Functions

uint32_t GetVertexCount (BufferGroup *buffer_group, Entity &entity)

Static Public Member Functions

static std::shared_ptr< ReflectableGroupMakeGroup (BufferGroup *buffer_group)
Static Public Member Functions inherited from dz::Provider< Entity >
static constexpr size_t GetPID ()
static constexpr bool GetIsComponent ()
static constexpr char GetComponentID ()
static constexpr bool GetIsDrawProvider ()
static constexpr bool GetIsCameraProvider ()
static constexpr bool GetIsSceneProvider ()
static float GetPriority ()
static const std::string & GetProviderName ()
static const std::string & GetStructName ()
static const std::string & GetGLSLStruct ()
static const std::unordered_map< ShaderModuleType, std::string > & GetGLSLMethods ()
static std::vector< std::tuple< float, std::string, ShaderModuleType > > & GetGLSLMain ()
static std::shared_ptr< ReflectableGroupTryMakeGroup (BufferGroup *buffer_group)

Public Attributes

int id = 0
int shape_index
int parent_index = -1
int enabled_components = 0
vec< float, 4 > position = vec<float, 4>(0.0f, 0.0f, 0.0f, 1.0f)
vec< float, 4 > rotation = vec<float, 4>(0.0f, 0.0f, 0.0f, 1.0f)
vec< float, 4 > scale = vec<float, 4>(1.0f, 1.0f, 1.0f, 1.0f)
mat< float, 4, 4 > model

Static Public Attributes

static constexpr size_t PID = 1
static float Priority = 0.5f
static constexpr bool IsDrawProvider = true
static std::string ProviderName = "Entity"
static std::string StructName = "Entity"
static std::string GLSLStruct
static std::unordered_map< ShaderModuleType, std::string > GLSLMethods
static std::vector< std::tuple< float, std::string, ShaderModuleType > > GLSLMain

Member Typedef Documentation

◆ ReflectableGroup

Member Function Documentation

◆ GetVertexCount()

uint32_t dz::ecs::Entity::GetVertexCount ( BufferGroup * buffer_group,
Entity & entity )
inline

◆ MakeGroup()

std::shared_ptr< ReflectableGroup > dz::ecs::Entity::MakeGroup ( BufferGroup * buffer_group)
inlinestatic

Member Data Documentation

◆ enabled_components

int dz::ecs::Entity::enabled_components = 0

◆ GLSLMain

std::vector<std::tuple<float, std::string, ShaderModuleType> > dz::ecs::Entity::GLSLMain
inlinestatic
Initial value:
= {
{0.5f, R"(
vec4 vertex_position = vec4(shape_vertex, 1.0);
final_color = GetEntityVertexColor(entity);
}
@ Vertex
Definition Shader.hpp:16

◆ GLSLMethods

std::unordered_map<ShaderModuleType, std::string> dz::ecs::Entity::GLSLMethods
inlinestatic
Initial value:
= {
vec4 GetEntityVertexColor(in Entity entity) {
return vec4(0, 0, 1, 0.8);
}
)" }
}

◆ GLSLStruct

std::string dz::ecs::Entity::GLSLStruct
inlinestatic
Initial value:
= R"(
struct Entity {
int id;
int shape_index;
int parent_index;
int enabled_components;
vec4 position;
vec4 rotation;
vec4 scale;
mat4 model;
};
)"

◆ id

int dz::ecs::Entity::id = 0

◆ IsDrawProvider

bool dz::ecs::Entity::IsDrawProvider = true
inlinestaticconstexpr

◆ model

mat<float, 4, 4> dz::ecs::Entity::model

◆ parent_index

int dz::ecs::Entity::parent_index = -1

◆ PID

size_t dz::ecs::Entity::PID = 1
inlinestaticconstexpr

◆ position

vec<float, 4> dz::ecs::Entity::position = vec<float, 4>(0.0f, 0.0f, 0.0f, 1.0f)

◆ Priority

float dz::ecs::Entity::Priority = 0.5f
inlinestatic

◆ ProviderName

std::string dz::ecs::Entity::ProviderName = "Entity"
inlinestatic

◆ rotation

vec<float, 4> dz::ecs::Entity::rotation = vec<float, 4>(0.0f, 0.0f, 0.0f, 1.0f)

◆ scale

vec<float, 4> dz::ecs::Entity::scale = vec<float, 4>(1.0f, 1.0f, 1.0f, 1.0f)

◆ shape_index

int dz::ecs::Entity::shape_index

◆ StructName

std::string dz::ecs::Entity::StructName = "Entity"
inlinestatic

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