9{
11
12 glBegin( GL_TRIANGLE_FAN );
13 glColor4fv( m.ambient );
14 glMaterialfv(GL_FRONT, GL_DIFFUSE, m.diffuse);
15 glMaterialfv(GL_FRONT, GL_SPECULAR, m.specular);
16 glMaterialf(GL_FRONT, GL_SHININESS, m.shinyness );
19 glVertex3fv( south_pole );
20 for (
int x = 0; x <=
NLON; ++x )
21 {
24 glVertex3fv( p );
25 }
26 glEnd();
27
28 for (
int y = 1; y <
NLAT - 1; ++y )
29 {
30 glBegin( GL_QUAD_STRIP);
31 glColor4fv( m.ambient );
32 glMaterialfv(GL_FRONT, GL_DIFFUSE, m.diffuse);
33 glMaterialfv(GL_FRONT, GL_SPECULAR, m.specular);
34 glMaterialf(GL_FRONT, GL_SHININESS, m.shinyness );
35 for (
int x = 0; x <=
NLON; ++x )
36 {
40 glVertex3fv( p );
42 glVertex3fv( q );
43 }
44 glEnd();
45 }
46
47 glBegin( GL_TRIANGLE_FAN );
48 glColor4fv( m.ambient );
49 glMaterialfv(GL_FRONT, GL_DIFFUSE, m.diffuse);
50 glMaterialfv(GL_FRONT, GL_SPECULAR, m.specular);
51 glMaterialf(GL_FRONT, GL_SHININESS, m.shinyness );
54 glVertex3fv( north_pole );
55 for (
int x =
NLON; x >= 0; --x )
56 {
59 glVertex3fv( p );
60 }
61 glEnd();
62}
PointVector< Real, 3 > Point3
The type for representing a 3d vector;.
static const int NLAT
number of different latitudes for display
Vector3 getNormal(Point3 p)
Point3 localize(Real latitude, Real longitude) const
static const int NLON
number of different longitudes for display