AGL
A graphics library
sphere.h
1
// Copyright 2020, Savvy Sine, Aline Normoyle
2
3
#ifndef AGL_MESH_SPHERE_H_
4
#define AGL_MESH_SPHERE_H_
5
6
#include "agl/mesh/triangle_mesh.h"
7
8
namespace
agl {
9
13
class
Sphere
:
public
TriangleMesh
{
14
public
:
15
Sphere
(
float
rad, GLuint sl, GLuint st);
16
17
protected
:
18
void
init
()
override
;
19
20
private
:
21
float
_radius;
22
GLuint _nSlices;
23
GLuint _nStacks;
24
};
25
26
}
// namespace agl
27
#endif // AGL_MESH_SPHERE_H_
agl::TriangleMesh
Base class for indexed triangle meshes.
Definition:
triangle_mesh.h:16
agl::Sphere::init
void init() override
Override init to specifiy vertex data for the mesh.
Definition:
sphere.cpp:18
agl::Sphere
Draw a sphere mesh.
Definition:
sphere.h:13
agl
mesh
sphere.h
Generated by
1.8.17