49 lines
858 B
C++
49 lines
858 B
C++
// =============================================
|
|
// Aster: core_components.h
|
|
// Copyright (c) 2020-2024 Anish Bhobe
|
|
// =============================================
|
|
|
|
#pragma once
|
|
|
|
#include "aster/aster.h"
|
|
|
|
template <typename TComponent>
|
|
struct CDirty
|
|
{
|
|
using RelatedComponentType = TComponent;
|
|
};
|
|
|
|
template <typename TComponent>
|
|
struct CParent
|
|
{
|
|
using RelatedComponentType = TComponent;
|
|
entt::entity m_ParentEntity = NULL_ENTITY;
|
|
};
|
|
|
|
struct CDynamicTransform
|
|
{
|
|
vec3 m_Position = vec3{0.0f};
|
|
quat m_Rotation = glm::identity<quat>();
|
|
vec3 m_Scale = vec3{1.0f};
|
|
};
|
|
|
|
struct CStaticTransform
|
|
{};
|
|
|
|
struct CGlobalTransform
|
|
{
|
|
mat4 m_Transform = glm::identity<mat4>();
|
|
};
|
|
|
|
struct CMaterial
|
|
{
|
|
uptr m_MaterialPtr;
|
|
};
|
|
|
|
struct CMesh
|
|
{
|
|
uptr m_VertexPositionPtr;
|
|
uptr m_VertexDataPtr;
|
|
u32 m_FirstIndex;
|
|
u32 m_IndexCount;
|
|
}; |