head 1.4; access; symbols; locks; strict; comment @# @; 1.4 date 2002.09.07.01.50.38; 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.56; author curt; state Exp; branches; next ; desc @@ 1.4 log @Updated doxygen docs. @ text @
Main Page Class Hierarchy Compound List File List Compound Members File Members

# dome.hxx

    00001 // dome.hxx -- model sky with an upside down "bowl"
    00002 //
    00003 // Written by Curtis Olson, started December 1997.
    00004 // SSG-ified by Curtis Olson, February 2000.
    00005 //
    00006 // Copyright (C) 1997-2000  Curtis L. Olson  - curt@@flightgear.org
    00007 //
    00008 // This library is free software; you can redistribute it and/or
    00009 // modify it under the terms of the GNU Library General Public
    00010 // License as published by the Free Software Foundation; either
    00011 // version 2 of the License, or (at your option) any later version.
    00012 //
    00013 // This library is distributed in the hope that it will be useful,
    00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00016 // Library General Public License for more details.
    00017 //
    00018 // You should have received a copy of the GNU Library General Public
    00019 // License along with this library; if not, write to the
    00020 // Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00021 // Boston, MA  02111-1307, USA.
    00022 //
    00023 // $Id: dome.hxx,v 1.4 2002/04/27 03:19:46 curt Exp $
    00024
    00025
    00026 #ifndef _SKYDOME_HXX
    00027 #define _SKYDOME_HXX
    00028
    00029
    00030 #ifndef __cplusplus
    00031 # error This library requires C++
    00032 #endif
    00033
    00034
    00035 #include <plib/ssg.h>           // plib include
    00036
    00037
    00038 class SGSkyDome {
    00039     ssgTransform *dome_transform;
    00040     ssgSimpleState *dome_state;
    00041
    00042     ssgVertexArray *center_disk_vl;
    00043     ssgColourArray *center_disk_cl;
    00044
    00045     ssgVertexArray *upper_ring_vl;
    00046     ssgColourArray *upper_ring_cl;
    00047
    00048     ssgVertexArray *middle_ring_vl;
    00049     ssgColourArray *middle_ring_cl;
    00050
    00051     ssgVertexArray *lower_ring_vl;
    00052     ssgColourArray *lower_ring_cl;
    00053
    00054 public:
    00055
    00056     // Constructor
    00057     SGSkyDome( void );
    00058
    00059     // Destructor
    00060     ~SGSkyDome( void );
    00061
    00062     // initialize the sky object and connect it into our scene graph
    00063     // root
    00064     ssgBranch *build( double hscale = 80000.0, double vscale = 80000.0 );
    00065
    00066     // repaint the sky colors based on current value of sun_angle,
    00067     // sky, and fog colors.  This updates the color arrays for
    00068     // ssgVtxTable.
    00069     // sun angle in degrees relative to verticle
    00070     // 0 degrees = high noon
    00071     // 90 degrees = sun rise/set
    00072     // 180 degrees = darkest midnight
    00073     bool repaint( sgVec3 sky_color, sgVec3 fog_color, double sun_angle,
    00074                   double vis );
    00075
    00076     // reposition the sky at the specified origin and orientation
    00077     // lon specifies a rotation about the Z axis
    00078     // lat specifies a rotation about the new Y axis
    00079     // spin specifies a rotation about the new Z axis (and orients the
    00080     // sunrise/set effects
    00081     bool reposition( sgVec3 p, double lon, double lat, double spin );
    00082 };
    00083
    00084
    00085 #endif // _SKYDOME_HXX

@ 1.3 log @Oops, try again. @ text @d94 1 a94 1