10#include "entt/entt.hpp"
11#include "meshoptimizer.h"
17#include <glm/gtc/quaternion.hpp>
23class btCollisionShape;
71 std::filesystem::path
path;
97 std::optional<Engine::Assets::GltfRenderableHandle>
renderable;
133 std::future<Engine::Assets::Textures::ExrHeader>
future;
148 std::future<Engine::Assets::Textures::Ktx2TextureData>
future;
239 static void push(entt::entity entity)
244 static std::vector<entt::entity>&
get()
277 std::weak_ptr<Engine::Entities::SceneNode>
node;
334 std::vector<PrimitiveData>
data;
358 return {
static_cast<uint32_t
>(i0) |
359 (
static_cast<uint32_t
>(i1) << 8) |
360 (
static_cast<uint32_t
>(i2) << 16) };
382 std::vector<Engine::Rendering::ClusterLodData>
clusters;
383 std::vector<Engine::Rendering::ClusterGroupData>
groups;
421 std::optional<PrimitiveData>
data = std::nullopt;
455 explicit Transform(glm::vec3 position, glm::quat rotation);
575 struct RawGeometryData;
Animation clip loaded from glTF animation data.
The mesh asset stores geometry data and.
Skeleton definition loaded from glTF skin data.
A component which can be attached as many times to an actor as one wants. It makes it possible to ren...
This is the interface which is used to call a tick function on an object. Everything which should be ...
Represents a node in the scene graph, containing information about its position, rotation,...
Asset::Ref< Asset::MeshPath, Mesh > MeshAssetRef
AssetHandle< GeometryMeshHandleTag > GeometryMeshHandle
AssetHandle< MaterialHandleTag > MaterialHandle
Manages IBL (Image-Based Lighting) resources for specular reflections.
PackedTriangle UnpackedTriangle
meshopt_Meshlet Meshlet
information about the vertex and index data of a single meshlet
AssetLoadingStage
Tracks the current stage of asset loading in the pipeline.
PipelineNames
Named graphics pipelines used by material selection and shader lookup.
Identifies a named mesh-like asset inside an asset file.
Unified material data structure containing all possible material properties.
Tag for the active camera in the scene.
Animation playback state for an entity with a skeletal mesh.
Engine::Assets::Animation * currentAnimation
Async glTF image load request tracked by the ECS asset pipeline.
std::filesystem::path path
Source image path.
std::future< tinygltf::Image > future
Future that resolves to decoded tinygltf image data.
Status information for asset loading pipeline.
Is a tag for asset loading. When an asset has been requested for loading but isn't yet created this t...
A bounding sphere for an entity. Used for frustum culling.
Camera properties for projection matrix calculation.
float fov
Vertical field of view in degrees.
Complete result of meshlet generation for all primitives of a mesh. This is returned from the backgro...
BoundingSphere meshBoundingSphere
std::vector< PrimitiveMeshletResult > primitiveResults
Engine::Assets::Skin * skin
Non-null for skinned meshes.
Runtime directional light data mirrored from Components::DirectionalLight. sceneNodeEntity points to ...
uint32_t hasDirectionOverride
float angularDiameterDegrees
entt::entity sceneNodeEntity
Async glTF model load request tracked by the ECS asset pipeline.
std::filesystem::path path
Source glTF path.
std::future< tinygltf::Model > future
Future that resolves to a parsed tinygltf model.
ECS wrapper for loaded tinygltf image data.
Async KTX2 texture load request tracked by the ECS asset pipeline.
std::filesystem::path path
Source KTX2 path.
std::future< Engine::Assets::Textures::Ktx2TextureData > future
Future that resolves to loaded KTX2 texture data.
Tag for ECS entities that provide renderer light data.
Result of LOD hierarchy generation for a mesh primitive. Contains per-cluster and per-group data for ...
UnpackedMeshletData unpackedData
Unpacked GPU data for LOD meshlets.
MeshletData meshletData
Meshlet data for all clusters (extends base meshlet data)
size_t lodLevelCount
Number of LOD levels generated.
std::vector< Engine::Rendering::ClusterLodData > clusters
Per-cluster data (all LOD levels combined)
std::vector< Engine::Rendering::ClusterGroupData > groups
size_t baseLevelClusterCount
Clusters at LOD 0 (finest level)
Material payload waiting to be registered as a material asset.
Engine::Rendering::PipelineNames type
Rendering pipeline selected for the material.
Asset::MeshPath path
Asset key for the material inside its source file.
Engine::Core::MaterialData * data
Material data produced by the loader.
References to MeshComponents for ECS-based iteration. Multiple mesh components can share one SceneNod...
std::vector< Engine::Components::Mesh * > components
The index of the mesh inside the scene. Used to query the mesh index of a scene.
std::vector< Ecs::MeshPrimitive > primitives
Ecs::BoundingSphere boundingSphere
Asset::MeshPath materialPath
Reference to MaterialAsset for pipeline lookup.
std::optional< PrimitiveData > data
std::optional< MeshletData > meshletData
Ecs::BoundingSphere boundingSphere
std::optional< LodHierarchyResult > lodHierarchy
LOD hierarchy (if generated)
Engine::Assets::MaterialHandle material
std::optional< UnpackedMeshletData > unpackedData
Pre-unpacked GPU-ready data.
std::vector< meshopt_Meshlet > meshlets
std::vector< uint32_t > meshletVertices
std::vector< uint8_t > meshletTriangles
std::future< tinygltf::Model > future
ECS wrapper for a loaded tinygltf model.
GPU-ready packed triangle data (matches shader layout). Stores 3 x 8-bit local indices packed into a ...
uint32_t packed
3 x 8-bit indices: (i2 << 16) | (i1 << 8) | i0
static PackedTriangle pack(uint8_t i0, uint8_t i1, uint8_t i2)
Pack 3 local indices into a single uint32_t.
Stores parent relationships.
Temporary holder for raw geometry data during pipeline execution This is used to pass data between pi...
Runtime point light data mirrored from Components::PointLight. sceneNodeEntity points to the transfor...
entt::entity sceneNodeEntity
std::vector< Asset::MeshPath > materialPaths
Resolved material paths per primitive.
std::vector< PrimitiveData > data
Engine::Assets::Skin * skin
Non-null for skinned meshes.
std::vector< uint32_t > indices
std::vector< BoneVertexData > boneVertexData
Empty for static meshes.
std::vector< Vertex > vertices
Result of meshlet generation for a single primitive. Used to transfer data from background thread to ...
BoundingSphere boundingSphere
UnpackedMeshletData unpackedData
GPU-ready unpacked vertex/triangle data.
std::optional< LodHierarchyResult > lodHierarchy
LOD hierarchy (if generated)
PrimitiveData optimizedData
Optimized vertices and indices.
Raw mesh geometry data extracted from gltf file Contains unprocessed vertices and indices.
std::vector< uint32_t > indices
std::vector< Vertex > vertices
Global dirty entity collector for renderer transform uploads.
static std::vector< entt::entity > & get()
static void push(entt::entity entity)
static void reserveAdditional(size_t additionalEntities)
Reserve memory for entities when batch spawning to avoid reallocation.
static std::vector< entt::entity > entities
A struct which allows the engine to find out which SceneNode needs to propagate a dirty flag down the...
std::weak_ptr< Engine::Entities::SceneNode > node
Tag for EnTT which tags entities which should simulate physics.
btCollisionShape * collisionShape
Skeletal mesh data component. Similar to StaticMeshData but references skin/animation.
Engine::Assets::Skin * skin
Engine::Assets::Mesh * assetData
Engine::Components::Mesh * owner
std::optional< Engine::Assets::GltfRenderableHandle > renderable
Engine::Assets::GeometryMeshHandle mesh
Engine::Assets::MeshAssetRef assetRef
Collection of static mesh references attached to one entity.
std::vector< StaticMeshData > meshData
Tag for everything which wants to receive tick events.
Engine::Core::ITickable * tickable
Pre-packed GPU-ready data for a primitive's meshlets. Generated on background thread during meshlet g...
std::vector< PackedTriangle > triangles
Packed triangle indices (4 bytes each)
std::vector< Vertex > vertices
Unpacked vertex data per meshlet.