vengine  0.0.1
3D graphics engine
Loading...
Searching...
No Matches
ven::Model Class Reference

Class for model. More...

#include <Model.hpp>

+ Collaboration diagram for ven::Model:

Classes

struct  Builder
 
struct  Vertex
 

Public Member Functions

 Model (Device &device, const Builder &builder)
 
 ~Model ()=default
 
 Model (const Model &)=delete
 
Modeloperator= (const Model &)=delete
 
 Model (Model &&)=delete
 
Modeloperator= (Model &&)=delete
 
void bind (VkCommandBuffer commandBuffer) const
 
void draw (VkCommandBuffer commandBuffer) const
 

Private Member Functions

void createVertexBuffer (const std::vector< Vertex > &vertices)
 
void createIndexBuffer (const std::vector< uint32_t > &indices)
 

Private Attributes

Devicem_device
 
std::unique_ptr< Bufferm_vertexBuffer
 
uint32_t m_vertexCount
 
bool m_hasIndexBuffer {false}
 
std::unique_ptr< Bufferm_indexBuffer
 
uint32_t m_indexCount
 

Detailed Description

Class for model.

Definition at line 29 of file Model.hpp.

Constructor & Destructor Documentation

◆ Model() [1/3]

ven::Model::Model ( Device & device,
const Builder & builder )

Definition at line 20 of file model.cpp.

References createIndexBuffer(), createVertexBuffer(), ven::Model::Builder::indices, and ven::Model::Builder::vertices.

+ Here is the call graph for this function:

◆ ~Model()

ven::Model::~Model ( )
default

◆ Model() [2/3]

ven::Model::Model ( const Model & )
delete

◆ Model() [3/3]

ven::Model::Model ( Model && )
delete

Member Function Documentation

◆ bind()

void ven::Model::bind ( VkCommandBuffer commandBuffer) const

Definition at line 73 of file model.cpp.

◆ createIndexBuffer()

void ven::Model::createIndexBuffer ( const std::vector< uint32_t > & indices)
private

Definition at line 43 of file model.cpp.

References ven::Buffer::map().

Referenced by Model().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createVertexBuffer()

void ven::Model::createVertexBuffer ( const std::vector< Vertex > & vertices)
private

Definition at line 26 of file model.cpp.

References ven::Buffer::map().

Referenced by Model().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ draw()

void ven::Model::draw ( VkCommandBuffer commandBuffer) const

Definition at line 64 of file model.cpp.

◆ operator=() [1/2]

Model & ven::Model::operator= ( const Model & )
delete

◆ operator=() [2/2]

Model & ven::Model::operator= ( Model && )
delete

Member Data Documentation

◆ m_device

Device& ven::Model::m_device
private

Definition at line 70 of file Model.hpp.

◆ m_hasIndexBuffer

bool ven::Model::m_hasIndexBuffer {false}
private

Definition at line 74 of file Model.hpp.

◆ m_indexBuffer

std::unique_ptr<Buffer> ven::Model::m_indexBuffer
private

Definition at line 75 of file Model.hpp.

◆ m_indexCount

uint32_t ven::Model::m_indexCount
private

Definition at line 76 of file Model.hpp.

◆ m_vertexBuffer

std::unique_ptr<Buffer> ven::Model::m_vertexBuffer
private

Definition at line 71 of file Model.hpp.

◆ m_vertexCount

uint32_t ven::Model::m_vertexCount
private

Definition at line 72 of file Model.hpp.


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