Fireworks Engine  v2.0
Lightweight Sandbox Game Engine using OpenGL for additional Customisation and Quick Prototyping
mesh.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 #define _USE_MATH_DEFINES
8 #include <math.h>
9 
10 namespace fireworks { namespace graphics {
11 
15  class Mesh : public Renderable3D
16  {
17  private:
18  std::vector<Texture> m_MeshTextures;
19  public:
21  Mesh() {}
28  Mesh(Transform transform, Primitive3D primitive, Shader* shader, Texture* texture = nullptr);
36  Mesh(std::vector<VertexData3D> verts, std::vector<GLushort>indices, std::vector<Texture> texs, Transform transform, Shader* shader);
37  private:
38  void generateSphere(int radius, int latitudes, int longitudes);
39  void generateCylinder(int topRadius, int baseRadius, int height, int sectorCount);
40  void generatePlane();
41  void generateCube();
42  };
43 
44 } }
The spacial orientation of an object in 3D space denoted by it&#39;s position, rotation and scale...
Definition: renderable3d.h:38
The 3D mesh of a 3d renderable object.
Definition: mesh.h:15
The class responsible for loading Textures.
Definition: texture.h:11
The Class responsible for drawing the basic 3D Renderable objects onto the screen.
Definition: renderable3d.h:66
Shader * shader
The shader used to draw the renderable object.
Definition: renderable3d.h:72
Definition: audioclip.cpp:3
The class responsible for creating amazing shaders.
Definition: Shader.h:22
Mesh()
Creates an empty mesh object.
Definition: mesh.h:21
Primitive3D
Different types of 3D renderable primitive objects.
Definition: renderable3d.h:51