head	1.4;
access;
symbols;
locks; strict;
comment	@# @;


1.4
date	2002.09.07.01.50.37;	author curt;	state Exp;
branches;
next	1.3;

1.3
date	2002.08.31.19.01.53;	author curt;	state Exp;
branches;
next	1.2;

1.2
date	2002.08.31.18.54.00;	author curt;	state Exp;
branches;
next	1.1;

1.1
date	2002.02.15.17.21.55;	author curt;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Updated doxygen docs.
@
text
@<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>dome.cxx Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.16 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
<hr><h1>dome.cxx</h1><div class="fragment"><pre>00001 <font class="comment">// dome.cxx -- model sky with an upside down "bowl"</font>
00002 <font class="comment">//</font>
00003 <font class="comment">// Written by Curtis Olson, started December 1997.</font>
00004 <font class="comment">// SSG-ified by Curtis Olson, February 2000.</font>
00005 <font class="comment">//</font>
00006 <font class="comment">// Copyright (C) 1997-2000  Curtis L. Olson  - curt@@flightgear.org</font>
00007 <font class="comment">//</font>
00008 <font class="comment">// This library is free software; you can redistribute it and/or</font>
00009 <font class="comment">// modify it under the terms of the GNU Library General Public</font>
00010 <font class="comment">// License as published by the Free Software Foundation; either</font>
00011 <font class="comment">// version 2 of the License, or (at your option) any later version.</font>
00012 <font class="comment">//</font>
00013 <font class="comment">// This library is distributed in the hope that it will be useful,</font>
00014 <font class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</font>
00015 <font class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</font>
00016 <font class="comment">// Library General Public License for more details.</font>
00017 <font class="comment">//</font>
00018 <font class="comment">// You should have received a copy of the GNU Library General Public</font>
00019 <font class="comment">// License along with this library; if not, write to the</font>
00020 <font class="comment">// Free Software Foundation, Inc., 59 Temple Place - Suite 330,</font>
00021 <font class="comment">// Boston, MA  02111-1307, USA.</font>
00022 <font class="comment">//</font>
00023 <font class="comment">// $Id: dome.cxx,v 1.13 2002/04/27 03:19:45 curt Exp $</font>
00024 
00025 
00026 <font class="preprocessor">#ifdef HAVE_CONFIG_H</font>
00027 <font class="preprocessor"></font><font class="preprocessor">#  include &lt;simgear_config.h&gt;</font>
00028 <font class="preprocessor">#endif</font>
00029 <font class="preprocessor"></font>
00030 <font class="preprocessor">#ifdef HAVE_WINDOWS_H</font>
00031 <font class="preprocessor"></font><font class="preprocessor">#  include &lt;windows.h&gt;</font>
00032 <font class="preprocessor">#endif</font>
00033 <font class="preprocessor"></font>
00034 <font class="preprocessor">#include &lt;math.h&gt;</font>
00035 
00036 <font class="preprocessor">#include &lt;GL/glut.h&gt;</font>
00037 <font class="preprocessor">#include &lt;simgear/xgl/xgl.h&gt;</font>
00038 
00039 <font class="preprocessor">#include &lt;plib/sg.h&gt;</font>
00040 
00041 <font class="preprocessor">#include &lt;<a class="code" href="logstream_8hxx.html">simgear/debug/logstream.hxx</a>&gt;</font>
00042 
00043 <font class="preprocessor">#include "dome.hxx"</font>
00044 
00045 
00046 <font class="preprocessor">#ifdef __MWERKS__</font>
00047 <font class="preprocessor"></font><font class="preprocessor">#  pragma global_optimizer off</font>
00048 <font class="preprocessor"></font><font class="preprocessor">#endif</font>
00049 <font class="preprocessor"></font>
00050 
00051 <font class="comment">// in meters of course</font>
00052 <font class="keyword">static</font> <font class="keyword">const</font> <font class="keywordtype">float</font> center_elev = 0.3125;
00053 
00054 <font class="keyword">static</font> <font class="keyword">const</font> <font class="keywordtype">float</font> upper_radius = 0.6250;
00055 <font class="keyword">static</font> <font class="keyword">const</font> <font class="keywordtype">float</font> upper_elev = 0.2500;
00056 
00057 <font class="keyword">static</font> <font class="keyword">const</font> <font class="keywordtype">float</font> middle_radius = 0.8750;
00058 <font class="keyword">static</font> <font class="keyword">const</font> <font class="keywordtype">float</font> middle_elev = 0.1000;
00059 
00060 <font class="keyword">static</font> <font class="keyword">const</font> <font class="keywordtype">float</font> lower_radius = 0.8750;
00061 <font class="keyword">static</font> <font class="keyword">const</font> <font class="keywordtype">float</font> lower_elev = 0.0000;
00062 
00063 <font class="keyword">static</font> <font class="keyword">const</font> <font class="keywordtype">float</font> bottom_radius = 0.6250;
00064 <font class="keyword">static</font> <font class="keyword">const</font> <font class="keywordtype">float</font> bottom_elev = -0.0250;
00065 
00066 
00067 <font class="comment">// Set up dome rendering callbacks</font>
00068 <font class="keyword">static</font> <font class="keywordtype">int</font> sgSkyDomePreDraw( ssgEntity *e ) {
00069     <font class="comment">/* cout &lt;&lt; endl &lt;&lt; "Dome Pre Draw" &lt;&lt; endl &lt;&lt; "----------------" </font>
00070 <font class="comment">         &lt;&lt; endl &lt;&lt; endl; */</font>
00071 
00072     ssgLeaf *f = (ssgLeaf *)e;
00073     <font class="keywordflow">if</font> ( f -&gt; hasState () ) f-&gt;getState()-&gt;apply() ;
00074 
00075     glPushAttrib( GL_DEPTH_BUFFER_BIT | GL_FOG_BIT );
00076     <font class="comment">// cout &lt;&lt; "push error = " &lt;&lt; glGetError() &lt;&lt; endl;</font>
00077 
00078     glDisable( GL_DEPTH_TEST );
00079     glDisable( GL_FOG );
00080 
00081     <font class="keywordflow">return</font> <font class="keyword">true</font>;
00082 }
00083 
00084 <font class="keyword">static</font> <font class="keywordtype">int</font> sgSkyDomePostDraw( ssgEntity *e ) {
00085     <font class="comment">/* cout &lt;&lt; endl &lt;&lt; "Dome Post Draw" &lt;&lt; endl &lt;&lt; "----------------" </font>
00086 <font class="comment">         &lt;&lt; endl &lt;&lt; endl; */</font>
00087 
00088     glPopAttrib();
00089     <font class="comment">// cout &lt;&lt; "pop error = " &lt;&lt; glGetError() &lt;&lt; endl;</font>
00090     
00091     <font class="keywordflow">return</font> <font class="keyword">true</font>;
00092 }
00093 
00094 
00095 <font class="comment">// Constructor</font>
00096 SGSkyDome::SGSkyDome( <font class="keywordtype">void</font> ) {
00097 }
00098 
00099 
00100 <font class="comment">// Destructor</font>
00101 SGSkyDome::~SGSkyDome( <font class="keywordtype">void</font> ) {
00102 }
00103 
00104 
00105 <font class="comment">// initialize the sky object and connect it into our scene graph</font>
00106 ssgBranch * SGSkyDome::build( <font class="keywordtype">double</font> hscale, <font class="keywordtype">double</font> vscale ) {
00107     sgVec4 color;
00108 
00109     <font class="keywordtype">float</font> theta;
00110     <font class="keywordtype">int</font> i;
00111 
00112     <font class="comment">// set up the state</font>
00113     dome_state = <font class="keyword">new</font> ssgSimpleState();
00114     dome_state-&gt;setShadeModel( GL_SMOOTH );
00115     dome_state-&gt;disable( GL_LIGHTING );
00116     dome_state-&gt;disable( GL_CULL_FACE );
00117     dome_state-&gt;disable( GL_TEXTURE_2D );
00118     dome_state-&gt;enable( GL_COLOR_MATERIAL );
00119     dome_state-&gt;setColourMaterial( GL_AMBIENT_AND_DIFFUSE );
00120     dome_state-&gt;setMaterial( GL_EMISSION, 0, 0, 0, 1 );
00121     dome_state-&gt;setMaterial( GL_SPECULAR, 0, 0, 0, 1 );
00122     dome_state-&gt;disable( GL_BLEND );
00123     dome_state-&gt;disable( GL_ALPHA_TEST );
00124 
00125     <font class="comment">// initialize arrays</font>
00126     center_disk_vl = <font class="keyword">new</font> ssgVertexArray( 14 );
00127     center_disk_cl = <font class="keyword">new</font> ssgColourArray( 14 );
00128                                        
00129     upper_ring_vl = <font class="keyword">new</font> ssgVertexArray( 26 );
00130     upper_ring_cl = <font class="keyword">new</font> ssgColourArray( 26 );
00131 
00132     middle_ring_vl = <font class="keyword">new</font> ssgVertexArray( 26 );
00133     middle_ring_cl = <font class="keyword">new</font> ssgColourArray( 26 );
00134 
00135     lower_ring_vl = <font class="keyword">new</font> ssgVertexArray( 26 );
00136     lower_ring_cl = <font class="keyword">new</font> ssgColourArray( 26 );
00137 
00138     <font class="comment">// initially seed to all blue</font>
00139     sgSetVec4( color, 0.0, 0.0, 1.0, 1.0 );
00140 
00141     <font class="comment">// generate the raw vertex data</font>
00142     sgVec3 center_vertex;
00143     sgVec3 upper_vertex[12];
00144     sgVec3 middle_vertex[12];
00145     sgVec3 lower_vertex[12];
00146     sgVec3 bottom_vertex[12];
00147 
00148     sgSetVec3( center_vertex, 0.0, 0.0, center_elev * vscale );
00149 
00150     <font class="keywordflow">for</font> ( i = 0; i &lt; 12; i++ ) {
00151         theta = (i * 30.0) * SGD_DEGREES_TO_RADIANS;
00152 
00153         sgSetVec3( upper_vertex[i],
00154                    cos(theta) * upper_radius * hscale,
00155                    sin(theta) * upper_radius * hscale,
00156                    upper_elev * vscale );
00157         
00158         sgSetVec3( middle_vertex[i],
00159                    cos((<font class="keywordtype">double</font>)theta) * middle_radius * hscale,
00160                    sin((<font class="keywordtype">double</font>)theta) * middle_radius * hscale,
00161                    middle_elev * vscale );
00162 
00163         sgSetVec3( lower_vertex[i],
00164                    cos((<font class="keywordtype">double</font>)theta) * lower_radius * hscale,
00165                    sin((<font class="keywordtype">double</font>)theta) * lower_radius * hscale,
00166                    lower_elev * vscale );
00167 
00168         sgSetVec3( bottom_vertex[i],
00169                    cos((<font class="keywordtype">double</font>)theta) * bottom_radius * hscale,
00170                    sin((<font class="keywordtype">double</font>)theta) * bottom_radius * hscale,
00171                    bottom_elev * vscale );
00172     }
00173 
00174     <font class="comment">// generate the center disk vertex/color arrays</font>
00175     center_disk_vl-&gt;add( center_vertex );
00176     center_disk_cl-&gt;add( color );
00177     <font class="keywordflow">for</font> ( i = 11; i &gt;= 0; i-- ) {
00178         center_disk_vl-&gt;add( upper_vertex[i] );
00179         center_disk_cl-&gt;add( color );
00180     }
00181     center_disk_vl-&gt;add( upper_vertex[11] );
00182     center_disk_cl-&gt;add( color );
00183 
00184     <font class="comment">// generate the upper ring</font>
00185     <font class="keywordflow">for</font> ( i = 0; i &lt; 12; i++ ) {
00186         upper_ring_vl-&gt;add( middle_vertex[i] );
00187         upper_ring_cl-&gt;add( color );
00188 
00189         upper_ring_vl-&gt;add( upper_vertex[i] );
00190         upper_ring_cl-&gt;add( color );
00191     }
00192     upper_ring_vl-&gt;add( middle_vertex[0] );
00193     upper_ring_cl-&gt;add( color );
00194 
00195     upper_ring_vl-&gt;add( upper_vertex[0] );
00196     upper_ring_cl-&gt;add( color );
00197 
00198     <font class="comment">// generate middle ring</font>
00199     <font class="keywordflow">for</font> ( i = 0; i &lt; 12; i++ ) {
00200         middle_ring_vl-&gt;add( lower_vertex[i] );
00201         middle_ring_cl-&gt;add( color );
00202 
00203         middle_ring_vl-&gt;add( middle_vertex[i] );
00204         middle_ring_cl-&gt;add( color );
00205     }
00206     middle_ring_vl-&gt;add( lower_vertex[0] );
00207     middle_ring_cl-&gt;add( color );
00208 
00209     middle_ring_vl-&gt;add( middle_vertex[0] );
00210     middle_ring_cl-&gt;add( color );
00211 
00212     <font class="comment">// generate lower ring</font>
00213     <font class="keywordflow">for</font> ( i = 0; i &lt; 12; i++ ) {
00214         lower_ring_vl-&gt;add( bottom_vertex[i] );
00215         lower_ring_cl-&gt;add( color );
00216 
00217         lower_ring_vl-&gt;add( lower_vertex[i] );
00218         lower_ring_cl-&gt;add( color );
00219     }
00220     lower_ring_vl-&gt;add( bottom_vertex[0] );
00221     lower_ring_cl-&gt;add( color );
00222 
00223     lower_ring_vl-&gt;add( lower_vertex[0] );
00224     lower_ring_cl-&gt;add( color );
00225 
00226     <font class="comment">// force a repaint of the sky colors with ugly defaults</font>
00227     sgVec4 fog_color;
00228     sgSetVec4( fog_color, 1.0, 1.0, 1.0, 1.0 );
00229     repaint( color, fog_color, 0.0, 5000.0 );
00230 
00231     <font class="comment">// build the ssg scene graph sub tree for the sky and connected</font>
00232     <font class="comment">// into the provide scene graph branch</font>
00233     ssgVtxTable *center_disk, *upper_ring, *middle_ring, *lower_ring;
00234 
00235     center_disk = <font class="keyword">new</font> ssgVtxTable( GL_TRIANGLE_FAN, 
00236                                    center_disk_vl, NULL, NULL, center_disk_cl );
00237 
00238     upper_ring = <font class="keyword">new</font> ssgVtxTable( GL_TRIANGLE_STRIP, 
00239                                   upper_ring_vl, NULL, NULL, upper_ring_cl );
00240 
00241     middle_ring = <font class="keyword">new</font> ssgVtxTable( GL_TRIANGLE_STRIP, 
00242                                    middle_ring_vl, NULL, NULL, middle_ring_cl );
00243 
00244     lower_ring = <font class="keyword">new</font> ssgVtxTable( GL_TRIANGLE_STRIP, 
00245                                   lower_ring_vl, NULL, NULL, lower_ring_cl );
00246 
00247     center_disk-&gt;setState( dome_state );
00248     upper_ring-&gt;setState( dome_state );
00249     middle_ring-&gt;setState( dome_state );
00250     lower_ring-&gt;setState( dome_state );
00251 
00252     dome_transform = <font class="keyword">new</font> ssgTransform;
00253     dome_transform-&gt;addKid( center_disk );
00254     dome_transform-&gt;addKid( upper_ring );
00255     dome_transform-&gt;addKid( middle_ring );
00256     dome_transform-&gt;addKid( lower_ring );
00257 
00258     <font class="comment">// not entirely satisfying.  We are depending here that the first</font>
00259     <font class="comment">// thing we add to a parent is the first drawn</font>
00260     center_disk-&gt;setCallback( SSG_CALLBACK_PREDRAW, sgSkyDomePreDraw );
00261     center_disk-&gt;setCallback( SSG_CALLBACK_POSTDRAW, sgSkyDomePostDraw );
00262 
00263     upper_ring-&gt;setCallback( SSG_CALLBACK_PREDRAW, sgSkyDomePreDraw );
00264     upper_ring-&gt;setCallback( SSG_CALLBACK_POSTDRAW, sgSkyDomePostDraw );
00265 
00266     middle_ring-&gt;setCallback( SSG_CALLBACK_PREDRAW, sgSkyDomePreDraw );
00267     middle_ring-&gt;setCallback( SSG_CALLBACK_POSTDRAW, sgSkyDomePostDraw );
00268 
00269     lower_ring-&gt;setCallback( SSG_CALLBACK_PREDRAW, sgSkyDomePreDraw );
00270     lower_ring-&gt;setCallback( SSG_CALLBACK_POSTDRAW, sgSkyDomePostDraw );
00271 
00272     <font class="keywordflow">return</font> dome_transform;
00273 }
00274 
00275 
00276 <font class="comment">// repaint the sky colors based on current value of sun_angle, sky,</font>
00277 <font class="comment">// and fog colors.  This updates the color arrays for ssgVtxTable.</font>
00278 <font class="comment">// sun angle in degrees relative to verticle</font>
00279 <font class="comment">// 0 degrees = high noon</font>
00280 <font class="comment">// 90 degrees = sun rise/set</font>
00281 <font class="comment">// 180 degrees = darkest midnight</font>
00282 <font class="keywordtype">bool</font> SGSkyDome::repaint( sgVec4 sky_color, sgVec4 fog_color, <font class="keywordtype">double</font> sun_angle,
00283                          <font class="keywordtype">double</font> vis )
00284 {
00285     <font class="keywordtype">double</font> diff;
00286     sgVec3 outer_param, outer_amt, outer_diff;
00287     sgVec3 middle_param, middle_amt, middle_diff;
00288     <font class="keywordtype">int</font> i, j;
00289 
00290     <font class="comment">// Check for sunrise/sunset condition</font>
00291     <font class="keywordflow">if</font> ( (sun_angle &gt; 80.0) &amp;&amp; (sun_angle &lt; 100.0) ) {
00292         <font class="comment">// 0.0 - 0.4</font>
00293         sgSetVec3( outer_param,
00294                    (10.0 - fabs(90.0 - sun_angle)) / 20.0,
00295                    (10.0 - fabs(90.0 - sun_angle)) / 40.0,
00296                    -(10.0 - fabs(90.0 - sun_angle)) / 30.0 );
00297 
00298         sgSetVec3( middle_param,
00299                    (10.0 - fabs(90.0 - sun_angle)) / 40.0,
00300                    (10.0 - fabs(90.0 - sun_angle)) / 80.0,
00301                    0.0 );
00302 
00303         sgScaleVec3( outer_diff, outer_param, 1.0 / 6.0 );
00304 
00305         sgScaleVec3( middle_diff, middle_param, 1.0 / 6.0 );
00306     } <font class="keywordflow">else</font> {
00307         sgSetVec3( outer_param, 0.0, 0.0, 0.0 );
00308         sgSetVec3( middle_param, 0.0, 0.0, 0.0 );
00309 
00310         sgSetVec3( outer_diff, 0.0, 0.0, 0.0 );
00311         sgSetVec3( middle_diff, 0.0, 0.0, 0.0 );
00312     }
00313     <font class="comment">// printf("  outer_red_param = %.2f  outer_red_diff = %.2f\n", </font>
00314     <font class="comment">//        outer_red_param, outer_red_diff);</font>
00315 
00316     <font class="comment">// calculate transition colors between sky and fog</font>
00317     sgCopyVec3( outer_amt, outer_param );
00318     sgCopyVec3( middle_amt, middle_param );
00319 
00320     <font class="comment">//</font>
00321     <font class="comment">// First, recalulate the basic colors</font>
00322     <font class="comment">//</font>
00323 
00324     sgVec4 center_color;
00325     sgVec4 upper_color[12];
00326     sgVec4 middle_color[12];
00327     sgVec4 lower_color[12];
00328     sgVec4 bottom_color[12];
00329 
00330     <font class="keywordtype">double</font> vis_factor;
00331 
00332     <font class="keywordflow">if</font> ( vis &lt; 3000.0 ) {
00333         vis_factor = (vis - 1000.0) / 2000.0;
00334         <font class="keywordflow">if</font> ( vis_factor &lt; 0.0 ) {
00335             vis_factor = 0.0;
00336         }
00337     } <font class="keywordflow">else</font> {
00338         vis_factor = 1.0;
00339     }
00340 
00341     <font class="keywordflow">for</font> ( j = 0; j &lt; 3; j++ ) {
00342         diff = sky_color[j] - fog_color[j];
00343         center_color[j] = sky_color[j] - diff * ( 1.0 - vis_factor );
00344     }
00345     center_color[3] = 1.0;
00346 
00347     <font class="keywordflow">for</font> ( i = 0; i &lt; 6; i++ ) {
00348         <font class="keywordflow">for</font> ( j = 0; j &lt; 3; j++ ) {
00349             diff = sky_color[j] - fog_color[j];
00350 
00351             <font class="comment">// printf("sky = %.2f  fog = %.2f  diff = %.2f\n", </font>
00352             <font class="comment">//        l-&gt;sky_color[j], l-&gt;fog_color[j], diff);</font>
00353 
00354             upper_color[i][j] = sky_color[j] - diff * ( 1.0 - vis_factor * 0.7);
00355             middle_color[i][j] = sky_color[j] - diff * ( 1.0 - vis_factor * 0.1)
00356                 + middle_amt[j];
00357             lower_color[i][j] = fog_color[j] + outer_amt[j];
00358 
00359             <font class="keywordflow">if</font> ( upper_color[i][j] &gt; 1.0 ) { upper_color[i][j] = 1.0; }
00360             <font class="keywordflow">if</font> ( upper_color[i][j] &lt; 0.0 ) { upper_color[i][j] = 0.0; }
00361             <font class="keywordflow">if</font> ( middle_color[i][j] &gt; 1.0 ) { middle_color[i][j] = 1.0; }
00362             <font class="keywordflow">if</font> ( middle_color[i][j] &lt; 0.0 ) { middle_color[i][j] = 0.0; }
00363             <font class="keywordflow">if</font> ( lower_color[i][j] &gt; 1.0 ) { lower_color[i][j] = 1.0; }
00364             <font class="keywordflow">if</font> ( lower_color[i][j] &lt; 0.0 ) { lower_color[i][j] = 0.0; }
00365         }
00366         upper_color[i][3] = middle_color[i][3] = lower_color[i][3] = 1.0;
00367 
00368         <font class="keywordflow">for</font> ( j = 0; j &lt; 3; j++ ) {
00369             outer_amt[j] -= outer_diff[j];
00370             middle_amt[j] -= middle_diff[j];
00371         }
00372 
00373         <font class="comment">/*</font>
00374 <font class="comment">        printf("upper_color[%d] = %.2f %.2f %.2f %.2f\n", i, upper_color[i][0],</font>
00375 <font class="comment">               upper_color[i][1], upper_color[i][2], upper_color[i][3]);</font>
00376 <font class="comment">        printf("middle_color[%d] = %.2f %.2f %.2f %.2f\n", i, </font>
00377 <font class="comment">               middle_color[i][0], middle_color[i][1], middle_color[i][2], </font>
00378 <font class="comment">               middle_color[i][3]);</font>
00379 <font class="comment">        printf("lower_color[%d] = %.2f %.2f %.2f %.2f\n", i, </font>
00380 <font class="comment">               lower_color[i][0], lower_color[i][1], lower_color[i][2], </font>
00381 <font class="comment">               lower_color[i][3]);</font>
00382 <font class="comment">        */</font>
00383     }
00384 
00385     sgSetVec3( outer_amt, 0.0, 0.0, 0.0 );
00386     sgSetVec3( middle_amt, 0.0, 0.0, 0.0 );
00387 
00388     <font class="keywordflow">for</font> ( i = 6; i &lt; 12; i++ ) {
00389         <font class="keywordflow">for</font> ( j = 0; j &lt; 3; j++ ) {
00390             diff = sky_color[j] - fog_color[j];
00391 
00392             <font class="comment">// printf("sky = %.2f  fog = %.2f  diff = %.2f\n", </font>
00393             <font class="comment">//        sky_color[j], fog_color[j], diff);</font>
00394 
00395             upper_color[i][j] = sky_color[j] - diff * ( 1.0 - vis_factor * 0.7);
00396             middle_color[i][j] = sky_color[j] - diff * ( 1.0 - vis_factor * 0.1)
00397                 + middle_amt[j];
00398             lower_color[i][j] = fog_color[j] + outer_amt[j];
00399 
00400             <font class="keywordflow">if</font> ( upper_color[i][j] &gt; 1.0 ) { upper_color[i][j] = 1.0; }
00401             <font class="keywordflow">if</font> ( upper_color[i][j] &lt; 0.0 ) { upper_color[i][j] = 0.0; }
00402             <font class="keywordflow">if</font> ( middle_color[i][j] &gt; 1.0 ) { middle_color[i][j] = 1.0; }
00403             <font class="keywordflow">if</font> ( middle_color[i][j] &lt; 0.0 ) { middle_color[i][j] = 0.0; }
00404             <font class="keywordflow">if</font> ( lower_color[i][j] &gt; 1.0 ) { lower_color[i][j] = 1.0; }
00405             <font class="keywordflow">if</font> ( lower_color[i][j] &lt; 0.0 ) { lower_color[i][j] = 0.0; }
00406         }
00407         upper_color[i][3] = middle_color[i][3] = lower_color[i][3] = 1.0;
00408 
00409         <font class="keywordflow">for</font> ( j = 0; j &lt; 3; j++ ) {
00410             outer_amt[j] += outer_diff[j];
00411             middle_amt[j] += middle_diff[j];
00412         }
00413 
00414         <font class="comment">/*</font>
00415 <font class="comment">        printf("upper_color[%d] = %.2f %.2f %.2f %.2f\n", i, upper_color[i][0],</font>
00416 <font class="comment">               upper_color[i][1], upper_color[i][2], upper_color[i][3]);</font>
00417 <font class="comment">        printf("middle_color[%d] = %.2f %.2f %.2f %.2f\n", i, </font>
00418 <font class="comment">               middle_color[i][0], middle_color[i][1], middle_color[i][2], </font>
00419 <font class="comment">               middle_color[i][3]);</font>
00420 <font class="comment">        printf("lower_color[%d] = %.2f %.2f %.2f %.2f\n", i, </font>
00421 <font class="comment">               lower_color[i][0], lower_color[i][1], lower_color[i][2], </font>
00422 <font class="comment">               lower_color[i][3]);</font>
00423 <font class="comment">        */</font>
00424    }
00425 
00426     <font class="keywordflow">for</font> ( i = 0; i &lt; 12; i++ ) {
00427         sgCopyVec4( bottom_color[i], fog_color );
00428     }
00429 
00430     <font class="comment">//</font>
00431     <font class="comment">// Second, assign the basic colors to the object color arrays</font>
00432     <font class="comment">//</font>
00433 
00434     <font class="keywordtype">float</font> *slot;
00435     <font class="keywordtype">int</font> counter;
00436 
00437     <font class="comment">// update the center disk color arrays</font>
00438     counter = 0;
00439     slot = center_disk_cl-&gt;get( counter++ );
00440     <font class="comment">// sgVec4 red;</font>
00441     <font class="comment">// sgSetVec4( red, 1.0, 0.0, 0.0, 1.0 );</font>
00442     sgCopyVec4( slot, center_color );
00443     <font class="keywordflow">for</font> ( i = 11; i &gt;= 0; i-- ) {
00444         slot = center_disk_cl-&gt;get( counter++ );
00445         sgCopyVec4( slot, upper_color[i] );
00446     }
00447     slot = center_disk_cl-&gt;get( counter++ );
00448     sgCopyVec4( slot, upper_color[11] );
00449 
00450     <font class="comment">// generate the upper ring</font>
00451     counter = 0;
00452     <font class="keywordflow">for</font> ( i = 0; i &lt; 12; i++ ) {
00453         slot = upper_ring_cl-&gt;get( counter++ );
00454         sgCopyVec4( slot, middle_color[i] );
00455 
00456         slot = upper_ring_cl-&gt;get( counter++ );
00457         sgCopyVec4( slot, upper_color[i] );
00458     }
00459     slot = upper_ring_cl-&gt;get( counter++ );
00460     sgCopyVec4( slot, middle_color[0] );
00461 
00462     slot = upper_ring_cl-&gt;get( counter++ );
00463     sgCopyVec4( slot, upper_color[0] );
00464 
00465     <font class="comment">// generate middle ring</font>
00466     counter = 0;
00467     <font class="keywordflow">for</font> ( i = 0; i &lt; 12; i++ ) {
00468         slot = middle_ring_cl-&gt;get( counter++ );
00469         sgCopyVec4( slot, lower_color[i] );
00470 
00471         slot = middle_ring_cl-&gt;get( counter++ );
00472         sgCopyVec4( slot, middle_color[i] );
00473     }
00474     slot = middle_ring_cl-&gt;get( counter++ );
00475     sgCopyVec4( slot, lower_color[0] );
00476 
00477     slot = middle_ring_cl-&gt;get( counter++ );
00478     sgCopyVec4( slot, middle_color[0] );
00479 
00480     <font class="comment">// generate lower ring</font>
00481     counter = 0;
00482     <font class="keywordflow">for</font> ( i = 0; i &lt; 12; i++ ) {
00483         slot = lower_ring_cl-&gt;get( counter++ );
00484         sgCopyVec4( slot, bottom_color[i] );
00485 
00486         slot = lower_ring_cl-&gt;get( counter++ );
00487         sgCopyVec4( slot, lower_color[i] );
00488     }
00489     slot = lower_ring_cl-&gt;get( counter++ );
00490     sgCopyVec4( slot, bottom_color[0] );
00491 
00492     slot = lower_ring_cl-&gt;get( counter++ );
00493     sgCopyVec4( slot, lower_color[0] );
00494 
00495     <font class="keywordflow">return</font> <font class="keyword">true</font>;
00496 }
00497 
00498 
00499 <font class="comment">// reposition the sky at the specified origin and orientation</font>
00500 <font class="comment">// lon specifies a rotation about the Z axis</font>
00501 <font class="comment">// lat specifies a rotation about the new Y axis</font>
00502 <font class="comment">// spin specifies a rotation about the new Z axis (and orients the</font>
00503 <font class="comment">// sunrise/set effects</font>
00504 <font class="keywordtype">bool</font> SGSkyDome::reposition( sgVec3 p, <font class="keywordtype">double</font> lon, <font class="keywordtype">double</font> lat, <font class="keywordtype">double</font> spin ) {
00505     sgMat4 T, LON, LAT, SPIN;
00506     sgVec3 axis;
00507 
00508     <font class="comment">// Translate to view position</font>
00509     <font class="comment">// Point3D zero_elev = current_view.get_cur_zero_elev();</font>
00510     <font class="comment">// xglTranslatef( zero_elev.x(), zero_elev.y(), zero_elev.z() );</font>
00511     sgMakeTransMat4( T, p );
00512 
00513     <font class="comment">// printf("  Translated to %.2f %.2f %.2f\n", </font>
00514     <font class="comment">//        zero_elev.x, zero_elev.y, zero_elev.z );</font>
00515 
00516     <font class="comment">// Rotate to proper orientation</font>
00517     <font class="comment">// printf("  lon = %.2f  lat = %.2f\n",</font>
00518     <font class="comment">//        lon * SGD_RADIANS_TO_DEGREES,</font>
00519     <font class="comment">//        lat * SGD_RADIANS_TO_DEGREES);</font>
00520     <font class="comment">// xglRotatef( lon * SGD_RADIANS_TO_DEGREES, 0.0, 0.0, 1.0 );</font>
00521     sgSetVec3( axis, 0.0, 0.0, 1.0 );
00522     sgMakeRotMat4( LON, lon * SGD_RADIANS_TO_DEGREES, axis );
00523 
00524     <font class="comment">// xglRotatef( 90.0 - f-&gt;get_Latitude() * SGD_RADIANS_TO_DEGREES,</font>
00525     <font class="comment">//             0.0, 1.0, 0.0 );</font>
00526     sgSetVec3( axis, 0.0, 1.0, 0.0 );
00527     sgMakeRotMat4( LAT, 90.0 - lat * SGD_RADIANS_TO_DEGREES, axis );
00528 
00529     <font class="comment">// xglRotatef( l-&gt;sun_rotation * SGD_RADIANS_TO_DEGREES, 0.0, 0.0, 1.0 );</font>
00530     sgSetVec3( axis, 0.0, 0.0, 1.0 );
00531     sgMakeRotMat4( SPIN, spin * SGD_RADIANS_TO_DEGREES, axis );
00532 
00533     sgMat4 TRANSFORM;
00534 
00535     sgCopyMat4( TRANSFORM, T );
00536     sgPreMultMat4( TRANSFORM, LON );
00537     sgPreMultMat4( TRANSFORM, LAT );
00538     sgPreMultMat4( TRANSFORM, SPIN );
00539 
00540     sgCoord skypos;
00541     sgSetCoord( &amp;skypos, TRANSFORM );
00542 
00543     dome_transform-&gt;setTransform( &amp;skypos );
00544 
00545     <font class="keywordflow">return</font> <font class="keyword">true</font>;
00546 }
</pre></div><hr><address align="right"><small>Generated on Fri Sep 6 20:46:34 2002 for SimGear by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.16 </small></address>
</body>
</html>
@


1.3
log
@Oops, try again.
@
text
@d555 1
a555 1
</pre></div><hr><address align="right"><small>Generated on Sat Aug 31 13:59:38 2002 for SimGear by
@


1.2
log
@Regenerated doxygen files.
@
text
@d555 1
a555 1
</pre></div><hr><address align="right"><small>Generated on Sat Aug 31 13:45:08 2002 for SimGear by
@


1.1
log
@More web page updates (added doxygen docs to repository.)
@
text
@d5 2
a6 2
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 1.2.12 -->
d31 1
a31 1
00023 <font class="comment">// $Id: dome.cxx,v 1.11 2001/05/15 19:26:24 curt Exp $</font>
d60 14
a73 14
00052 <font class="preprocessor">#define CENTER_ELEV   25000.0</font>
00053 <font class="preprocessor"></font>
00054 <font class="preprocessor">#define UPPER_RADIUS  50000.0</font>
00055 <font class="preprocessor"></font><font class="preprocessor">#define UPPER_ELEV    20000.0</font>
00056 <font class="preprocessor"></font>
00057 <font class="preprocessor">#define MIDDLE_RADIUS 70000.0</font>
00058 <font class="preprocessor"></font><font class="preprocessor">#define MIDDLE_ELEV    8000.0</font>
00059 <font class="preprocessor"></font>
00060 <font class="preprocessor">#define LOWER_RADIUS  80000.0</font>
00061 <font class="preprocessor"></font><font class="preprocessor">#define LOWER_ELEV        0.0</font>
00062 <font class="preprocessor"></font>
00063 <font class="preprocessor">#define BOTTOM_RADIUS 50000.0</font>
00064 <font class="preprocessor"></font><font class="preprocessor">#define BOTTOM_ELEV   -2000.0</font>
00065 <font class="preprocessor"></font>
d114 1
a114 1
00106 ssgBranch * SGSkyDome::build( ) {
d156 1
a156 1
00148     sgSetVec3( center_vertex, 0.0, 0.0, CENTER_ELEV );
d162 3
a164 3
00154                    cos(theta) * UPPER_RADIUS,
00155                    sin(theta) * UPPER_RADIUS,
00156                    UPPER_ELEV );
d167 3
a169 3
00159                    cos((<font class="keywordtype">double</font>)theta) * MIDDLE_RADIUS,
00160                    sin((<font class="keywordtype">double</font>)theta) * MIDDLE_RADIUS,
00161                    MIDDLE_ELEV );
d172 3
a174 3
00164                    cos((<font class="keywordtype">double</font>)theta) * LOWER_RADIUS,
00165                    sin((<font class="keywordtype">double</font>)theta) * LOWER_RADIUS,
00166                    LOWER_ELEV );
d177 3
a179 3
00169                    cos((<font class="keywordtype">double</font>)theta) * BOTTOM_RADIUS,
00170                    sin((<font class="keywordtype">double</font>)theta) * BOTTOM_RADIUS,
00171                    BOTTOM_ELEV );
d235 2
a236 2
00227     sgVec3 fog_color;
00228     sgSetVec3( fog_color, 1.0, 1.0, 1.0 );
d353 152
a504 152
00345 
00346     <font class="keywordflow">for</font> ( i = 0; i &lt; 6; i++ ) {
00347         <font class="keywordflow">for</font> ( j = 0; j &lt; 3; j++ ) {
00348             diff = sky_color[j] - fog_color[j];
00349 
00350             <font class="comment">// printf("sky = %.2f  fog = %.2f  diff = %.2f\n", </font>
00351             <font class="comment">//        l-&gt;sky_color[j], l-&gt;fog_color[j], diff);</font>
00352 
00353             upper_color[i][j] = sky_color[j] - diff * ( 1.0 - vis_factor * 0.7);
00354             middle_color[i][j] = sky_color[j] - diff * ( 1.0 - vis_factor * 0.1)
00355                 + middle_amt[j];
00356             lower_color[i][j] = fog_color[j] + outer_amt[j];
00357 
00358             <font class="keywordflow">if</font> ( upper_color[i][j] &gt; 1.0 ) { upper_color[i][j] = 1.0; }
00359             <font class="keywordflow">if</font> ( upper_color[i][j] &lt; 0.0 ) { upper_color[i][j] = 0.0; }
00360             <font class="keywordflow">if</font> ( middle_color[i][j] &gt; 1.0 ) { middle_color[i][j] = 1.0; }
00361             <font class="keywordflow">if</font> ( middle_color[i][j] &lt; 0.0 ) { middle_color[i][j] = 0.0; }
00362             <font class="keywordflow">if</font> ( lower_color[i][j] &gt; 1.0 ) { lower_color[i][j] = 1.0; }
00363             <font class="keywordflow">if</font> ( lower_color[i][j] &lt; 0.0 ) { lower_color[i][j] = 0.0; }
00364         }
00365         upper_color[i][3] = middle_color[i][3] = lower_color[i][3] = 1.0;
00366 
00367         <font class="keywordflow">for</font> ( j = 0; j &lt; 3; j++ ) {
00368             outer_amt[j] -= outer_diff[j];
00369             middle_amt[j] -= middle_diff[j];
00370         }
00371 
00372         <font class="comment">/*</font>
00373 <font class="comment">        printf("upper_color[%d] = %.2f %.2f %.2f %.2f\n", i, upper_color[i][0],</font>
00374 <font class="comment">               upper_color[i][1], upper_color[i][2], upper_color[i][3]);</font>
00375 <font class="comment">        printf("middle_color[%d] = %.2f %.2f %.2f %.2f\n", i, </font>
00376 <font class="comment">               middle_color[i][0], middle_color[i][1], middle_color[i][2], </font>
00377 <font class="comment">               middle_color[i][3]);</font>
00378 <font class="comment">        printf("lower_color[%d] = %.2f %.2f %.2f %.2f\n", i, </font>
00379 <font class="comment">               lower_color[i][0], lower_color[i][1], lower_color[i][2], </font>
00380 <font class="comment">               lower_color[i][3]);</font>
00381 <font class="comment">        */</font>
00382     }
00383 
00384     sgSetVec3( outer_amt, 0.0, 0.0, 0.0 );
00385     sgSetVec3( middle_amt, 0.0, 0.0, 0.0 );
00386 
00387     <font class="keywordflow">for</font> ( i = 6; i &lt; 12; i++ ) {
00388         <font class="keywordflow">for</font> ( j = 0; j &lt; 3; j++ ) {
00389             diff = sky_color[j] - fog_color[j];
00390 
00391             <font class="comment">// printf("sky = %.2f  fog = %.2f  diff = %.2f\n", </font>
00392             <font class="comment">//        sky_color[j], fog_color[j], diff);</font>
00393 
00394             upper_color[i][j] = sky_color[j] - diff * ( 1.0 - vis_factor * 0.7);
00395             middle_color[i][j] = sky_color[j] - diff * ( 1.0 - vis_factor * 0.1)
00396                 + middle_amt[j];
00397             lower_color[i][j] = fog_color[j] + outer_amt[j];
00398 
00399             <font class="keywordflow">if</font> ( upper_color[i][j] &gt; 1.0 ) { upper_color[i][j] = 1.0; }
00400             <font class="keywordflow">if</font> ( upper_color[i][j] &lt; 0.0 ) { upper_color[i][j] = 0.0; }
00401             <font class="keywordflow">if</font> ( middle_color[i][j] &gt; 1.0 ) { middle_color[i][j] = 1.0; }
00402             <font class="keywordflow">if</font> ( middle_color[i][j] &lt; 0.0 ) { middle_color[i][j] = 0.0; }
00403             <font class="keywordflow">if</font> ( lower_color[i][j] &gt; 1.0 ) { lower_color[i][j] = 1.0; }
00404             <font class="keywordflow">if</font> ( lower_color[i][j] &lt; 0.0 ) { lower_color[i][j] = 0.0; }
00405         }
00406         upper_color[i][3] = middle_color[i][3] = lower_color[i][3] = 1.0;
00407 
00408         <font class="keywordflow">for</font> ( j = 0; j &lt; 3; j++ ) {
00409             outer_amt[j] += outer_diff[j];
00410             middle_amt[j] += middle_diff[j];
00411         }
00412 
00413         <font class="comment">/*</font>
00414 <font class="comment">        printf("upper_color[%d] = %.2f %.2f %.2f %.2f\n", i, upper_color[i][0],</font>
00415 <font class="comment">               upper_color[i][1], upper_color[i][2], upper_color[i][3]);</font>
00416 <font class="comment">        printf("middle_color[%d] = %.2f %.2f %.2f %.2f\n", i, </font>
00417 <font class="comment">               middle_color[i][0], middle_color[i][1], middle_color[i][2], </font>
00418 <font class="comment">               middle_color[i][3]);</font>
00419 <font class="comment">        printf("lower_color[%d] = %.2f %.2f %.2f %.2f\n", i, </font>
00420 <font class="comment">               lower_color[i][0], lower_color[i][1], lower_color[i][2], </font>
00421 <font class="comment">               lower_color[i][3]);</font>
00422 <font class="comment">        */</font>
00423    }
00424 
00425     <font class="keywordflow">for</font> ( i = 0; i &lt; 12; i++ ) {
00426         sgCopyVec4( bottom_color[i], fog_color );
00427     }
00428 
00429     <font class="comment">//</font>
00430     <font class="comment">// Second, assign the basic colors to the object color arrays</font>
00431     <font class="comment">//</font>
00432 
00433     <font class="keywordtype">float</font> *slot;
00434     <font class="keywordtype">int</font> counter;
00435 
00436     <font class="comment">// update the center disk color arrays</font>
00437     counter = 0;
00438     slot = center_disk_cl-&gt;get( counter++ );
00439     <font class="comment">// sgVec4 red;</font>
00440     <font class="comment">// sgSetVec4( red, 1.0, 0.0, 0.0, 1.0 );</font>
00441     sgCopyVec4( slot, center_color );
00442     <font class="keywordflow">for</font> ( i = 11; i &gt;= 0; i-- ) {
00443         slot = center_disk_cl-&gt;get( counter++ );
00444         sgCopyVec4( slot, upper_color[i] );
00445     }
00446     slot = center_disk_cl-&gt;get( counter++ );
00447     sgCopyVec4( slot, upper_color[11] );
00448 
00449     <font class="comment">// generate the upper ring</font>
00450     counter = 0;
00451     <font class="keywordflow">for</font> ( i = 0; i &lt; 12; i++ ) {
00452         slot = upper_ring_cl-&gt;get( counter++ );
00453         sgCopyVec4( slot, middle_color[i] );
00454 
00455         slot = upper_ring_cl-&gt;get( counter++ );
00456         sgCopyVec4( slot, upper_color[i] );
00457     }
00458     slot = upper_ring_cl-&gt;get( counter++ );
00459     sgCopyVec4( slot, middle_color[0] );
00460 
00461     slot = upper_ring_cl-&gt;get( counter++ );
00462     sgCopyVec4( slot, upper_color[0] );
00463 
00464     <font class="comment">// generate middle ring</font>
00465     counter = 0;
00466     <font class="keywordflow">for</font> ( i = 0; i &lt; 12; i++ ) {
00467         slot = middle_ring_cl-&gt;get( counter++ );
00468         sgCopyVec4( slot, lower_color[i] );
00469 
00470         slot = middle_ring_cl-&gt;get( counter++ );
00471         sgCopyVec4( slot, middle_color[i] );
00472     }
00473     slot = middle_ring_cl-&gt;get( counter++ );
00474     sgCopyVec4( slot, lower_color[0] );
00475 
00476     slot = middle_ring_cl-&gt;get( counter++ );
00477     sgCopyVec4( slot, middle_color[0] );
00478 
00479     <font class="comment">// generate lower ring</font>
00480     counter = 0;
00481     <font class="keywordflow">for</font> ( i = 0; i &lt; 12; i++ ) {
00482         slot = lower_ring_cl-&gt;get( counter++ );
00483         sgCopyVec4( slot, bottom_color[i] );
00484 
00485         slot = lower_ring_cl-&gt;get( counter++ );
00486         sgCopyVec4( slot, lower_color[i] );
00487     }
00488     slot = lower_ring_cl-&gt;get( counter++ );
00489     sgCopyVec4( slot, bottom_color[0] );
00490 
00491     slot = lower_ring_cl-&gt;get( counter++ );
00492     sgCopyVec4( slot, lower_color[0] );
00493 
00494     <font class="keywordflow">return</font> <font class="keyword">true</font>;
00495 }
00496 
d506 50
a555 49
00498 <font class="comment">// reposition the sky at the specified origin and orientation</font>
00499 <font class="comment">// lon specifies a rotation about the Z axis</font>
00500 <font class="comment">// lat specifies a rotation about the new Y axis</font>
00501 <font class="comment">// spin specifies a rotation about the new Z axis (and orients the</font>
00502 <font class="comment">// sunrise/set effects</font>
00503 <font class="keywordtype">bool</font> SGSkyDome::reposition( sgVec3 p, <font class="keywordtype">double</font> lon, <font class="keywordtype">double</font> lat, <font class="keywordtype">double</font> spin ) {
00504     sgMat4 T, LON, LAT, SPIN;
00505     sgVec3 axis;
00506 
00507     <font class="comment">// Translate to view position</font>
00508     <font class="comment">// Point3D zero_elev = current_view.get_cur_zero_elev();</font>
00509     <font class="comment">// xglTranslatef( zero_elev.x(), zero_elev.y(), zero_elev.z() );</font>
00510     sgMakeTransMat4( T, p );
00511 
00512     <font class="comment">// printf("  Translated to %.2f %.2f %.2f\n", </font>
00513     <font class="comment">//        zero_elev.x, zero_elev.y, zero_elev.z );</font>
00514 
00515     <font class="comment">// Rotate to proper orientation</font>
00516     <font class="comment">// printf("  lon = %.2f  lat = %.2f\n",</font>
00517     <font class="comment">//        lon * SGD_RADIANS_TO_DEGREES,</font>
00518     <font class="comment">//        lat * SGD_RADIANS_TO_DEGREES);</font>
00519     <font class="comment">// xglRotatef( lon * SGD_RADIANS_TO_DEGREES, 0.0, 0.0, 1.0 );</font>
00520     sgSetVec3( axis, 0.0, 0.0, 1.0 );
00521     sgMakeRotMat4( LON, lon * SGD_RADIANS_TO_DEGREES, axis );
00522 
00523     <font class="comment">// xglRotatef( 90.0 - f-&gt;get_Latitude() * SGD_RADIANS_TO_DEGREES,</font>
00524     <font class="comment">//             0.0, 1.0, 0.0 );</font>
00525     sgSetVec3( axis, 0.0, 1.0, 0.0 );
00526     sgMakeRotMat4( LAT, 90.0 - lat * SGD_RADIANS_TO_DEGREES, axis );
00527 
00528     <font class="comment">// xglRotatef( l-&gt;sun_rotation * SGD_RADIANS_TO_DEGREES, 0.0, 0.0, 1.0 );</font>
00529     sgSetVec3( axis, 0.0, 0.0, 1.0 );
00530     sgMakeRotMat4( SPIN, spin * SGD_RADIANS_TO_DEGREES, axis );
00531 
00532     sgMat4 TRANSFORM;
00533 
00534     sgCopyMat4( TRANSFORM, T );
00535     sgPreMultMat4( TRANSFORM, LON );
00536     sgPreMultMat4( TRANSFORM, LAT );
00537     sgPreMultMat4( TRANSFORM, SPIN );
00538 
00539     sgCoord skypos;
00540     sgSetCoord( &amp;skypos, TRANSFORM );
00541 
00542     dome_transform-&gt;setTransform( &amp;skypos );
00543 
00544     <font class="keywordflow">return</font> <font class="keyword">true</font>;
00545 }
</pre></div><hr><address><small>Generated on Fri Feb 15 11:15:30 2002 for SimGear by
d557 2
a558 3
<img src="doxygen.gif" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.12 written by <a href="mailto:dimitri@@stack.nl">Dimitri van Heesch</a>,
 &copy;&nbsp;1997-2001</small></address>
@

