12 Atmosphere::SunBox::~SunBox()
18 void Atmosphere::setArray(
float c0[4],
const GFXColor &c1 )
26 void Atmosphere::setArray1(
float c0[3],
const GFXColor &c1 )
36 dome =
new SphereMesh( params.
radius, divisions, divisions,
"white.bmp",
"", NULL,
true,
ONE,
ZERO,
false, 0,
M_PI/2 );
41 for (
size_t a = 0;
a < sunboxes.size(); ++
a)
59 for (
size_t a = 0;
a < sunboxes.size(); ++
a)
68 QVector direction = (currPlanet->Position()-position);
69 direction.Normalize();
76 localDir = localDirection;
82 QVector lprime = localDirection;
87 sunboxes.push_back(
new SunBox( NULL ) );
91 if ( !sunboxes.empty() ) {
92 float rho =
acos( rho1 )/(
PI/2);
93 float radius = user_params.
radius;
113 ScaledCrossProduct(
QVector( 0, 1, 0 ), localDir, r );
114 Rotate( m, r.Cast(), -80*(
PI/180) );
116 float sradius = 1.1*radius;
131 draw_queue.push_back(
this );
140 while ( !draw_queue.empty() ) {
141 draw_queue.back()->Draw();
142 draw_queue.pop_back();