19 static std::shared_ptr<Fling::Model>
Create(
Guid t_ID);
22 static std::shared_ptr<Fling::Model>
Quad();
33 Model(
Guid t_ID, std::vector<Vertex>& t_Verts, std::vector<UINT32> t_Indecies);
46 constexpr
static VkIndexType
GetIndexType() {
return VK_INDEX_TYPE_UINT32; }
std::vector< UINT32 > m_Indices
Definition: Model.h:55
~Model()
Definition: Model.cpp:92
Buffer * m_IndexBuffer
Definition: Model.h:58
Base class that represents a loaded resource in the engine.
Definition: Resource.h:11
std::vector< Vertex > m_Verts
Definition: Model.h:54
void LoadModel()
Load this model from Tiny Obj loader.
Definition: Model.cpp:99
FORCEINLINE Buffer * GetVertexBuffer() const
Definition: Model.h:37
Basic Vertex outline for use with our vertex buffers.
Definition: Vertex.h:10
Model(Guid t_ID)
Construct a new model object.
Definition: Model.cpp:76
static void CalculateVertexTangents(Vertex *verts, UINT32 numVerts, UINT32 *indices, UINT32 numIndices)
Definition: Model.cpp:171
A model represents a 3D model (.obj files for now) with vertices and indecies.
Definition: Model.h:15
void CreateBuffers()
Definition: Model.cpp:155
FORCEINLINE const std::vector< Vertex > & GetVerts() const
Definition: Model.h:40
entt::hashed_string Guid
Definition: FlingTypes.h:26
FORCEINLINE Buffer * GetIndexBuffer() const
Definition: Model.h:38
FORCEINLINE const std::vector< UINT32 > & GetIndices() const
Definition: Model.h:41
FORCEINLINE UINT32 GetVertexCount() const
Definition: Model.h:44
FORCEINLINE UINT32 GetIndexCount() const
Definition: Model.h:43
static std::shared_ptr< Fling::Model > Quad()
Creates a quad primitive model.
Definition: Model.cpp:15
A Buffer represents a Vulkan buffer with a size, buffer pointer, and buffer memory.
Definition: Buffer.h:11
uint32_t UINT32
Definition: FlingTypes.h:13
Buffer * m_VertexBuffer
Definition: Model.h:57
static constexpr VkIndexType GetIndexType()
Definition: Model.h:46
static std::shared_ptr< Fling::Model > Create(Guid t_ID)
Definition: Model.cpp:10