Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
mesh_data.h
1 #pragma once
2 
3 #include "util/vector.h"
4 #include "renderer/vertex.h"
5 
6 namespace blowbox
7 {
16  class MeshData
17  {
18  public:
19  MeshData();
20 
27  MeshData(const Vector<Vertex>& vertices, const Vector<Index>& indices, D3D_PRIMITIVE_TOPOLOGY topology);
28  ~MeshData();
29 
34  void SetVertices(const Vector<Vertex>& vertices);
35 
40  void SetIndices(const Vector<Index>& indices);
41 
46  void SetTopology(D3D_PRIMITIVE_TOPOLOGY topology);
47 
51  const Vector<Vertex>& GetVertices() const;
52 
56  const Vector<Index>& GetIndices() const;
57 
59  D3D_PRIMITIVE_TOPOLOGY GetTopology();
61  D3D_PRIMITIVE_TOPOLOGY GetTopology() const;
62 
63  private:
66  D3D_PRIMITIVE_TOPOLOGY topology_;
67  };
68 }
void SetTopology(D3D_PRIMITIVE_TOPOLOGY topology)
Sets the topology for this MeshData.
Definition: mesh_data.cc:39
Vector< Vertex > & GetVertices()
Definition: mesh_data.cc:45
eastl::vector< T > Vector
Typedef for wrapping the EASTL vector.
Definition: vector.h:14
Describes all the data for a Mesh.
Definition: mesh_data.h:16
Vector< Vertex > vertices_
The vertices of this MeshData.
Definition: mesh_data.h:64
void SetIndices(const Vector< Index > &indices)
Sets the indices for this MeshData.
Definition: mesh_data.cc:33
Vector< Index > & GetIndices()
Definition: mesh_data.cc:57
void SetVertices(const Vector< Vertex > &vertices)
Sets the vertices for this MeshData.
Definition: mesh_data.cc:27
The main Blowbox namespace.
Definition: image.cc:8
D3D_PRIMITIVE_TOPOLOGY topology_
The topology of this MeshData.
Definition: mesh_data.h:66
Vector< Index > indices_
The indices of this MeshData.
Definition: mesh_data.h:65
D3D_PRIMITIVE_TOPOLOGY GetTopology()
Definition: mesh_data.cc:69