Fling Engine  0.00.1
Fling Engine is a game engine written in Vulkan
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
Fling::Model Class Reference

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 ()
FORCEINLINE BufferGetVertexBuffer () const
FORCEINLINE BufferGetIndexBuffer () const
FORCEINLINE const std::vector< Vertex > & GetVerts () const
FORCEINLINE const std::vector< UINT32 > & GetIndices () const
FORCEINLINE UINT32 GetIndexCount () const
FORCEINLINE UINT32 GetVertexCount () const
bool CmdRender (const VkCommandBuffer &t_CmdBuf) 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...
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::ModelCreate (Guid t_ID)
static VkIndexType GetIndexType ()

Private Member Functions

void LoadModel ()
 Load this model from Tiny Obj loader. More...

Private Attributes

std::vector< Vertexm_Verts
std::vector< UINT32m_Indices
Bufferm_VertexBuffer = nullptr
Bufferm_IndexBuffer = nullptr

Additional Inherited Members

- Protected Attributes inherited from Fling::Resource
Fling::Guid m_Guid

Detailed Description

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.

Constructor & Destructor Documentation

◆ Model()

Fling::Model::Model ( Guid  t_ID)

Construct a new model object.

t_IDThe GUID that represents the file path to this model

◆ ~Model()

Fling::Model::~Model ( )

Member Function Documentation

◆ CmdRender()

bool Fling::Model::CmdRender ( const VkCommandBuffer &  t_CmdBuf) const

◆ Create()

std::shared_ptr< Fling::Model > Fling::Model::Create ( Guid  t_ID)

◆ GetIndexBuffer()

FORCEINLINE Buffer* Fling::Model::GetIndexBuffer ( ) const

◆ GetIndexCount()

FORCEINLINE UINT32 Fling::Model::GetIndexCount ( ) const

◆ GetIndexType()

static VkIndexType Fling::Model::GetIndexType ( )

◆ GetIndices()

FORCEINLINE const std::vector<UINT32>& Fling::Model::GetIndices ( ) const

◆ GetVertexBuffer()

FORCEINLINE Buffer* Fling::Model::GetVertexBuffer ( ) const

◆ GetVertexCount()

FORCEINLINE UINT32 Fling::Model::GetVertexCount ( ) const

◆ GetVerts()

FORCEINLINE const std::vector<Vertex>& Fling::Model::GetVerts ( ) const

◆ LoadModel()

void Fling::Model::LoadModel ( )

Load this model from Tiny Obj loader.

Field Documentation

◆ m_IndexBuffer

Buffer* Fling::Model::m_IndexBuffer = nullptr

◆ m_Indices

std::vector<UINT32> Fling::Model::m_Indices

◆ m_VertexBuffer

Buffer* Fling::Model::m_VertexBuffer = nullptr

◆ m_Verts

std::vector<Vertex> Fling::Model::m_Verts

The documentation for this class was generated from the following files: