head 1.4; access; symbols; locks; strict; comment @# @; 1.4 date 2002.09.07.01.50.39; author curt; state Exp; branches; next 1.3; 1.3 date 2002.08.31.19.01.55; author curt; state Exp; branches; next 1.2; 1.2 date 2002.08.31.18.54.02; author curt; state Exp; branches; next 1.1; 1.1 date 2002.02.15.17.21.58; 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

# oursun.hxx

    00001 // oursun.hxx -- model earth's sun
    00002 //
    00003 // Written by Durk Talsma. Originally started October 1997, for distribution
    00004 // with the FlightGear project. Version 2 was written in August and
    00005 // September 1998. This code is based upon algorithms and data kindly
    00006 // provided by Mr. Paul Schlyter. (pausch@@saaf.se).
    00007 //
    00008 // Separated out rendering pieces and converted to ssg by Curt Olson,
    00009 // March 2000
    00010 //
    00011 // This library is free software; you can redistribute it and/or
    00012 // modify it under the terms of the GNU Library General Public
    00013 // License as published by the Free Software Foundation; either
    00014 // version 2 of the License, or (at your option) any later version.
    00015 //
    00016 // This library is distributed in the hope that it will be useful,
    00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00019 // Library General Public License for more details.
    00020 //
    00021 // You should have received a copy of the GNU Library General Public
    00022 // License along with this library; if not, write to the
    00023 // Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00024 // Boston, MA  02111-1307, USA.
    00025 //
    00026 // $Id: oursun.hxx,v 1.3 2001/03/25 12:06:10 curt Exp $
    00027
    00028
    00029 #ifndef _SG_SUN_HXX_
    00030 #define _SG_SUN_HXX_
    00031
    00032
    00033 #include <plib/ssg.h>
    00034
    00035 #include <simgear/misc/sg_path.hxx>
    00036
    00037
    00038 class SGSun {
    00039
    00040     ssgTransform *sun_transform;
    00041     ssgSimpleState *orb_state;
    00042     ssgSimpleState *halo_state;
    00043
    00044     ssgColourArray *cl;
    00045
    00046     ssgVertexArray *halo_vl;
    00047     ssgTexCoordArray *halo_tl;
    00048
    00049     GLuint sun_texid;
    00050     GLubyte *sun_texbuf;
    00051
    00052 public:
    00053
    00054     // Constructor
    00055     SGSun( void );
    00056
    00057     // Destructor
    00058     ~SGSun( void );
    00059
    00060     // return the sun object
    00061     ssgBranch *build( SGPath path, double sun_size );
    00062
    00063     // repaint the sun colors based on current value of sun_anglein
    00064     // degrees relative to verticle
    00065     // 0 degrees = high noon
    00066     // 90 degrees = sun rise/set
    00067     // 180 degrees = darkest midnight
    00068     bool repaint( double sun_angle );
    00069
    00070     // reposition the sun at the specified right ascension and
    00071     // declination, offset by our current position (p) so that it
    00072     // appears fixed at a great distance from the viewer.  Also add in
    00073     // an optional rotation (i.e. for the current time of day.)
    00074     bool reposition( sgVec3 p, double angle,
    00075                      double rightAscension, double declination,
    00076                      double sun_dist );
    00077 };
    00078
    00079
    00080 #endif // _SG_SUN_HXX_

@ 1.3 log @Oops, try again. @ text @d89 1 a89 1