]> git.mxchange.org Git - flightgear.git/commit
Randomly-place object overhaul and enhancements
authordavid <david>
Sat, 20 Jul 2002 14:56:37 +0000 (14:56 +0000)
committerdavid <david>
Sat, 20 Jul 2002 14:56:37 +0000 (14:56 +0000)
commit29268401b2bfcbcb6d85ea3dac8b8b244366ce1b
treebe83b81392d0314ab6a2b2e374ae9fdd77ca53d2
parentcecedd302b40938869d19b0436b69f75a841a7f0
Randomly-place object overhaul and enhancements
-----------------------------------------------

Fixed a segfault on exit.

Changed the radius of the dummy bounding sphere from 10m to 1000m to
ensure that FOV culling doesn't leave anything out.

Allow an object to have more than one variant model, which will be
chosen randomly.  Simply repeat the <path>...</path> property.

Removed the <billboard> property and replaced it with <heading-type>,
which can be set to "fixed" (leave the model oriented as it is),
"random" (give the model a random heading between 0 and 359 deg), or
"billboard" (always turn the model to face the camera).  The default
is "fixed".  Models look much better when they are not all facing the
same direction.

Allow the user to group models with the same visual range, so that
there can be *many* fewer nodes in the scene graph when the models are
not visible.  This causes an XML-format change, so that instead of

  <object>
   <range-m>...</range-m>
   ...
  </object>
  <object>
   <range-m>...</range-m>
   ...
  </object>
  ...

we now have

  <object-group>
   <range-m>...</range-m>
   <object>
    ...
   </object>
   <object>
    ...
   </object>
   ...
  </object-group>

Every object in a group can still have its own model(s), coverage, and
heading-type, but they all share the same range selector.

This change should already help users with tight memory constraints,
but it will matter much more when we add more object types -- for
example, we can now add dozens of different urban building types
without bloating the scene graph or slowing down the LOD tests for
tris that are out of range (i.e. most of them).
src/Objects/newmat.cxx
src/Objects/newmat.hxx
src/Objects/obj.cxx