![]() |
Fling Engine
0.00.1
Fling Engine is a game engine written in Vulkan
|
A model represents a 3D model (.obj files for now) with vertices and indecies. More...
#include <Model.h>
Inherits Fling::Resource.
Public Member Functions | |
| Model (Guid t_ID) | |
| Construct a new model object. More... | |
| Model (Guid t_ID, std::vector< Vertex > &t_Verts, std::vector< UINT32 > t_Indecies) | |
| ~Model () | |
| FORCEINLINE Buffer * | GetVertexBuffer () const |
| FORCEINLINE Buffer * | GetIndexBuffer () const |
| FORCEINLINE const std::vector< Vertex > & | GetVerts () const |
| FORCEINLINE const std::vector< UINT32 > & | GetIndices () const |
| FORCEINLINE UINT32 | GetIndexCount () const |
| FORCEINLINE UINT32 | GetVertexCount () const |
Public Member Functions inherited from Fling::Resource | |
| Resource (Fling::Guid t_ID) | |
| virtual | ~Resource ()=default |
| Fling::Guid_Handle | GetGuidHandle () const |
| Get GUID handle (just an int) for this resources guid. More... | |
| const std::string & | GetGuidString () const |
| Get the human-readable string representation of this GUID. More... | |
| std::string | GetFilepathReleativeToAssets () const |
| Returns the full file path that is relative to the assets path based on the GUID of this resource. More... | |
Static Public Member Functions | |
| static std::shared_ptr< Fling::Model > | Create (Guid t_ID) |
| static std::shared_ptr< Fling::Model > | Quad () |
| Creates a quad primitive model. More... | |
| static constexpr VkIndexType | GetIndexType () |
Private Member Functions | |
| void | CreateBuffers () |
| void | LoadModel () |
| Load this model from Tiny Obj loader. More... | |
Static Private Member Functions | |
| static void | CalculateVertexTangents (Vertex *verts, UINT32 numVerts, UINT32 *indices, UINT32 numIndices) |
Private Attributes | |
| std::vector< Vertex > | m_Verts |
| std::vector< UINT32 > | m_Indices |
| Buffer * | m_VertexBuffer = nullptr |
| Buffer * | m_IndexBuffer = nullptr |
Additional Inherited Members | |
Protected Attributes inherited from Fling::Resource | |
| Fling::Guid | m_Guid |
| std::string | m_HumanReadableName |
A model represents a 3D model (.obj files for now) with vertices and indecies.
A model has a vertex and index buffer and can be bound to a command buffer.
| Fling::Model::Model | ( | Guid | t_ID | ) |
Construct a new model object.
| t_ID | The GUID that represents the file path to this model |
| Fling::Model::Model | ( | Guid | t_ID, |
| std::vector< Vertex > & | t_Verts, | ||
| std::vector< UINT32 > | t_Indecies | ||
| ) |
| t_ID | The GUID that represents a unique name for this model. It's up to the user to ensure uniqueness |
| Fling::Model::~Model | ( | ) |
|
staticprivate |
|
static |
|
private |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
Load this model from Tiny Obj loader.
|
static |
Creates a quad primitive model.
|
private |
|
private |
|
private |
|
private |
1.8.13