Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
Public Member Functions | Private Attributes | List of all members
blowbox::MeshData Class Reference

#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< Vertexvertices_
 
Vector< Indexindices_
 
D3D_PRIMITIVE_TOPOLOGY topology_
 

Detailed Description

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.

Constructor & Destructor Documentation

blowbox::MeshData::MeshData ( const Vector< Vertex > &  vertices,
const Vector< Index > &  indices,
D3D_PRIMITIVE_TOPOLOGY  topology 
)

Constructs a MeshData with a given set of vertices, indices and topology.

Parameters
[in]verticesThe vertices for this MeshData.
[in]indicesThe indices for this MeshData.
[in]topologyThe topology of the MeshData.

Member Function Documentation

Vector< Index > & blowbox::MeshData::GetIndices ( )
Returns
The underlying indices array.
const Vector< Index > & blowbox::MeshData::GetIndices ( ) const
Returns
The underlying indices array.
D3D_PRIMITIVE_TOPOLOGY blowbox::MeshData::GetTopology ( )
Returns
The topology of this MeshData.
D3D_PRIMITIVE_TOPOLOGY blowbox::MeshData::GetTopology ( ) const
Returns
The topology of this MeshData.
Vector< Vertex > & blowbox::MeshData::GetVertices ( )
Returns
The underlying vertices array.
const Vector< Vertex > & blowbox::MeshData::GetVertices ( ) const
Returns
The underlying vertices array.
void blowbox::MeshData::SetIndices ( const Vector< Index > &  indices)

Sets the indices for this MeshData.

Parameters
[in]indicesThe array of indices.
void blowbox::MeshData::SetTopology ( D3D_PRIMITIVE_TOPOLOGY  topology)

Sets the topology for this MeshData.

Parameters
[in]topologyThe topology that should be set.
void blowbox::MeshData::SetVertices ( const Vector< Vertex > &  vertices)

Sets the vertices for this MeshData.

Parameters
[in]verticesThe array of vertices.

Member Data Documentation

Vector<Index> blowbox::MeshData::indices_
private

The indices of this MeshData.

D3D_PRIMITIVE_TOPOLOGY blowbox::MeshData::topology_
private

The topology of this MeshData.

Vector<Vertex> blowbox::MeshData::vertices_
private

The vertices of this MeshData.


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