]> Dogcows Code - chaz/yoink/blob - src/moof/sphere.cc
bugfix: win32 packaging script temp directories
[chaz/yoink] / src / moof / sphere.cc
1
2 /*] Copyright (c) 2009-2010, Charles McGarvey [**************************
3 **] All rights reserved.
4 *
5 * vi:ts=4 sw=4 tw=75
6 *
7 * Distributable under the terms and conditions of the 2-clause BSD license;
8 * see the file COPYING for a complete text of the license.
9 *
10 **************************************************************************/
11
12 #include "frustum.hh"
13 #include "opengl.hh"
14 #include "sphere.hh"
15
16
17 namespace moof {
18
19
20 void sphere::enclose_vertices(const vector3 vertices[], unsigned count)
21 {
22 // TODO
23 }
24
25 void sphere::draw(scalar alpha) const
26 {
27 GLUquadricObj* sphereObj = gluNewQuadric();
28 gluQuadricDrawStyle(sphereObj, GLU_LINE);
29
30 glPushMatrix();
31
32 //glTranslate(point[0], point[1], point[2]);
33 glTranslate(point);
34 gluSphere(sphereObj, (GLdouble)radius, 16, 16);
35
36 glPopMatrix();
37
38 gluDeleteQuadric(sphereObj);
39 }
40
41 bool sphere::is_visible(const frustum& frustum) const
42 {
43 return frustum.contains(*this);
44 }
45
46
47 } // namespace moof
48
This page took 0.035296 seconds and 4 git commands to generate.