Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
Loading...
Searching...
No Matches
EntityFactory.hpp File Reference
#include <string>
#include <glm/glm.hpp>
#include "ecs/Entity.hpp"
#include "ecs/Registry.hpp"
#include "ecs/components/PrimitiveType.hpp"

Go to the source code of this file.

Namespaces

namespace  EntityFactory
 Factory functions to create, configure, and initialize typical entities and their Vulkan rendering resources.

Functions

Entity EntityFactory::spawnPrimitive (Registry &registry, VulkanRenderer &renderer, PrimitiveKind kind, const std::string &name, const glm::vec3 &position)
 Spawns an entity with a basic geometric primitive mesh.
Entity EntityFactory::spawnCamera (Registry &registry, VulkanRenderer &renderer, const std::string &name, const glm::vec3 &position, const glm::vec3 &rotation, float fov)
 Spawns a camera entity.
Entity EntityFactory::spawnGrid (Registry &registry, VulkanRenderer &renderer, const std::string &name, const glm::vec3 &position, const glm::vec3 &rotation, const glm::vec4 &color, float spacing, float size)
 Spawns a grid entity used for rendering editor grids.
Entity EntityFactory::spawnAnimatedModel (Registry &registry, VulkanRenderer &renderer, const std::string &name, const std::string &gltfPath, const glm::vec3 &position)
 Spawns an animated or static glTF mesh model.
void EntityFactory::uploadMesh (Registry &registry, VulkanRenderer &renderer, Entity entity)
 Allocates and uploads GPU buffers for a mesh component on the specified entity.