15 Star::Star(
float planetRadius,
float collisionRadius, GLuint textureName )
16 :
Planet( planetRadius, collisionRadius, textureName ),
19 m_lightPosition[0] = 0.0;
20 m_lightPosition[1] = 0.0;
21 m_lightPosition[2] = 0.0;
22 m_lightPosition[3] = 1.0;
26 glLightfv( GL_LIGHT0, GL_POSITION, m_lightPosition )
38 Star::Star(
float x,
float y,
float z,
float planetRadius, GLuint textureName )
39 :
Planet( x, y, z, planetRadius, textureName ),
41 m_lightPosition[0] = 0.0;
42 m_lightPosition[1] = 0.0;
43 m_lightPosition[2] = 0.0;
44 m_lightPosition[3] = 1.0;
48 glLightfv( GL_LIGHT0, GL_POSITION, m_lightPosition );
61 Star::Star(
float x,
float y,
float z,
float planetRadius,
float collisionRadius, GLuint textureName )
62 :
Planet( x, y, z, planetRadius, collisionRadius, textureName ),
65 m_lightPosition[0] = 0.0;
66 m_lightPosition[1] = 0.0;
67 m_lightPosition[2] = 0.0;
68 m_lightPosition[3] = 1.0;
72 glLightfv( GL_LIGHT0, GL_POSITION, m_lightPosition );
87 glPushAttrib( GL_ALL_ATTRIB_BITS );
89 color[0] = m_lightColor.
x;
90 color[1] = m_lightColor.
y;
91 color[2] = m_lightColor.
z;
92 glMaterialfv( GL_FRONT, GL_EMISSION, color );
102 m_lightColor = lightColor;
119 m_lightPosition[0] =
x;
120 m_lightPosition[1] =
y;
121 m_lightPosition[2] =
z;
122 glLightfv( GL_LIGHT0, GL_POSITION, m_lightPosition );
126 this->
setPos( position.
x, position.
y, position.
z );