CMSC23700 Common Code Library
Support code for CS23700 programming projects
cs237-sphere.hxx
Go to the documentation of this file.
1 
8 /*
9  * COPYRIGHT (c) 2015 John Reppy (http://cs.uchicago.edu/~jhr)
10  * All rights reserved.
11  */
12 
13 #ifndef _CS237_SPHERE_HXX_
14 #define _CS237_SPHERE_HXX_
15 
16 #ifndef _CS237_HXX_
17 #error "cs237-sphere.hxx should not be included directly"
18 #endif
19 
20 namespace cs237 {
21 
23  struct Sphere {
24  int numTris;
25  int numVerts;
26  unsigned short *tris;
29 
30  Sphere (float radius = 1.0f);
31  ~Sphere ();
32 
33  };
34 
35 } /* namespace cs237 */
36 
37 #endif /* !_CS237_SPHERE_HXX_ */
vec3f * verts
array of numVerts vertices
Definition: cs237-sphere.hxx:27
A spherical mesh.
Definition: cs237-sphere.hxx:23
int numVerts
number of vertices and vertex normals in the mesh
Definition: cs237-sphere.hxx:25
Sphere(float radius=1.0f)
unsigned short * tris
array of 3*numTris triangle indices
Definition: cs237-sphere.hxx:26
int numTris
number of triangles in the sphere mesh
Definition: cs237-sphere.hxx:24
vec3f * norms
array of numVerts vertex normals
Definition: cs237-sphere.hxx:28
Definition: cs237-aabb.hxx:18
template class for three-element vectors
Definition: cs237-types.hxx:26