1 // moon.hxx -- model earth's moon
3 // Written by Durk Talsma. Originally started October 1997, for distribution
4 // with the FlightGear project. Version 2 was written in August and
5 // September 1998. This code is based upon algorithms and data kindly
6 // provided by Mr. Paul Schlyter. (pausch@saaf.se).
8 // Separated out rendering pieces and converted to ssg by Curt Olson,
11 // This program is free software; you can redistribute it and/or
12 // modify it under the terms of the GNU General Public License as
13 // published by the Free Software Foundation; either version 2 of the
14 // License, or (at your option) any later version.
16 // This program is distributed in the hope that it will be useful, but
17 // WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 // General Public License for more details.
21 // You should have received a copy of the GNU General Public License
22 // along with this program; if not, write to the Free Software
23 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
34 #include <simgear/misc/fgpath.hxx>
39 ssgTransform *moon_transform;
40 ssgSimpleState *orb_state;
41 ssgSimpleState *halo_state;
45 ssgVertexArray *halo_vl;
46 ssgTexCoordArray *halo_tl;
56 // build the moon object
57 ssgBranch *build( FGPath path, double moon_size );
59 // repaint the moon colors based on current value of moon_anglein
60 // degrees relative to verticle
61 // 0 degrees = high noon
62 // 90 degrees = moon rise/set
63 // 180 degrees = darkest midnight
64 bool repaint( double moon_angle );
66 // reposition the moon at the specified right ascension and
67 // declination, offset by our current position (p) so that it
68 // appears fixed at a great distance from the viewer. Also add in
69 // an optional rotation (i.e. for the current time of day.)
70 bool reposition( sgVec3 p, double angle,
71 double rightAscension, double declination,
76 #endif // _SG_MOON_HXX_