![]() |
MAGE
v0.171.0
Matthias Advanced Game Engine
|
#include <mesh.hpp>
Public Member Functions | |
virtual | ~Mesh () |
Mesh & | operator= (const Mesh &mesh)=delete |
Mesh & | operator= (Mesh &&mesh) noexcept |
std::size_t | GetNumberOfVertices () const noexcept |
std::size_t | GetNumberOfIndices () const noexcept |
std::size_t | GetVertexSize () const noexcept |
DXGI_FORMAT | GetIndexFormat () const noexcept |
D3D11_PRIMITIVE_TOPOLOGY | GetPrimitiveTopology () const noexcept |
void | BindMesh (ID3D11DeviceContext &device_context) const noexcept |
void | BindMesh (ID3D11DeviceContext &device_context, D3D11_PRIMITIVE_TOPOLOGY topology) const noexcept |
void | Draw (ID3D11DeviceContext &device_context) const noexcept |
void | Draw (ID3D11DeviceContext &device_context, std::size_t start_index, std::size_t nb_indices) const noexcept |
Protected Member Functions | |
Mesh (std::size_t vertex_size, DXGI_FORMAT index_format, D3D11_PRIMITIVE_TOPOLOGY primitive_topology) | |
Mesh (const Mesh &mesh)=delete | |
Mesh (Mesh &&mesh) noexcept | |
void | SetNumberOfVertices (std::size_t nb_vertices) noexcept |
void | SetNumberOfIndices (std::size_t nb_indices) noexcept |
Protected Attributes | |
ComPtr< ID3D11Buffer > | m_vertex_buffer |
ComPtr< ID3D11Buffer > | m_index_buffer |
Private Attributes | |
std::size_t | m_nb_vertices |
std::size_t | m_nb_indices |
std::size_t | m_vertex_size |
DXGI_FORMAT | m_index_format |
D3D11_PRIMITIVE_TOPOLOGY | m_primitive_topology |
A class of indexed meshes.
|
virtualdefault |
Destructs this mesh.
|
explicitprotected |
Constructs a mesh.
[in] | vertex_size | The vertex size. |
[in] | index_format | The index format. |
[in] | primitive_topology | The primitive topology. |
|
protecteddelete |
Constructs a mesh from the given mesh.
[in] | mesh | A reference to the mesh to copy. |
|
protecteddefaultnoexcept |
Constructs a mesh by moving the given mesh.
[in] | mesh | A reference to the mesh to move. |
|
noexcept |
Binds this mesh.
The vertex buffer, index buffer and primitive topology of this mesh will be bound to the input-assembler stage.
[in,out] | device_context | A reference to the device context. |
|
noexcept |
Binds this mesh with given primitive topology.
The vertex buffer, index buffer and given primitive topology of this mesh will be bound to the input-assembler stage.
[in,out] | device_context | A reference to the device context. |
[in] | topology | The primitive topology. |
|
noexcept |
Draws this complete mesh.
[in,out] | device_context | A reference to the device context. |
|
noexcept |
Draws a submesh of this mesh.
[in,out] | device_context | A reference to the device context. |
[in] | start_index | The start index. |
[in] | nb_indices | The number of indices. |
|
noexcept |
Returns the index format of this mesh.
|
noexcept |
Returns the number of indices of this mesh.
|
noexcept |
Returns the number of vertices of this mesh.
|
noexcept |
Returns the primitive topology of this mesh.
|
noexcept |
Returns the size (in bytes) of the vertices of this mesh.
Copies the given mesh to this mesh.
[in] | mesh | A reference to the mesh to copy. |
Moves the given mesh to this mesh.
[in] | mesh | A reference to the mesh to move. |
|
protectednoexcept |
Sets the number of indices of this mesh to the given number.
[in] | nb_indices | The number of indices of this mesh. |
|
protectednoexcept |
Sets the number of vertices of this mesh to the given number.
[in] | nb_vertices | The number of vertices of this mesh. |
|
protected |
A pointer to the index buffer of this mesh.
|
private |
The index format of this mesh.
|
private |
The number of indices of this mesh.
|
private |
The number of vertices of this mesh.
|
private |
The primitive topology of this mesh.
|
protected |
A pointer to the vertex buffer of this mesh.
|
private |
The vertex size of this mesh.