10#include "entt/entt.hpp"
11#include "meshoptimizer.h"
17#include <glm/gtc/quaternion.hpp>
23class btCollisionShape;
60 std::filesystem::path
path;
99 std::filesystem::path
path;
100 std::future<Engine::Assets::Textures::ExrHeader>
future;
105 std::future<Engine::Assets::Textures::Ktx2TextureData>
future;
166 static void push(entt::entity entity)
171 static std::vector<entt::entity>&
get()
204 std::weak_ptr<Engine::Entities::SceneNode>
node;
261 std::vector<PrimitiveData>
data;
263 std::shared_ptr<Engine::Assets::Skin>
skin;
285 return {
static_cast<uint32_t
>(i0) |
286 (
static_cast<uint32_t
>(i1) << 8) |
287 (
static_cast<uint32_t
>(i2) << 16) };
309 std::vector<Engine::Rendering::ClusterLodData>
clusters;
310 std::vector<Engine::Rendering::ClusterGroupData>
groups;
344 std::shared_ptr<Engine::Assets::Skin>
skin;
348 std::optional<PrimitiveData>
data = std::nullopt;
494 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::Path, Mesh > MeshAssetRef
Core audio subsystem owning the miniaudio engine and managing playback.
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.
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
std::filesystem::path path
std::future< tinygltf::Image > future
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
std::shared_ptr< 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
std::filesystem::path path
std::future< tinygltf::Model > future
std::filesystem::path path
std::future< Engine::Assets::Textures::Ktx2TextureData > future
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)
Engine::Rendering::PipelineNames type
Engine::Core::MaterialData * data
Reference to a MeshComponent for ECS-based iteration. Allows efficient querying of all mesh component...
Engine::Components::Mesh * component
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
std::optional< PrimitiveData > data
std::optional< MeshletData > meshletData
Ecs::BoundingSphere boundingSphere
Asset::Path materialPath
Reference to MaterialAsset for pipeline lookup.
std::optional< LodHierarchyResult > lodHierarchy
LOD hierarchy (if generated)
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
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< PrimitiveData > data
std::shared_ptr< Engine::Assets::Skin > skin
Non-null for skinned meshes.
std::vector< Asset::Path > materialPaths
Resolved material paths per primitive.
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
Engine::Assets::MeshAssetRef assetRef
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.