Commit Graph
100 Commits
Author SHA1 Message Date
curt ff95af0367 Add a missing source file so it will be included with "make dist". 2010-02-17 07:20:21 +01:00
curt aa9c7d5435 Add a missing .hxx file for "make dist" 2010-02-17 07:20:19 +01:00
curt f2132f6a7d Attempt to sort out the version number mess in preparation for a 1.9.0 release. 2008-12-19 20:39:59 +00:00
curt e6371cbf9c Manuel Massing:
Attached is a small fix for the sorting in CloudShaderGeometry.cxx.
I think the sorting problem stems from the osg idiosyncracy
to store transposed matrices...so the intuitive

       osg::Vec4f p = vm * osg::Vec4f(_cloudsprites[i]->position.osg(), 1.0f);

needs to be replaced with...

       osg::Vec4f p = vm.preMult(osg::Vec4f(_cloudsprites[i]->position.osg(), 1.0f);

The patch also optimizes the distance calculation - it evaluates the distances
in model space instead of eye space, which reduces computation to a dot-
product instead of a matrix multiplication.
2008-11-09 15:39:54 +00:00
curt 91e22c1fb3 Tidy up for a source code "snapshot" release. 2008-10-30 17:51:00 +00:00
curt 409db9d7ef Fix a few spelling errors. 2008-10-23 18:46:55 +00:00
curt ff654ab094 - Update SimGear.dsp
- Assign an arbitrary prerelease version number
- Fix a "make dist" problem.
2008-08-28 17:52:43 +00:00
curt 85562e8b95 argh, missed 1.8.4 in one spot. 2008-03-15 16:33:49 +00:00
curt fd34cc0b87 Simgear also enforces plib-1.8.5 in order to build. 2008-03-15 16:32:36 +00:00
curt 7ed51be4e6 In the original flightgear native/binary scenery terrain data format, we
used short's extensively to represent counts of objects (number of points,
number of texture coordinates, number of traingle strips, etc.) and we used
shorts to index into larger structures.  But this capped many of our structure
sizes to a maximum of 32768.

By switching to unsigned shorts in the future, we can double the maximum
object/index counts without losing anything.  This was a pretty major
oversight in our original specification.

I have bumped up the native object file version from 6 to 7 and added code
in the reader to maintain full backwards compatibilty with version 6
scenery files (i.e. the current 0.9.10 scenery release.)

Curt.
2007-11-05 21:42:29 +00:00
curt ccbc5abec6 Remove an extern SGSky *thesky reference that isn't used in the code anyway.
The original code forced a dependency in SimGear back to something that is
defined globaly in FlightGear, not a great strategy for a library with some
"general purpose" intentions.
2007-07-31 01:21:21 +00:00
curt e700fc6f34 I guess we aren't using explicit destructors here. 2007-05-30 12:34:24 +00:00
curt af29d3d257 Make an explicit destructor so the compiler doesn't get confused about
non matching exception types with the implicitely defined destructor.
2007-05-29 19:38:17 +00:00
curt 6fe14f7a6b Fix a compiler warning. 2007-05-16 16:08:17 +00:00
curt 786e5addd8 Fix various compiler warnings. 2007-05-16 16:07:03 +00:00
curt 7c410d36e3 wim van hoydonck:
Updated to World Magnetic Model 2005.
2006-10-28 22:12:48 +00:00
curt 811442832e Step #1 towards abandoning the original point lighting scheme in favor of
sprite based lighting.
2006-10-19 03:36:22 +00:00
curt 1bade6d796 Frederic Bouvier:
Make line feed behavior consistent between linux/windows.
2006-08-26 14:02:17 +00:00
curt 5127990a43 Additional functionality for animated point lights (i.e. approach light
rabbits, REIL, VASI/PAPI, etc.)

This allows the calling layer (i.e. FlightGear) better control over the use
of OpenGL point drawing extensions.
2006-07-21 15:45:01 +00:00
curt 40ad2b155a Updated dist content. 2006-07-12 15:08:00 +00:00
curt 76c6482495 v0.3.10 changes. 2006-04-05 18:42:45 +00:00
curt e6b0d644d4 v0.3.10-pre3 updates. 2006-03-27 18:48:36 +00:00
curt 02dc68c899 Olaf Flebbe:
Unfortunatly the original SimGear Project I submitted contained local
changes which I didn't intend to submit. Please use this file instead...
2006-03-27 16:32:15 +00:00
curt 55d951f211 Initial revision. 2006-03-24 19:06:05 +00:00
curt e264c6ad2e Updates to remove unneeded and old version of zlib source. 2006-03-23 21:59:59 +00:00
curt 036b6785f1 Remove old depricated files. There is a much newer version of zlib
available and just about every unix-based platform already comes with this.
2006-03-23 21:52:03 +00:00
curt caf5cc90ae v0.3.10-pre2 updates. 2006-03-23 16:37:35 +00:00
curt c8098b9eac Updates for v0.3.10-pre1. 2006-03-20 19:22:20 +00:00
curt 0154f81e33 Clean up some compiler warnings. 2006-02-17 15:13:42 +00:00
curt 94e1d3f0fc John Ellson:
This patch fixes this SimGear compile error on x86_64 Fedora Development with gcc-4.1:

placement.hxx:49: error: extra qualification ‘SGModelPlacement::’ on member ‘init’
2006-01-04 16:44:08 +00:00
curt 4a4e703f16 Changes for v0.3.9 (final). 2005-11-17 20:54:06 +00:00
curt 61984730ac Add a small accessor function to expose local timezone offset. 2005-11-17 15:30:07 +00:00
curt f196d3bab8 Fix a small spelling mistake. 2005-11-15 21:43:34 +00:00
curt 0e12fbb2a0 v0.3.9-pre3 updates. 2005-11-11 00:44:59 +00:00
curt baa2f49b14 v0.9.9-pre2 changes. 2005-11-09 18:47:40 +00:00
curt 8c0bd234d8 v0.9.9-pre2 changes (just the version number!) 2005-11-09 18:41:49 +00:00
curt c4fd41562f Spelling fixes and other small corrections. 2005-11-05 20:32:45 +00:00
curt a1d1b4e49f Some pre-release updates. 2005-11-05 19:30:52 +00:00
curt 96fb7a45f7 Add a code comment for future thought. 2005-11-05 18:47:29 +00:00
curt 2c14f8587e Use an unsigned vs. signed short to double our element capacity for higher
resolution scenery.
2005-10-12 16:43:26 +00:00
curt a8dd5aa0fc Fix a small typo. 2005-10-11 18:56:45 +00:00
curt 3538631e8e Make some adjustment to low level serial port configuration flags for unix. 2005-09-26 21:01:17 +00:00
curt 7f2dfaa5b4 Add eof() support to SGIOChannel/SGFile. 2005-09-24 12:28:14 +00:00
curt fd126746f7 Add an eof() method to SGFile. 2005-09-23 20:13:43 +00:00
curt f06036be09 Frederic Bouvier:
The Beaver triggered a problem ( uninitialized variable ). Here is the updated
code.
2005-01-24 21:46:12 +00:00
curt 867571af78 Frederic Bouvier:
this is the animation code that do randomisation of the spin animation. The XML tags are modified to support the syntax below :

  <use-personality type="bool">true</use-personality>
  <factor>
    <random>
      <min>1.8</min>
      <max>2.2</max>
    </random>
  </factor>
  <starting-pos-deg>
    <random>
      <min>0</min>
      <max>360</max>
    </random>
  </starting-pos-deg>

instead of usual :

  <factor>1.42</factor>
  <starting-deg-pos>42.0</starting-deg-pos>
2005-01-24 19:49:35 +00:00
curt 3b6af2f0c2 Ready for 0.3.8 release. 2005-01-18 14:34:13 +00:00
curt 5bdff41641 Require plib-1.8.4 2005-01-17 21:48:05 +00:00
curt efce88ff12 - Fix a couple oops's in cloud.cxx
- In sky.cxx blend low density cloud layers (few/scattered) into nothing (but
  don't touch visibility distance) as we approach them so we can fly through
  clean.
- For high density cloud layers (broken/overcast) we do not fade the layers
  out, but we fade visibility to nearly nothing as we approach the layer.
2005-01-11 16:02:39 +00:00
curt 01608b7e18 Add a method to SGCloudLayer to set overall cloud alpha. This gives us the
capability to slowly fade a cloud layer in or out.

We use this effect in combination with lowering visibility as we approach
a cloud layer to hide the fact that it is simply a 2d textured polygon being
drawn across the sky.
2005-01-11 15:21:58 +00:00
curt c039ccdeb0 Updates for 0.3.8-pre2 release. 2005-01-03 19:05:32 +00:00
curt 98b2ba4fc1 More prerelease updates. 2004-12-15 16:45:57 +00:00
curt 2f0afdccc1 Prerelease updates. 2004-12-15 16:34:14 +00:00
curt 709a166bd6 Oops, 2nd try ... 2004-12-02 15:08:54 +00:00
curt 8048e6297c Martin Spott: Revised handling of missing isnan() on earlier versions of
FreeBSD.
2004-12-02 15:00:26 +00:00
curt fb0dded103 Fix a typo for the Mac OSX platform. 2004-12-01 17:37:43 +00:00
curt 055e969e7a Fix a dumb bug. 2004-11-21 21:46:02 +00:00
curt f10db8a30e Fix a dumb bug for FreeBSD. 2004-11-21 21:45:35 +00:00
curt 7c60ccfc35 I don't understand why FreeBSD doesn't see isnan() after including math.h
but it doesn't.  Trying the apple approach to fixing isnan results in an
infinite loop (making me wonder what happens on OSX?)  This is an alternative
approach to checking isnan() on freebsd ...
2004-11-21 03:13:54 +00:00
curt 84cba33aab FreeBSD fix. 2004-11-20 19:11:08 +00:00
curt f30c4720ae Update a few more instances of my email address. 2004-11-19 21:47:05 +00:00
curt 7fc8c02688 My old email address is no longer valid ... point to my web page. 2004-11-19 21:44:16 +00:00
curt 54a7a0d534 Ooops, fix an unintentional line wrap. 2004-11-18 19:12:17 +00:00
curt 8d73160a75 Abstract out location of gl.h, glut.h, and glu.h includes so that we can
make the Mac platform happy since they put these in a different place compared
to the rest of the world.
2004-11-18 19:10:34 +00:00
curt 06f3cb4f8e Fix a couple bugs in openal detection. I should actually generate a new
configure and test it, rather than testing the old configure script.
2004-10-13 20:18:35 +00:00
curt 074f5ff996 Oops, missed a part of the previous change. 2004-10-13 19:52:13 +00:00
curt 8c26f32d5f Add a sanity check for the existance of OpenAL. If not there, bail from
the configure script with an appropriate/helpful message.
2004-10-13 19:51:38 +00:00
curt 9a2ee54389 Final 0.3.7 changes. 2004-10-12 14:35:42 +00:00
curt 4820d57fa8 Expose the size() method for locked and blocking thread queues. 2004-09-15 15:28:58 +00:00
curt 04e3b0b3c1 Fix another case where the direction vector is not initialized which can
lead to openal "inrange" assertions, crashing FlightGear.
2004-09-15 15:28:14 +00:00
curt a7f78b9f68 direction vector needs to be initialized, otherwise garbage data could cause
openal to generate an assertion, aborting the top level app.
2004-09-10 20:44:42 +00:00
curt f3d8eb4665 Tweaks for 0.3.7-pre1 2004-09-10 18:16:06 +00:00
curt 090f79b951 Add support for parsing an xml stream from an in memory buffer, rather than
just from a specified file name.
2004-09-10 15:57:52 +00:00
curt 461dee8657 Tweaks for official 0.3.6 release. 2004-07-29 21:36:41 +00:00
curt e2f93e6ae1 Tweaks for 0.3.6-pre3 2004-07-27 21:18:14 +00:00
curt 93314b59fb Fix a minor warning message. 2004-07-24 19:21:15 +00:00
curt 3c84b6e2f6 Tweaks for 0.3.6-pre2 2004-07-21 21:22:21 +00:00
curt 129e3c6326 Tweaks in preparation for the 0.3.6-pre1 release. 2004-07-14 22:01:15 +00:00
curt a7b35c6e22 If we pass in a position or velocity of nan, openal will generate an assertion.
Under rare circumstances we could encounter a non-cooperative external fdm
that could trigger this condition.  This patch catches the problem and returns
rather than letting FG get killed.
2004-07-01 19:05:37 +00:00
curt 0489ad7c62 Add a function to globally set volume (aka AL_GAIN) 2004-05-14 15:47:01 +00:00
curt c553570533 Oops, fix a typo. 2004-05-11 22:39:21 +00:00
curt bda112297f Frederic Bouvier:
I was not very happy with the size of the halo, so
I created a new animation to control it. Now we can
control the scale value with the distance from the
viewer to the object. The towers are now beginning to
look good. They might need some tuning though. If
you want to play, locate in radio-*.xml this code :

 <animation>
  <type>dist-scale</type>
  <object-name>RedLight.2</object-name>
  <interpolation>
   <entry><ind>0</ind><dep>0.1</dep></entry>
   <entry><ind>500</ind><dep>0.3</dep></entry>
   <entry><ind>16000</ind><dep>3</dep></entry>
  </interpolation>
 </animation>

You get the idea ? ind is the distance, dep is the
resulting scale value.
The medium tower appears brighter than the tall one,
because the lights are closer to each other. Maybe
they need a smaller scale factor at distance. Feel
free to modify these values if you find a better
setup.

About the code : I renamed flash to custtrans because the
ssg branch is now less specialized. It needs a callback
to compute the so called 'custom transformation'. It can
be used for the SGFlashAnimation and the new
SGDistScaleAnimation. So please cvs remove flash.[ch]xx and
add custtrans.[ch]xx. I also undo some of the code I send
you yesterday that was totally useless. It is replaced by
something simpler and that works.

There is also a patch to matmodel.cxx. This is not related
and was something I forgot. Its purpose is to set the
alpha test on material billboard models that are likely to
be trees to lessen a transparency weird effect with clouds.
2004-05-11 22:21:24 +00:00
curt 331a4e4406 I had overlooked a few memory allocation/deallocation issues for audio buffers.
Hopefully this helps clean those up.
2004-05-10 21:22:50 +00:00
curt a9faf8ceff Frederic Bouvier:
I modified the included animation.cxx to have a randomly displaced
time origin, to break the unison. And the flashing period is also
random as you noticed. I also put all the flashing light of the pole
in the same animation so they flash in the same rhythm.
2004-05-10 20:27:30 +00:00
curt 2866d1ace9 Frederic Bouvier:
Fix a memory leak, and brownian animation, if not motion.

I have 2 new files : personality.[ch]xx . They store the personality
data that would be deleted when the object is destroyed, instead
of staying in the animation maps. I also manage the current animation
step better and the towers are not flashing randomly now.
Makefile.am is updated.
2004-05-10 14:59:02 +00:00
curt 11a74f7a31 Frederic Bouvier:
modellib.cxx :
  Add a branch between the model and its transformation to add
 a unique identifier for the model. I called it "personality
 branch" and it maintains a "current_object" in SGAnimation.
 Animations specifically written to support it ( currently only
 the timed animation ) can add a degree of variety among the
 occurrences of the same model that would look otherwise cloned.

flash.[ch]xx :
  Better compute the view vector. The flash is now syncronized with
 its axis even at the edge of the screen.

animation.[ch]xx :
  Lots of changes :
 - add a condition to 'rotate', 'spin', 'translate' and 'range'.
  When a condition is specified *and* it evaluates to false, the
  animation becomes a no-op. Possible usage : no rotation during
  daylight, LOD range variable along the day, ...

 - use different durations for each branch in the timed animation.
  Enable the use of multiple <branch-duration-sec>, one for each
  <object-name> specified. Usage : strobes with flash light.

 - allow randomization of the <branch-duration-sec>, by using
  <random><min>_min_value_</min><max>_max_value_</max></random>.
  The value computed once is between _min_value_ and _max_value_.

 - implement model personality in timed animation. If
  <use-personality type="bool">true</use-personality> is specified,
  a different set of duration is created for every model in the
  scenegraph using this animation. Best if used with randomization.
  When using strobes where the population of the same object is
  dense, it avoids the "cheasy" clone effect.
2004-05-10 14:35:58 +00:00
curt 9f06c8df76 Hopefully fix a chicken/egg linking problem for people who've never built
or installed simgear before.
2004-04-29 21:14:44 +00:00
curt 6e511de7db Add support for specifying a positional offset relative to the listener.
This allows us to "place" cockpit sounds.  For example, we can make left
engine sound come out of the left speaker, right engine out the right
speaker, etc.
2004-04-28 20:37:49 +00:00
curt e34aae9982 Add default openal libs for cygwin. 2004-04-28 19:19:05 +00:00
curt 675b388b8e Lower verbosity level. 2004-04-28 03:59:10 +00:00
curt 7d239fe4ac Expose the ability to specify how the sound volume fades relative to
distance from the listener.  This let's us configure "interior" cockpit
sounds versus "exterior" engine type sounds.
2004-04-28 03:57:13 +00:00
curt edd92caba1 Tweak default source audio parameters. 2004-04-27 21:11:21 +00:00
curt 5c3b4abf42 Expose some of the positional components of the OpenAL API. 2004-04-27 20:45:58 +00:00
curt 4399383781 Oops, one addtional tweak. 2004-04-26 22:07:19 +00:00
curt bb383998bb Update the SoundSample api so we can request that a copy of the sample be
kept in memory and accessible.
2004-04-26 22:02:14 +00:00
curt ffeb174ca1 Give these two methods slightly less misleading names. 2004-04-26 16:17:21 +00:00
curt a90d74dde8 David Luff:
Fix comments for two functions.
2004-04-26 15:55:29 +00:00
curt 9d7fd79e76 Missed one fix for Mac OS. 2004-04-26 14:55:27 +00:00
curt 6f29d234eb Lower the verbosity in a couple other spots. 2004-04-25 02:30:52 +00:00
curt 6f5517f602 Lower verbosity. 2004-04-25 02:02:35 +00:00