plib-cvs Mailing List for PLIB (Page 18)
Brought to you by:
sjbaker
You can subscribe to this list here.
2002 |
Jan
(25) |
Feb
(10) |
Mar
(60) |
Apr
(49) |
May
(54) |
Jun
(94) |
Jul
(82) |
Aug
(251) |
Sep
(366) |
Oct
(17) |
Nov
(20) |
Dec
(14) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(12) |
Feb
(8) |
Mar
(2) |
Apr
(4) |
May
(5) |
Jun
(8) |
Jul
(23) |
Aug
(8) |
Sep
(7) |
Oct
(5) |
Nov
(20) |
Dec
(20) |
2004 |
Jan
(19) |
Feb
(70) |
Mar
(108) |
Apr
(24) |
May
(6) |
Jun
(5) |
Jul
|
Aug
(8) |
Sep
(18) |
Oct
(27) |
Nov
|
Dec
(13) |
2005 |
Jan
(19) |
Feb
(13) |
Mar
(1) |
Apr
|
May
(10) |
Jun
(1) |
Jul
(10) |
Aug
(5) |
Sep
(2) |
Oct
(2) |
Nov
(6) |
Dec
(4) |
2006 |
Jan
(9) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Steve B. <sj...@us...> - 2003-10-07 03:00:42
|
Update of /cvsroot/plib/plib/examples/src/fnt In directory sc8-pr-cvs1:/tmp/cvs-serv5321/plib/examples/src/fnt Modified Files: fnt_test.cxx Log Message: Angle calculation routines changed to return degree results. Index: fnt_test.cxx =================================================================== RCS file: /cvsroot/plib/plib/examples/src/fnt/fnt_test.cxx,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- fnt_test.cxx 1 Sep 2002 12:04:50 -0000 1.8 +++ fnt_test.cxx 7 Oct 2003 03:00:07 -0000 1.9 @@ -96,6 +96,7 @@ /* "old/helvetica_bold.txf", "old/helvetica_medium.txf", */ "old/junius.txf", + "old/ledfixed.txf", "old/lucida.txf", "old/lucidabright_bold.txf", /* "old/schoolbook_bold.txf", |
From: Steve B. <sj...@us...> - 2003-10-07 03:00:17
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv5321/plib/src/ssg Modified Files: ssg.h Log Message: Angle calculation routines changed to return degree results. Index: ssg.h =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssg.h,v retrieving revision 1.163 retrieving revision 1.164 diff -u -d -r1.163 -r1.164 --- ssg.h 2 Aug 2003 18:26:03 -0000 1.163 +++ ssg.h 7 Oct 2003 03:00:11 -0000 1.164 @@ -484,6 +484,10 @@ float *get ( unsigned int n ) { return (float *) raw_get ( n ) ; } void add ( sgVec3 thing ) { raw_add ( (char *) thing ) ; } ; void set ( sgVec3 thing, unsigned int n ) { raw_set ( (char *) thing, n ) ; } ; + void set ( float x, float y, float z, unsigned int n ) + { sgVec3 tmp = { x, y, z } ; raw_set ( (char *) tmp, n ) ; } ; + void add ( float x, float y, float z ) + { sgVec3 tmp = { x, y, z } ; raw_add ( (char *) tmp ) ; } ; virtual void print ( FILE *fd = stderr, char *indent = "", int how_much = 2 ) ; virtual const char *getTypeName(void) ; } ; @@ -502,6 +506,10 @@ float *get ( unsigned int n ) { return (float *) raw_get ( n ) ; } void add ( sgVec3 thing ) { raw_add ( (char *) thing ) ; } ; void set ( sgVec3 thing, unsigned int n ) { raw_set ( (char *) thing, n ) ; } ; + void set ( float x, float y, float z, unsigned int n ) + { sgVec3 tmp = { x, y, z } ; raw_set ( (char *) tmp, n ) ; } ; + void add ( float x, float y, float z ) + { sgVec3 tmp = { x, y, z } ; raw_add ( (char *) tmp ) ; } ; virtual void print ( FILE *fd = stderr, char *indent = "", int how_much = 2 ) ; virtual const char *getTypeName(void) ; } ; @@ -520,6 +528,10 @@ float *get ( unsigned int n ) { return (float *) raw_get ( n ) ; } void add ( sgVec2 thing ) { raw_add ( (char *) thing ) ; } ; void set ( sgVec2 thing, unsigned int n ) { raw_set ( (char *) thing, n ) ; } ; + void set ( float u, float v, unsigned int n ) + { sgVec2 tmp = { u, v } ; raw_set ( (char *) tmp, n ) ; } ; + void add ( float u, float v ) + { sgVec2 tmp = { u, v } ; raw_add ( (char *) tmp ) ; } ; virtual void print ( FILE *fd = stderr, char *indent = "", int how_much = 2 ) ; virtual const char *getTypeName(void) ; } ; @@ -538,6 +550,10 @@ float *get ( unsigned int n ) { return (float *) raw_get ( n ) ; } void add ( sgVec4 thing ) { raw_add ( (char *) thing ) ; } ; void set ( sgVec4 thing, unsigned int n ) { raw_set ( (char *) thing, n ) ; } ; + void set ( float r, float g, float b, float a, unsigned int n ) + { sgVec4 tmp = { r,g,b,a } ; raw_set ( (char *) tmp, n ) ; } ; + void add ( float r, float g, float b, float a ) + { sgVec4 tmp = { r,g,b,a } ; raw_add ( (char *) tmp ) ; } ; virtual void print ( FILE *fd = stderr, char *indent = "", int how_much = 2 ) ; virtual const char *getTypeName(void) ; } ; |
From: Steve B. <sj...@us...> - 2003-10-07 03:00:17
|
Update of /cvsroot/plib/plib/src/sg In directory sc8-pr-cvs1:/tmp/cvs-serv5321/plib/src/sg Modified Files: sg.cxx sg.h Log Message: Angle calculation routines changed to return degree results. Index: sg.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/sg/sg.cxx,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- sg.cxx 9 Sep 2002 09:07:03 -0000 1.38 +++ sg.cxx 7 Oct 2003 03:00:08 -0000 1.39 @@ -156,10 +156,12 @@ } // -dw- inconsistent linkage! + float sgTriArea( sgVec3 p0, sgVec3 p1, sgVec3 p2 ) { /* From comp.graph.algorithms FAQ + 2A(P) = abs(N.(sum_{i=0}^{n-1}(v_i x v_{i+1}))) This is an optimized version for a triangle [...180 lines suppressed...] { + // nornmal has to be normalized. sgVec3 nv1, nv2 ; sgNormalizeVec3 ( nv1, v1 ) ; @@ -1001,6 +1001,14 @@ dst->hpr[2] = sgATan2 ( sr, cr ) ; } +} + + +void sgMakeNormal(sgVec2 dst, const sgVec2 a, const sgVec2 b ) +{ + sgSubVec2 ( dst, b, a ) ; + float tmp = dst [ 0 ] ; dst [ 0 ] = -dst [ 1 ] ; dst [ 1 ] = tmp ; + sgNormaliseVec2 ( dst ) ; } Index: sg.h =================================================================== RCS file: /cvsroot/plib/plib/src/sg/sg.h,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- sg.h 15 Sep 2003 21:53:53 -0000 1.50 +++ sg.h 7 Oct 2003 03:00:11 -0000 1.51 @@ -854,6 +854,9 @@ sgReflectInPlaneVec3 ( dst, dst, plane ) ; } +extern void sgMakeNormal ( sgVec2 dst, const sgVec3 a, const sgVec3 b ) ; + + extern void sgMakeNormal ( sgVec3 dst, const sgVec3 a, const sgVec3 b, const sgVec3 c ) ; @@ -888,21 +891,26 @@ float sgTriArea( sgVec3 p0, sgVec3 p1, sgVec3 p2 ); -// Fast code. Result is in the range 0..pi: +// Fast code. Result is in the range 0..180: inline SGfloat sgAngleBetweenNormalizedVec3 ( sgVec3 v1, sgVec3 v2 ) { float f = sgScalarProductVec3 ( v1, v2 ) ; - return (float)(acos((f>=1.0f)?1.0f:(f<=-1.0f)?-1.0f:f)*SG_RADIANS_TO_DEGREES) ; + return (float) acos ( ( f >= 1.0f ) ? 1.0f : + ( f <= -1.0f ) ? -1.0f : f ) * + SG_RADIANS_TO_DEGREES ; } -// Fast code. Result is in the range 0..pi: +// Fast code. Result is in the range 0..180: + SGfloat sgAngleBetweenVec3 ( sgVec3 v1, sgVec3 v2 ); -// all three have to be normalized. Slow code. Result is in the range 0..2*pi: +// All three have to be normalized. Slow code. Result is in the range 0..360: + SGfloat sgAngleBetweenNormalizedVec3 (sgVec3 first, sgVec3 second, sgVec3 normal); -// normal has to be normalized. Slow code. Result is in the range 0..2*pi: +// Normal has to be normalized. Slow code. Result is in the range 0..360: + SGfloat sgAngleBetweenVec3 ( sgVec3 v1, sgVec3 v2, sgVec3 normal ); class sgSphere |
From: Steve B. <sj...@us...> - 2003-09-26 15:02:01
|
Update of /cvsroot/plib/plib/doc/ssgAux In directory sc8-pr-cvs1:/tmp/cvs-serv29160/plib/doc/ssgAux Modified Files: index.html Log Message: Added a note explaining about the problems with 'sun' being a reserved word under Solaris. Index: index.html =================================================================== RCS file: /cvsroot/plib/plib/doc/ssgAux/index.html,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- index.html 11 Sep 2003 12:03:21 -0000 1.12 +++ index.html 26 Sep 2003 15:01:56 -0000 1.13 @@ -616,6 +616,11 @@ bodies, for example a haloed sun or a textured moon, and methods to add clouds, stars and planets. <p> +<b>WARNING</b> - Solaris C/C++ compilers (from Sun Microsystems Inc) have +some nasty '#define's for the word 'SUN' and 'sun'. If you are writing +portable software, you might want to pick an alternative word! PLIB uses 'Sol', +the formal astronomical name for the star that happens to be our sun. +<p> The sky implements various time of day lighting effects, it plays well with fog and visibility effects, and implements scudded cloud fly-through effects. Additionally, you can wire in the output of the SimGear @@ -653,8 +658,8 @@ int nplanets, sgdVec3 *planet_data, int nstars, sgdVec3 *star_data); - ssgaCelestialBody* addBody( const char *body_tex_path, const char *halo_tex_path, double size, double dist, bool sun = false ); - ssgaCelestialBody* addBody( ssgSimpleState *orb_state, ssgSimpleState *halo_state, double size, double dist, bool sun = false ); + ssgaCelestialBody* addBody( const char *body_tex_path, const char *halo_tex_path, double size, double dist, bool sol = false ); + ssgaCelestialBody* addBody( ssgSimpleState *orb_state, ssgSimpleState *halo_state, double size, double dist, bool sol = false ); ssgaCelestialBody* getBody(int i) { return bodies.get(i); } int getBodyCount() { return bodies.getNum(); } @@ -667,7 +672,7 @@ bool reposition( sgVec3 view_pos, sgVec3 zero_elev, sgVec3 view_up, double lon, double lat, double alt, double spin, double gst, double dt ); - bool repaint( sgVec4 sky_color, sgVec4 fog_color, sgVec4 cloud_color, double sun_angle, + bool repaint( sgVec4 sky_color, sgVec4 fog_color, sgVec4 cloud_color, double sol_angle, int nplanets, sgdVec3 *planet_data, int nstars, sgdVec3 *star_data ); |
From: Steve B. <sj...@us...> - 2003-09-26 14:56:05
|
Update of /cvsroot/plib/plib/examples/src/ssg/sky In directory sc8-pr-cvs1:/tmp/cvs-serv28108/plib/examples/src/ssg/sky Modified Files: sky.cxx Log Message: More replacement of 'sun' with 'sol'. Index: sky.cxx =================================================================== RCS file: /cvsroot/plib/plib/examples/src/ssg/sky/sky.cxx,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- sky.cxx 26 Aug 2003 21:36:53 -0000 1.2 +++ sky.cxx 26 Sep 2003 14:56:01 -0000 1.3 @@ -252,8 +252,8 @@ sky -> repositionFlat ( campos.xyz, 0, dt ); sky -> modifyVisibility ( campos.xyz[SG_Z], dt ); - double sun_angle = bodies[0]->getAngle(); - double sky_brightness = (1.0 + cos(sun_angle))/2.0; // 0.0 - 1.0 + double sol_angle = bodies[0]->getAngle(); + double sky_brightness = (1.0 + cos(sol_angle))/2.0; // 0.0 - 1.0 double scene_brightness = pow(sky_brightness,0.5); /* set sky color */ @@ -269,12 +269,12 @@ cloud_color[3] = fog_color[3] = base_fog_color[3]; /* repaint the sky */ - sky -> repaint ( sky_color, fog_color, cloud_color, sun_angle, nplanets, planet_data, nstars, star_data ); + sky -> repaint ( sky_color, fog_color, cloud_color, sol_angle, nplanets, planet_data, nstars, star_data ); /* set light source */ - sgCoord sunpos; - bodies[0] -> getPosition ( & sunpos ); - ssgGetLight ( 0 ) -> setPosition ( sunpos.xyz ) ; + sgCoord solpos; + bodies[0] -> getPosition ( & solpos ); + ssgGetLight ( 0 ) -> setPosition ( solpos.xyz ) ; scene_ambient[0] = base_ambient[0] * scene_brightness; scene_ambient[1] = base_ambient[1] * scene_brightness; @@ -456,9 +456,9 @@ /* Set up the Sun */ - sgVec3 sunposn ; - sgSetVec3 ( sunposn, 0, 0, 0 ) ; - ssgGetLight ( 0 ) -> setPosition ( sunposn ) ; + sgVec3 solposn ; + sgSetVec3 ( solposn, 0, 0, 0 ) ; + ssgGetLight ( 0 ) -> setPosition ( solposn ) ; } |
From: Steve B. <sj...@us...> - 2003-09-26 14:54:25
|
Update of /cvsroot/plib/plib/src/ssgAux In directory sc8-pr-cvs1:/tmp/cvs-serv27509/plib/src/ssgAux Modified Files: ssgaCelestialBody.cxx ssgaSky.cxx ssgaSky.h ssgaSkyDome.cxx ssgaStars.cxx Log Message: Replaced 'sun' with 'sol' everywhere it occurs because 'sun' appears to be a reserved word on Sun Microsystems machines. This *sucks*. Index: ssgaCelestialBody.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgaCelestialBody.cxx,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ssgaCelestialBody.cxx 26 Aug 2003 21:36:04 -0000 1.2 +++ ssgaCelestialBody.cxx 26 Sep 2003 14:54:20 -0000 1.3 @@ -229,7 +229,7 @@ } -bool ssgaCelestialBody::reposition( sgVec3 p, double angle, double rightAscension, double declination, double sun_dist ) +bool ssgaCelestialBody::reposition( sgVec3 p, double angle, double rightAscension, double declination, double sol_dist ) { sgMat4 T1, T2, GST, RA, DEC; sgVec3 axis; @@ -246,7 +246,7 @@ sgSetVec3( axis, 1.0, 0.0, 0.0 ); sgMakeRotMat4( DEC, (float)(declination * SGD_RADIANS_TO_DEGREES), axis ); - sgSetVec3( v, 0.0, (float)sun_dist, 0.0 ); + sgSetVec3( v, 0.0, (float)sol_dist, 0.0 ); sgMakeTransMat4( T2, v ); sgMat4 TRANSFORM; Index: ssgaSky.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgaSky.cxx,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ssgaSky.cxx 26 Aug 2003 21:36:04 -0000 1.2 +++ ssgaSky.cxx 26 Sep 2003 14:54:20 -0000 1.3 @@ -44,7 +44,7 @@ dome = 0; planets = 0; stars = 0; - sun_ref = 0; + sol_ref = 0; pre_root = 0; post_root = 0; @@ -119,7 +119,7 @@ [...63 lines suppressed...] for ( i = 0; i < bodies.getNum (); i++ ) bodies.get(i)->repaint(); @@ -245,8 +245,8 @@ for ( i = 0; i < clouds.getNum (); i++ ) clouds.get(i)->repaint( cloud_color ); - planets->repaint( sun_angle, nplanets, planet_data ); - stars->repaint( sun_angle, nstars, star_data ); + planets->repaint( sol_angle, nplanets, planet_data ); + stars->repaint( sol_angle, nstars, star_data ); } else { // turn off sky @@ -399,4 +399,4 @@ } // for effective_visibility = effvis; -} \ No newline at end of file +} Index: ssgaSky.h =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgaSky.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ssgaSky.h 26 Aug 2003 21:36:04 -0000 1.2 +++ ssgaSky.h 26 Sep 2003 14:54:20 -0000 1.3 @@ -234,7 +234,7 @@ bool reposition( sgVec3 p, double angle ); - bool repaint( double sun_angle, int num, sgdVec3 *star_data ); + bool repaint( double sol_angle, int num, sgdVec3 *star_data ); }; @@ -267,7 +267,7 @@ bool repositionFlat( sgVec3 p, double spin ); bool reposition( sgVec3 p, double lon, double lat, double spin ); - bool repaint( sgVec3 sky_color, sgVec3 fog_color, double sun_angle, double vis ); + bool repaint( sgVec3 sky_color, sgVec3 fog_color, double sol_angle, double vis ); }; @@ -277,7 +277,7 @@ // components of the sky ssgaSkyDome *dome; - ssgaCelestialBody* sun_ref; + ssgaCelestialBody* sol_ref; ssgaCelestialBodyList bodies; ssgaCloudLayerList clouds; ssgaStars *planets; @@ -309,8 +309,8 @@ int nplanets, sgdVec3 *planet_data, int nstars, sgdVec3 *star_data); - ssgaCelestialBody* addBody( const char *body_tex_path, const char *halo_tex_path, double size, double dist, bool sun = false ); - ssgaCelestialBody* addBody( ssgSimpleState *orb_state, ssgSimpleState *halo_state, double size, double dist, bool sun = false ); + ssgaCelestialBody* addBody( const char *body_tex_path, const char *halo_tex_path, double size, double dist, bool sol = false ); + ssgaCelestialBody* addBody( ssgSimpleState *orb_state, ssgSimpleState *halo_state, double size, double dist, bool sol = false ); ssgaCelestialBody* getBody(int i) { return bodies.get(i); } int getBodyCount() { return bodies.getNum(); } @@ -322,7 +322,7 @@ bool repositionFlat( sgVec3 view_pos, double spin, double dt ); bool reposition( sgVec3 view_pos, sgVec3 zero_elev, sgVec3 view_up, double lon, double lat, double alt, double spin, double gst, double dt ); - bool repaint( sgVec4 sky_color, sgVec4 fog_color, sgVec4 cloud_color, double sun_angle, + bool repaint( sgVec4 sky_color, sgVec4 fog_color, sgVec4 cloud_color, double sol_angle, int nplanets, sgdVec3 *planet_data, int nstars, sgdVec3 *star_data ); @@ -394,4 +394,4 @@ *color = (float)pow(*color, system/reff); }; -#endif \ No newline at end of file +#endif Index: ssgaSkyDome.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgaSkyDome.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ssgaSkyDome.cxx 26 Jul 2003 06:16:19 -0000 1.1 +++ ssgaSkyDome.cxx 26 Sep 2003 14:54:20 -0000 1.2 @@ -317,26 +317,26 @@ } -bool ssgaSkyDome::repaint( sgVec4 sky_color, sgVec4 fog_color, double sun_angle, double vis ) +bool ssgaSkyDome::repaint( sgVec4 sky_color, sgVec4 fog_color, double sol_angle, double vis ) { double diff; sgVec3 outer_param, outer_amt, outer_diff; sgVec3 middle_param, middle_amt, middle_diff; int i, j; - sun_angle *= SGD_RADIANS_TO_DEGREES; + sol_angle *= SGD_RADIANS_TO_DEGREES; // Check for sunrise/sunset condition - if ( (sun_angle > 80.0) ) { // && (sun_angle < 100.0) ) + if ( (sol_angle > 80.0) ) { // && (sol_angle < 100.0) ) // 0.0 - 0.4 sgSetVec3( outer_param, - (float)((10.0 - fabs(90.0 - sun_angle)) / 20.0), - (float)((10.0 - fabs(90.0 - sun_angle)) / 40.0), - (float)(-(10.0 - fabs(90.0 - sun_angle)) / 30.0)); + (float)((10.0 - fabs(90.0 - sol_angle)) / 20.0), + (float)((10.0 - fabs(90.0 - sol_angle)) / 40.0), + (float)(-(10.0 - fabs(90.0 - sol_angle)) / 30.0)); sgSetVec3( middle_param, - (float)((10.0 - fabs(90.0 - sun_angle)) / 40.0), - (float)((10.0 - fabs(90.0 - sun_angle)) / 80.0), + (float)((10.0 - fabs(90.0 - sol_angle)) / 40.0), + (float)((10.0 - fabs(90.0 - sol_angle)) / 80.0), 0.0 ); sgScaleVec3( outer_diff, outer_param, 1.0f / 6.0f ); Index: ssgaStars.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgaStars.cxx,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ssgaStars.cxx 26 Aug 2003 21:36:04 -0000 1.2 +++ ssgaStars.cxx 26 Sep 2003 14:54:20 -0000 1.3 @@ -154,7 +154,7 @@ } -bool ssgaStars::repaint( double sun_angle, int num, sgdVec3 *star_data ) +bool ssgaStars::repaint( double sol_angle, int num, sgdVec3 *star_data ) { double mag, nmag, alpha, factor, cutoff; float *color; @@ -162,38 +162,38 @@ int phase; // determine which star structure to draw - if ( sun_angle > (0.5 * SGD_PI + 10.0 * SGD_DEGREES_TO_RADIANS ) ) { + if ( sol_angle > (0.5 * SGD_PI + 10.0 * SGD_DEGREES_TO_RADIANS ) ) { // deep night factor = 1.0; cutoff = 4.5; phase = 0; } - else if ( sun_angle > (0.5 * SGD_PI + 8.8 * SGD_DEGREES_TO_RADIANS ) ) { + else if ( sol_angle > (0.5 * SGD_PI + 8.8 * SGD_DEGREES_TO_RADIANS ) ) { factor = 1.0; cutoff = 3.8; phase = 1; } - else if ( sun_angle > (0.5 * SGD_PI + 7.5 * SGD_DEGREES_TO_RADIANS ) ) { + else if ( sol_angle > (0.5 * SGD_PI + 7.5 * SGD_DEGREES_TO_RADIANS ) ) { factor = 0.95; cutoff = 3.1; phase = 2; } - else if ( sun_angle > (0.5 * SGD_PI + 7.0 * SGD_DEGREES_TO_RADIANS ) ) { + else if ( sol_angle > (0.5 * SGD_PI + 7.0 * SGD_DEGREES_TO_RADIANS ) ) { factor = 0.9; cutoff = 2.4; phase = 3; } - else if ( sun_angle > (0.5 * SGD_PI + 6.5 * SGD_DEGREES_TO_RADIANS ) ) { + else if ( sol_angle > (0.5 * SGD_PI + 6.5 * SGD_DEGREES_TO_RADIANS ) ) { factor = 0.85; cutoff = 1.8; phase = 4; } - else if ( sun_angle > (0.5 * SGD_PI + 6.0 * SGD_DEGREES_TO_RADIANS ) ) { + else if ( sol_angle > (0.5 * SGD_PI + 6.0 * SGD_DEGREES_TO_RADIANS ) ) { factor = 0.8; cutoff = 1.2; phase = 5; } - else if ( sun_angle > (0.5 * SGD_PI + 5.5 * SGD_DEGREES_TO_RADIANS ) ) { + else if ( sol_angle > (0.5 * SGD_PI + 5.5 * SGD_DEGREES_TO_RADIANS ) ) { factor = 0.75; cutoff = 0.6; phase = 6; |
From: Steve B. <sj...@us...> - 2003-09-15 21:53:57
|
Update of /cvsroot/plib/plib/src/sg In directory sc8-pr-cvs1:/tmp/cvs-serv12536/plib/src/sg Modified Files: sg.h Log Message: Cut/paste error! SGD_FOUR should (of course) be 4.0, not 3.0! Index: sg.h =================================================================== RCS file: /cvsroot/plib/plib/src/sg/sg.h,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- sg.h 15 Sep 2003 04:50:15 -0000 1.49 +++ sg.h 15 Sep 2003 21:53:53 -0000 1.50 @@ -1380,7 +1380,7 @@ #define SGD_ONE 1.0 #define SGD_TWO 2.0 #define SGD_THREE 3.0 -#define SGD_FOUR 3.0 +#define SGD_FOUR 4.0 #define SGD_45 45.0 #define SGD_60 60.0 #define SGD_90 90.0 |
From: Steve B. <sj...@us...> - 2003-09-15 04:50:19
|
Update of /cvsroot/plib/plib/src/sg In directory sc8-pr-cvs1:/tmp/cvs-serv15571/plib/src/sg Modified Files: sg.h Log Message: Fixed the default screen aspect ratio in 'setFOV'. Index: sg.h =================================================================== RCS file: /cvsroot/plib/plib/src/sg/sg.h,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- sg.h 9 Sep 2002 09:07:02 -0000 1.48 +++ sg.h 15 Sep 2003 04:50:15 -0000 1.49 @@ -35,6 +35,7 @@ #define SG_ONE 1.0f #define SG_TWO 2.0f #define SG_THREE 3.0f +#define SG_FOUR 4.0f #define SG_45 45.0f #define SG_60 60.0f #define SG_90 90.0f @@ -1113,8 +1114,8 @@ void setFOV ( const SGfloat h, const SGfloat v ) { ortho = FALSE ; - hfov = ( h <= 0 ) ? ( v * SG_THREE / SG_TWO ) : h ; - vfov = ( v <= 0 ) ? ( h * SG_TWO / SG_THREE ) : v ; + hfov = ( h <= 0 ) ? ( v * SG_FOUR / SG_THREE ) : h ; + vfov = ( v <= 0 ) ? ( h * SG_THREE / SG_FOUR ) : v ; update () ; } @@ -1127,8 +1128,8 @@ void setOrtho ( const SGfloat w, const SGfloat h ) { ortho = TRUE ; - hfov = ( w <= 0 ) ? ( h * SG_THREE / SG_TWO ) : w ; - vfov = ( h <= 0 ) ? ( w * SG_THREE / SG_TWO ) : h ; + hfov = ( w <= 0 ) ? ( h * SG_FOUR / SG_THREE ) : w ; + vfov = ( h <= 0 ) ? ( w * SG_FOUR / SG_THREE ) : h ; update () ; } @@ -1379,6 +1380,7 @@ #define SGD_ONE 1.0 #define SGD_TWO 2.0 #define SGD_THREE 3.0 +#define SGD_FOUR 3.0 #define SGD_45 45.0 #define SGD_60 60.0 #define SGD_90 90.0 @@ -2342,8 +2344,8 @@ void setFOV ( const SGDfloat h, const SGDfloat v ) { - hfov = ( h <= 0 ) ? ( v * SGD_THREE / SGD_TWO ) : h ; - vfov = ( v <= 0 ) ? ( h * SGD_TWO / SGD_THREE ) : v ; + hfov = ( h <= 0 ) ? ( v * SGD_FOUR / SGD_THREE ) : h ; + vfov = ( v <= 0 ) ? ( h * SGD_THREE / SGD_FOUR ) : v ; update () ; } |
From: Nick M. <nm...@us...> - 2003-09-11 12:03:26
|
Update of /cvsroot/plib/plib/doc/ssgAux In directory sc8-pr-cvs1:/tmp/cvs-serv11209/doc/ssgAux Modified Files: index.html Added Files: ssgaSky.png Log Message: Added ssgaSky --- NEW FILE: ssgaSky.png --- (This appears to be a binary file; contents omitted.) Index: index.html =================================================================== RCS file: /cvsroot/plib/plib/doc/ssgAux/index.html,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- index.html 28 Aug 2002 05:09:44 -0000 1.11 +++ index.html 11 Sep 2003 12:03:21 -0000 1.12 @@ -37,6 +37,7 @@ <li><A HREF="#ssgaParticleSystem">ssgaParticleSystem - Implements a spray of particles</A> <li><A HREF="#ssgaFire">ssgaFire - Simulates Fire</A> <li><A HREF="#ssgaLensFlare">ssgaLensFlare - Simulates Lens Flare for drawing bright lights.</A> +<li><A HREF="#ssgaSky">ssgaSky - Model a sky with sun, moon, clouds, stars & planets.</A> </ul> </TD> <TD> @@ -605,6 +606,264 @@ It contains a (hard-coded) 256x128 texture map which is compiled into the code and shared between however many lens flares there are in the scene. [...241 lines suppressed...] +puffy cloud effect to be calculated correctly. +<p> +The modifyVisibility() method alters the ssgaSky's internal +idea of visibility, so you should subsequently call +getVisibility() to get the actual modified visibility. +You should then make the appropriate glFog() calls to +setup fog properly for your scene. +<H2>Accessor Methods</H2> +Once an instance of ssgaSky has been successfully +initialized, there are a couple accessor methods you +can use such as getBodyCount() to return the number +of celestial bodies, getBody(i) to return body number +i, getCloudCount() to return the number +of cloud layers, getCloud(i) to return cloud +layer number i, getVisibility() to return the actual +visibility as modified by the sky/cloud model. +<p> <hr> <table> <tr> |
From: M?rten Str?m. <str...@us...> - 2003-09-09 19:45:19
|
Update of /cvsroot/plib/plib/src/pui In directory sc8-pr-cvs1:/tmp/cvs-serv28860 Modified Files: puValue.cxx Log Message: Bugfix reported by Frederic Jardon Index: puValue.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/puValue.cxx,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- puValue.cxx 12 Jul 2003 00:45:58 -0000 1.25 +++ puValue.cxx 9 Sep 2003 19:45:13 -0000 1.26 @@ -120,7 +120,7 @@ Do not modify the string value unless necessary */ if ( *res_bool != ( strcmp ( string, "0" ) != 0 ) ) - sprintf ( string, "%d", *res_bool ? "1" : "0" ) ; + sprintf ( string, "%d", *res_bool ? 1 : 0 ) ; puPostRefresh () ; } |
From: Nick M. <nm...@us...> - 2003-08-26 21:36:57
|
Update of /cvsroot/plib/plib/examples/src/ssg/sky In directory sc8-pr-cvs1:/tmp/cvs-serv8298/examples/src/ssg/sky Modified Files: sky.cxx Log Message: Fixed stars visible through moon, cloud visibility calc only when cloud enabled, cloud curving based on elevation, added cloud movement direction and speed Index: sky.cxx =================================================================== RCS file: /cvsroot/plib/plib/examples/src/ssg/sky/sky.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- sky.cxx 26 Jul 2003 06:19:47 -0000 1.1 +++ sky.cxx 26 Aug 2003 21:36:53 -0000 1.2 @@ -249,7 +249,7 @@ /* update sky */ - sky -> repositionFlat ( campos.xyz ); + sky -> repositionFlat ( campos.xyz, 0, dt ); sky -> modifyVisibility ( campos.xyz[SG_Z], dt ); double sun_angle = bodies[0]->getAngle(); @@ -545,15 +545,15 @@ NULL, // body texture "data/halo.rgba", // halo texture 5000, // size - 100000, // distance + 80000, // distance true ); // is sun - dome painted based on this bodies[0] -> setDeclination ( 20*SGD_DEGREES_TO_RADIANS ); /* moon */ bodies[1] = sky -> addBody ( "data/moon.rgba", // body texture NULL, // halo texture - 200, // size - 1000 ); // distance + 5000, // size + 80000 ); // distance bodies[1] -> setDeclination ( 65*SGD_DEGREES_TO_RADIANS ); /* clouds */ clouds[0] = sky -> addCloud ( @@ -562,18 +562,24 @@ 2000, // elevation, 100, // thickness 100 ); // transition + clouds[0] -> setSpeed ( 50 ) ; + clouds[0] -> setDirection ( 45 ) ; clouds[1] = sky -> addCloud ( "data/scattered.rgba", // texture 80000, // span 3000, // elevation, 100, // thickness 100 ); // transition + clouds[1] -> setSpeed ( 20 ) ; + clouds[1] -> setDirection ( 30 ) ; clouds[2] = sky -> addCloud ( "data/scattered.rgba", // texture 80000, // span 1000, // elevation, 100, // thickness 100 ); // transition + clouds[2] -> setSpeed ( 5 ) ; + clouds[2] -> setDirection ( 20 ) ; teapot = new ssgTransform ; teapot -> addKid ( tpt_obj ) ; |
From: Nick M. <nm...@us...> - 2003-08-26 21:36:09
|
Update of /cvsroot/plib/plib/src/ssgAux In directory sc8-pr-cvs1:/tmp/cvs-serv8073/src/ssgAux Modified Files: ssgaCelestialBody.cxx ssgaCloudLayer.cxx ssgaSky.cxx ssgaSky.h ssgaStars.cxx Log Message: Fixed stars visible through moon, cloud visibility calc only when cloud enabled, cloud curving based on elevation, added cloud movement direction and speed Index: ssgaCelestialBody.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgaCelestialBody.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ssgaCelestialBody.cxx 26 Jul 2003 06:16:19 -0000 1.1 +++ ssgaCelestialBody.cxx 26 Aug 2003 21:36:04 -0000 1.2 @@ -43,7 +43,7 @@ glPushAttrib( GL_COLOR_BUFFER_BIT | GL_ENABLE_BIT ); - glDisable( GL_DEPTH_TEST ); + //glDisable( GL_DEPTH_TEST ); glDisable( GL_FOG ); glBlendFunc ( GL_SRC_ALPHA, GL_ONE ) ; Index: ssgaCloudLayer.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgaCloudLayer.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ssgaCloudLayer.cxx 26 Jul 2003 06:16:19 -0000 1.1 +++ ssgaCloudLayer.cxx 26 Aug 2003 21:36:04 -0000 1.2 @@ -48,12 +48,14 @@ ssgaCloudLayer::ssgaCloudLayer( void ) : layer_root(new ssgRoot), layer_transform(new ssgTransform), + enabled(true), layer_span(0.0), layer_asl(0.0), layer_thickness(0.0), layer_transition(0.0), scale(4000.0), - enabled(true), + speed(0.0), [...115 lines suppressed...] + } + + // calculate cloud movement + double ax = 0.0, ay = 0.0, bx = 0.0, by = 0.0; + + if (dist > 0.0) { + ax = cos(course) * dist; + ay = sin(course) * dist; + } + + if (sp_dist > 0) { + bx = cos(-direction * SGD_DEGREES_TO_RADIANS) * sp_dist; + by = sin(-direction * SGD_DEGREES_TO_RADIANS) * sp_dist; + } + + float xoff = (float)((ax + bx) / (2 * scale)); + float yoff = (float)((ay + by) / (2 * scale)); const float layer_scale = layer_span / scale; Index: ssgaSky.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgaSky.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ssgaSky.cxx 26 Jul 2003 06:16:19 -0000 1.1 +++ ssgaSky.cxx 26 Aug 2003 21:36:04 -0000 1.2 @@ -92,14 +92,20 @@ pre_transform = new ssgTransform; post_transform = new ssgTransform; + bodies_transform = new ssgTransform; + stars_transform = new ssgTransform; + dome = new ssgaSkyDome; pre_transform -> addKid( dome->build( h_radius, v_radius ) ); planets = new ssgaStars; - pre_transform -> addKid( planets->build( nplanets, planet_data, h_radius ) ); [...186 lines suppressed...] - in_puff = false; - } - } + puff_progression += time_factor; - // never let visibility drop below 25 meters - if ( effvis <= 25.0 ) { - effvis = 25.0; + if ( puff_progression > puff_length + ramp_up + ramp_down) { + in_puff = false; + } + } + + // never let visibility drop below 25 meters + if ( effvis <= 25.0 ) { + effvis = 25.0; + } } } } // for Index: ssgaSky.h =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgaSky.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ssgaSky.h 26 Jul 2003 06:16:19 -0000 1.1 +++ ssgaSky.h 26 Aug 2003 21:36:04 -0000 1.2 @@ -137,12 +137,14 @@ ssgVertexArray *vl[4]; ssgTexCoordArray *tl[4]; + bool enabled; float layer_span; float layer_asl; float layer_thickness; float layer_transition; float scale; - bool enabled; + float speed; + float direction; double last_lon, last_lat; double last_x, last_y; @@ -155,8 +157,8 @@ void build( const char *cloud_tex_path, float span, float elevation, float thickness, float transition ); void build( ssgSimpleState *cloud_state, float span, float elevation, float thickness, float transition ); - bool repositionFlat( sgVec3 p ); - bool reposition( sgVec3 p, sgVec3 up, double lon, double lat, double alt ); + bool repositionFlat( sgVec3 p, double dt ); + bool reposition( sgVec3 p, sgVec3 up, double lon, double lat, double alt, double dt ); bool repaint( sgVec3 fog_color ); @@ -174,6 +176,12 @@ float getTransition () { return layer_transition; } void setTransition ( float transition ) { layer_transition = transition; } + + float getSpeed () { return speed; } + void setSpeed ( float val ) { speed = val; } + + float getDirection () { return direction; } + void setDirection ( float val ) { direction = val; } }; @@ -279,6 +287,7 @@ ssgSelector *pre_selector, *post_selector; ssgTransform *pre_transform, *post_transform; + ssgTransform *bodies_transform, *stars_transform; // visibility float visibility; @@ -310,8 +319,8 @@ ssgaCloudLayer* getCloud(int i) { return clouds.get(i); } int getCloudCount() { return clouds.getNum(); } - bool repositionFlat( sgVec3 view_pos, double spin = 0 ); - bool reposition( sgVec3 view_pos, sgVec3 zero_elev, sgVec3 view_up, double lon, double lat, double alt, double spin, double gst ); + bool repositionFlat( sgVec3 view_pos, double spin, double dt ); + bool reposition( sgVec3 view_pos, sgVec3 zero_elev, sgVec3 view_up, double lon, double lat, double alt, double spin, double gst, double dt ); bool repaint( sgVec4 sky_color, sgVec4 fog_color, sgVec4 cloud_color, double sun_angle, int nplanets, sgdVec3 *planet_data, Index: ssgaStars.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgaStars.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ssgaStars.cxx 26 Jul 2003 06:16:19 -0000 1.1 +++ ssgaStars.cxx 26 Aug 2003 21:36:04 -0000 1.2 @@ -41,7 +41,7 @@ glPushAttrib( GL_DEPTH_BUFFER_BIT | GL_FOG_BIT ); - glDisable( GL_DEPTH_TEST ); + //glDisable( GL_DEPTH_TEST ); glDisable( GL_FOG ); // glBlendFunc ( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) ; |
From: Nick M. <nm...@us...> - 2003-08-26 14:27:42
|
Update of /cvsroot/plib/plib In directory sc8-pr-cvs1:/tmp/cvs-serv6178 Modified Files: plib.dsw Log Message: Added ssgSaveASC.cxx. Index: plib.dsw =================================================================== RCS file: /cvsroot/plib/plib/plib.dsw,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- plib.dsw 5 Sep 2002 20:50:20 -0000 1.12 +++ plib.dsw 25 Aug 2003 12:49:27 -0000 1.13 @@ -3,7 +3,7 @@ ############################################################################### -Project: "fnt"=.\src\fnt\fnt.dsp - Package Owner=<4> +Project: "fnt"=".\src\fnt\fnt.dsp" - Package Owner=<4> Package=<5> {{{ @@ -19,14 +19,10 @@ ############################################################################### [...74 lines suppressed...] Package=<5> {{{ @@ -177,7 +173,7 @@ ############################################################################### -Project: "ssgAux"=.\src\ssgAux\ssgAux.dsp - Package Owner=<4> +Project: "ssgAux"=".\src\ssgAux\ssgAux.dsp" - Package Owner=<4> Package=<5> {{{ @@ -193,7 +189,7 @@ ############################################################################### -Project: "ul"=.\src\util\ul.dsp - Package Owner=<4> +Project: "ul"=".\src\util\ul.dsp" - Package Owner=<4> Package=<5> {{{ |
From: Nick M. <nm...@us...> - 2003-08-25 23:00:32
|
Update of /cvsroot/plib/plib In directory sc8-pr-cvs1:/tmp/cvs-serv8943 Modified Files: plib.dsw Log Message: Correction .dsw incorrectly modified on last commit Index: plib.dsw =================================================================== RCS file: /cvsroot/plib/plib/plib.dsw,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- plib.dsw 25 Aug 2003 12:49:27 -0000 1.13 +++ plib.dsw 25 Aug 2003 13:10:05 -0000 1.14 @@ -19,7 +19,7 @@ ############################################################################### -Project: "js1"=".\src\js\js1.dsp" - Package Owner=<4> +Project: "js"=".\src\js\js.dsp" - Package Owner=<4> Package=<5> {{{ @@ -97,10 +97,6 @@ Package=<5> {{{ - begin source code control - psl - .\src\psl - end source code control }}} Package=<4> |
From: Nick M. <nm...@us...> - 2003-08-25 12:53:19
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv6536/src/ssg Modified Files: ssg.dsp Log Message: Added ssgSaveASC.cxx. Index: ssg.dsp =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssg.dsp,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- ssg.dsp 26 Feb 2003 19:12:00 -0000 1.44 +++ ssg.dsp 25 Aug 2003 12:53:16 -0000 1.45 @@ -226,15 +226,15 @@ # End Source File # Begin Source File -SOURCE=.\ssgLoadMDL_BGLTexture.cxx +SOURCE=.\ssgLoadMDL.cxx # End Source File # Begin Source File -SOURCE=.\ssgLoadMDL.cxx +SOURCE=.\ssgLoadMDL.h # End Source File # Begin Source File -SOURCE=.\ssgLoadMDL.h +SOURCE=.\ssgLoadMDL_BGLTexture.cxx # End Source File # Begin Source File @@ -323,6 +323,10 @@ # Begin Source File SOURCE=.\ssgSaveAC.cxx +# End Source File +# Begin Source File + +SOURCE=.\ssgSaveASC.cxx # End Source File # Begin Source File |
From: Nick M. <nm...@us...> - 2003-08-04 22:33:49
|
Update of /cvsroot/plib/plib/src/ssgAux In directory sc8-pr-cvs1:/tmp/cvs-serv3338 Modified Files: Makefile.am Log Message: Added ssgaSky Index: Makefile.am =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/Makefile.am,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Makefile.am 27 Jun 2003 08:15:15 -0000 1.14 +++ Makefile.am 4 Aug 2003 22:33:46 -0000 1.15 @@ -8,6 +8,8 @@ ssgaParticleSystem.h \ ssgaWaveSystem.h \ ssgaScreenDump.h \ + ssgaSky.h \ + ssgaSphere.h \ ssgaFire.h libplibssgaux_a_SOURCES = ssgAux.cxx \ @@ -19,6 +21,12 @@ ssgaLensFlareTexture.cxx \ ssgaFire.cxx \ ssgaScreenDump.cxx \ + ssgaSphere.cxx \ + ssgaCelestialBody.cxx \ + ssgaCloudLayer.cxx \ + ssgaStars.cxx \ + ssgaSkyDome.cxx \ + ssgaSky.cxx \ ssgaTeapot.cxx INCLUDES = -I$(top_srcdir)/src/sg -I$(top_srcdir)/src/ssg |
From: M?rten Str?m. <str...@us...> - 2003-08-02 18:36:58
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv28700 Modified Files: Makefile.am Log Message: Added 'ssgSaveASC.cxx'. Index: Makefile.am =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/Makefile.am,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- Makefile.am 29 Jan 2003 19:33:40 -0000 1.41 +++ Makefile.am 2 Aug 2003 18:36:55 -0000 1.42 @@ -25,7 +25,7 @@ ssgSaveVRML1.cxx ssgLoaderWriterStuff.h ssgMSFSPalette.h ssg3ds.h \ ssgLoadMDL.h ssgSave3ds.cxx ssgAxisTransform.cxx ssgLoadATG.cxx \ ssgSaveFLT.cxx ssgSaveATG.cxx ssgLoadIV.cxx ssgLoad.cxx ssgLoadVRML.h \ - ssgLoadMDL_BGLTexture.cxx ssgLoadXPlaneObj.cxx + ssgLoadMDL_BGLTexture.cxx ssgLoadXPlaneObj.cxx ssgSaveASC.cxx INCLUDES = -I$(top_srcdir)/src/sg -I$(top_srcdir)/src/util |
From: M?rten Str?m. <str...@us...> - 2003-08-02 18:26:06
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv26962 Modified Files: ssg.h Log Message: Declaration of 'ssgSaveASC'. Index: ssg.h =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssg.h,v retrieving revision 1.162 retrieving revision 1.163 diff -u -d -r1.162 -r1.163 --- ssg.h 26 Feb 2003 19:10:53 -0000 1.162 +++ ssg.h 2 Aug 2003 18:26:03 -0000 1.163 @@ -2680,6 +2680,7 @@ int ssgSaveQHI ( const char *fname, ssgEntity *ent ) ; int ssgSaveATG ( const char *fname, ssgEntity *ent ) ; int ssgSaveVRML1( const char *fname, ssgEntity *ent ) ; +int ssgSaveASC ( const char *fname, ssgEntity *ent ) ; ssgEntity *ssgLoad ( const char *fname, const ssgLoaderOptions *options = NULL ) ; |
From: Nick M. <nm...@us...> - 2003-07-31 12:05:30
|
Update of /cvsroot/plib/plib/examples In directory sc8-pr-cvs1:/tmp/cvs-serv32511 Modified Files: Makefile.am configure.in Log Message: Added ssgaSky Index: Makefile.am =================================================================== RCS file: /cvsroot/plib/plib/examples/Makefile.am,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Makefile.am 5 Sep 2002 06:35:24 -0000 1.9 +++ Makefile.am 31 Jul 2003 12:05:27 -0000 1.10 @@ -6,6 +6,7 @@ tar cf - doc \ src/ssg/tux/data \ src/ssg/water/data \ + src/ssg/sky/data \ src/ssg/majik/data \ src/psl/data \ src/fnt/data \ Index: configure.in =================================================================== RCS file: /cvsroot/plib/plib/examples/configure.in,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- configure.in 5 Sep 2002 06:36:09 -0000 1.34 +++ configure.in 31 Jul 2003 12:05:27 -0000 1.35 @@ -264,6 +264,7 @@ src/ssg/tween_test/Makefile \ src/ssg/viewer/Makefile \ src/ssg/water/Makefile \ + src/ssg/sky/Makefile \ src/ssg/dynamics/Makefile \ src/fnt/Makefile \ src/net/Makefile \ |
From: Nick M. <nm...@us...> - 2003-07-31 12:02:40
|
Update of /cvsroot/plib/plib/examples/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv32034 Modified Files: Makefile.am README Log Message: Added ssgaSky Index: Makefile.am =================================================================== RCS file: /cvsroot/plib/plib/examples/src/ssg/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile.am 11 Aug 2002 17:53:49 -0000 1.6 +++ Makefile.am 31 Jul 2003 12:02:37 -0000 1.7 @@ -1,3 +1,3 @@ -SUBDIRS = tux majik load_save state_test viewer tween_test water dynamics +SUBDIRS = tux majik load_save state_test viewer tween_test water sky dynamics EXTRA_DIST = README Index: README =================================================================== RCS file: /cvsroot/plib/plib/examples/src/ssg/README,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- README 11 Aug 2002 17:53:49 -0000 1.2 +++ README 31 Jul 2003 12:02:37 -0000 1.3 @@ -14,5 +14,7 @@ Water -- A demo of some ssgAux stuff - waves, particle-systems a teapot and a cube. +Sky -- A demo of a sky dome, with sun, moon, stars and clouds. + Dynamics -- Spring/Mass/Damper demo. |
From: Nick M. <nm...@us...> - 2003-07-31 11:54:39
|
Update of /cvsroot/plib/plib/examples In directory sc8-pr-cvs1:/tmp/cvs-serv30531 Modified Files: plib_examples.dsw Log Message: Added ssgaSky Index: plib_examples.dsw =================================================================== RCS file: /cvsroot/plib/plib/examples/plib_examples.dsw,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- plib_examples.dsw 5 Sep 2002 21:12:11 -0000 1.22 +++ plib_examples.dsw 31 Jul 2003 11:54:36 -0000 1.23 @@ -3,7 +3,7 @@ ############################################################################### -Project: "PointPicker"=.\src\pui\PointPicker.dsp - Package Owner=<4> +Project: "PointPicker"=".\src\pui\PointPicker.dsp" - Package Owner=<4> Package=<5> {{{ @@ -15,7 +15,7 @@ ############################################################################### [...283 lines suppressed...] Package=<5> {{{ @@ -381,7 +393,7 @@ ############################################################################### -Project: "dynamics"=.\src\ssg\dynamics\dynamics.dsp - Package Owner=<4> +Project: "water"=".\src\ssg\water\water.dsp" - Package Owner=<4> Package=<5> {{{ @@ -393,7 +405,7 @@ ############################################################################### -Project: "psl_demo"=.\src\psl\psl_demo.dsp - Package Owner=<4> +Project: "widget_list"=".\src\pui\widget_list.dsp" - Package Owner=<4> Package=<5> {{{ |
From: Nick M. <nm...@us...> - 2003-07-31 11:49:14
|
Update of /cvsroot/plib/plib/examples/src/ssg/sky In directory sc8-pr-cvs1:/tmp/cvs-serv29269 Added Files: Makefile.am README Log Message: Added ssgaSky --- NEW FILE: Makefile.am --- if BUILD_SSG noinst_PROGRAMS = sky sky_SOURCES = sky.cxx sky_LDADD = -lplibpu -lplibfnt -lplibssgaux -lplibssg -lplibsg -lplibul $(GLUT_LIBS) $(OGL_LIBS) endif EXTRA_DIST = sky.dsp README --- NEW FILE: README --- SkyDome. ~~~~~~~~~~~~~~~~ The PLIB ssgAux library contains a class for creating a sky dome. class ssgaSky ; The program in this directory demonstrates creating a sky dome, including the sun, moon, stars and clouds. This program does not attempt to place celestial bodies accurately if you wish to place sun, moon, planets & stars correctly then you could possibly plug-in the SimGear Ephemeris code. Keyboard controls: left/right : turn left/right up/down arrow : look up/down up/down arrow + shift : increase/decrease altitude a/z : move forward/backward f : fullscreen w : wireframe s : solid space : toggle gui on and off q/esc : quit History: Written by Durk Talsma. Originally started October 1997, for distribution with the FlightGear project. Version 2 was written in August and September 1998. This code is based upon algorithms and data kindly provided by Mr. Paul Schlyter. (pa...@sa...). Separated out rendering pieces and converted to ssg by Curt Olson, March 2000. Moved (from SimGear) into ssgAux by Nick McEvoy, July 2003. |
From: Nick M. <nm...@us...> - 2003-07-28 11:01:22
|
Update of /cvsroot/plib/plib/examples/src/ssg/sky In directory sc8-pr-cvs1:/tmp/cvs-serv16870/sky Removed Files: sky.dsw sky.ncb sky.opt sky.plg Log Message: Not required --- sky.dsw DELETED --- --- sky.ncb DELETED --- --- sky.opt DELETED --- --- sky.plg DELETED --- |
From: Wolfram K. <wol...@us...> - 2003-07-26 11:58:47
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv20089 Modified Files: ssgSaveASC.cxx Log Message: Removing a local change and a typo Index: ssgSaveASC.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgSaveASC.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ssgSaveASC.cxx 26 Jul 2003 09:49:38 -0000 1.1 +++ ssgSaveASC.cxx 26 Jul 2003 11:58:44 -0000 1.2 @@ -21,7 +21,7 @@ */ // -// ASC (ascii files, use for example by 3DS R4 (the DOS version)) export for SSG/PLIB +// ASC (ascii files, used for example by 3DS R4 (the DOS version)) export for SSG/PLIB // Written by Wolfram Kuss in Mar-2003 // @@ -89,7 +89,8 @@ fprintf ( save_fd, "Face list:\n"); for ( j = 0; j < num_face; j++ ) { - WKSHORT i1,i2,i3; + //WKSHORT + short i1,i2,i3; vt -> getTriangle ( j, &i1, &i2, &i3 ) ; fprintf ( save_fd, "Face %d: A:%d B:%d C:%d AB:1 BC:1 CA:1\n", j, i1, i2, i3 ); |
From: Wolfram K. <wol...@us...> - 2003-07-26 09:50:46
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv32753/ssg Modified Files: ssg.cxx Log Message: Introduced *.asc writing. Index: ssg.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssg.cxx,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- ssg.cxx 29 Jan 2003 19:33:40 -0000 1.63 +++ ssg.cxx 26 Jul 2003 09:50:41 -0000 1.64 @@ -142,7 +142,10 @@ ssgAddModelFormat ( ".atg" , ssgLoadATG , ssgSaveATG ) ; ssgAddModelFormat ( ".qhi" , NULL , ssgSaveQHI ) ; ssgAddModelFormat ( ".wrl", ssgLoadVRML1, ssgSaveVRML1 ) ; - ssgAddModelFormat ( ".iv", ssgLoadIV , NULL ) ; + ssgAddModelFormat ( ".iv", ssgLoadIV , NULL ) ; + ssgAddModelFormat ( ".asc", NULL , ssgSaveASC ) ; +//ssgAddModelFormat ( ".pov", NULL , ssgSavePOV ) ; + #ifdef SSG_LOAD_MDL_SUPPORTED ssgAddModelFormat ( ".mdl", ssgLoadMDL , NULL ) ; |