Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
|
#include <mesh_data.h>
Public Member Functions | |
MeshData (const Vector< Vertex > &vertices, const Vector< Index > &indices, D3D_PRIMITIVE_TOPOLOGY topology) | |
void | SetVertices (const Vector< Vertex > &vertices) |
void | SetIndices (const Vector< Index > &indices) |
void | SetTopology (D3D_PRIMITIVE_TOPOLOGY topology) |
Vector< Vertex > & | GetVertices () |
const Vector< Vertex > & | GetVertices () const |
Vector< Index > & | GetIndices () |
const Vector< Index > & | GetIndices () const |
D3D_PRIMITIVE_TOPOLOGY | GetTopology () |
D3D_PRIMITIVE_TOPOLOGY | GetTopology () const |
Private Attributes | |
Vector< Vertex > | vertices_ |
Vector< Index > | indices_ |
D3D_PRIMITIVE_TOPOLOGY | topology_ |
Describes all the data for a Mesh.
This class should be used to create data for meshes. Every mesh is a collection of vertices and indices with a given topology. You have to specify those yourself. This class is used by the Mesh in order to construct the necessary rendering buffers needed for rendering.
D3D_PRIMITIVE_TOPOLOGY blowbox::MeshData::GetTopology | ( | ) |
D3D_PRIMITIVE_TOPOLOGY blowbox::MeshData::GetTopology | ( | ) | const |
Sets the indices for this MeshData.
[in] | indices | The array of indices. |
void blowbox::MeshData::SetTopology | ( | D3D_PRIMITIVE_TOPOLOGY | topology | ) |
Sets the topology for this MeshData.
[in] | topology | The topology that should be set. |
Sets the vertices for this MeshData.
[in] | vertices | The array of vertices. |
|
private |
The topology of this MeshData.