23 m_planetRadius = planetRadius;
26 m_drawRadiusLine =
false;
41 m_planetRadius = bothRadiuses;
43 m_drawRadiusLine =
false;
53 Planet::Planet(
float x,
float y,
float z,
float planetRadius,
float crashRadius, GLuint textureName )
58 m_planetRadius = planetRadius;
81 glRotatef( m_rotateAngle, 0.0, 1.0, 0.0 );
82 glRotatef( (glutGet(GLUT_ELAPSED_TIME)*m_rotateSpeed * 0.001), 0.0, 1.0, 0.0 );
86 glTranslatef( pos.
x, pos.
y, pos.
z );
88 glRotatef( -90, 1.0, 0.0, 0.0 );
91 GLUquadricObj *quadObj = gluNewQuadric();
92 gluQuadricDrawStyle( quadObj, GLU_FILL );
93 gluQuadricTexture( quadObj, GL_TRUE );
94 gluSphere( quadObj, m_planetRadius, 32, 32 );
95 gluDeleteQuadric( quadObj );
99 if( m_drawRadiusLine ) {
101 glRotatef( -90, 1.0, 0.0, 0.0 );
116 glRotatef( m_rotateAngle, 0.0, 1.0, 0.0 );
117 glRotatef( (glutGet(GLUT_ELAPSED_TIME)*m_rotateSpeed * 0.001), 0.0, 1.0, 0.0 );
121 glTranslatef( pos.
x, pos.
y, pos.
z );
123 glGetFloatv( GL_MODELVIEW_MATRIX, &m[0][0] );
127 Vector3 actPos( m[3][0], m[3][1], m[3][2] );
137 return m_rotateSpeed;
147 m_rotateAngle = angle;
155 m_rotateSpeed = speed;
163 m_drawRadiusLine =
draw;