Commit Graph
2232 Commits
Author SHA1 Message Date
frohlich 4a4e8c87b8 Use template arguments instead of hard coded double.
Modified Files:
	simgear/math/SGTriangle.hxx
2009-02-27 23:34:15 +01:00
frohlich f04e559dc2 Initialize uninitialized variables.
Adapt the precision bounds to what matches the expectations of IEEE math.

Modified Files:
	SGMathTest.cxx
2009-02-27 23:34:15 +01:00
frohlich 8e5e657344 Fix problem in unit quaternion return.
Modified Files:
	SGQuat.hxx
2009-02-27 23:34:15 +01:00
frohlich a4f1f62068 Make make check link again.
Modified Files:
	simgear/math/Makefile.am
2009-02-27 23:34:15 +01:00
frohlich a3e279f06f The scenery center is history for a long time now.
Remove that from the transforms.

Modified Files:
	simgear/scene/model/placement.hxx
	simgear/scene/model/placementtrans.cxx
	simgear/scene/model/placementtrans.hxx
2009-02-22 23:49:45 +01:00
frohlich d11954e80c Small cleanups, bug fixes and improovements to the geometry/math stuff.
Modified Files:
	simgear/math/SGBox.hxx simgear/math/SGIntersect.hxx
	simgear/math/SGLineSegment.hxx simgear/math/SGMatrix.hxx
	simgear/math/SGPlane.hxx simgear/math/SGRay.hxx
	simgear/math/SGSphere.hxx simgear/math/SGVec2.hxx
	simgear/math/SGVec3.hxx simgear/math/SGVec4.hxx
2009-02-22 23:49:45 +01:00
durk 812170ebce Torsten Dreyer: the rotate animation has two ways to define a axis
1. by using center/x-m and axis/[xyz]
2. by using axis/[xyz]1-m and axis/[xyz]2-m

The translate animation only supports method 1. and here comes a patch that
enables method 2 for this animations, too.
2009-02-22 23:49:45 +01:00
fredb fdd3c77298 Fix to compile with MSC 2009-02-22 23:49:45 +01:00
Tim Moore 342de209a2 Merge branch 'topic/nasal' into next 2009-02-16 00:48:00 +01:00
mfranz caeb32488e "io.flush() implementation from Melchior. Also add a final filetype
element to the io.stat() array, which has been sitting around on my
box for a while and doesn't seem to have broken anything."  -- Andy

(forward port from nasal/cvs)
2009-02-16 00:46:29 +01:00
Tim Moore ff7e70f4d5 Merge branch 'topic/gcintersect' into next 2009-02-13 10:07:15 +01:00
Tim Moore 950f51909c New getPrimitive function.
This searches for the primitive found in an OSG intersection query.
2009-02-13 09:40:05 +01:00
Tim Moore f86e6d344c Make SGSubsystemGroup::Member copy constructor private.
The copy constructor wouldn't make any sense and would confuse ownership of
the subsystem pointer. Problem noted by John Denker.
2009-02-07 00:37:47 +01:00
Tim Moore 08581282dd Merge branch 'topic/cloudz' into next 2009-02-06 19:16:19 +01:00
Tim Moore e1e47e76ec Turn off z buffer writes for clouds.
This is standard practice for semi-transparent objects and should cut down
on the flickering and other sorting artifacts.
2009-02-06 17:48:23 +01:00
fredb 3ff059848c Update MSVC 7.1 projects - Remove pthreads dependency 2009-02-04 11:07:27 +01:00
Tim Moore 22c7df5936 Merge branch 'maint' into next 2009-02-04 11:03:20 +01:00
Tim Moore 81a44d1340 Merge branch 'releng/1.9.1' into maint 2009-02-04 11:02:30 +01:00
durk 2c089e6166 Synchronize the version number with our mainantance release. simgear-1.9.1 2009-02-04 11:01:39 +01:00
Tim Moore 589dae7b0c Build trees under a transform note that is rotated to Z-up.
This allows the tree geometry to be shared across the entire scene because it
doesn't need to be rotated for each scenery tile.
2009-01-30 11:18:08 +01:00
Tim Moore 3ff13189aa Don't expand all the trees into display lists.
This can chew up large amounts of memory for questionable gains. We do
let the tree model geometry be in a display list if OSG chooses to put
it there.

Various renaming and cleanup. Save some memory by reverting
ShaderGeometry's base class back to osg::Drawable.
2009-01-30 11:17:02 +01:00
Tim Moore 7151c3fac1 Merge branch 'topic/yontree' into next 2009-01-28 07:53:38 +01:00
Tim Moore 3e023b77dd Merge branch 'maint' into next 2009-01-28 07:53:31 +01:00
durk e3fc89890c For the first time (no pun intended) in almost ten years time (again no
pun intended) that I'm touching the time library.

 Brian Schack reported that the traffic scheduler messes up the timestamps
 of the atlas network output. As it turns out, the c library functions
 asctime, and gmtime use a static copy of the tm struct to do the internal
 formatting. Our linux port of the SGTime class, incidentally, also stored
 it's master time stamp in this very same struct. Thus, formatting an
 arbitrary time value, would have the unwanted side effect of time travel.
 Usually, this would go unnoticed, because the actual time parameters would
 be updated before any damage could be done. But unwanted side effects, as
 in Brian's example could occur.

 On the MSVC port this appears to not have been a problem. Since that port
 used a copy of the tm struct to store it's master time stamps. Since the
 MSVC code also compiles cleanly on linux, it seems to be the way to go to
 use that approach. In addition, it also removes some conditional compile
 directives.

 I've only run a short test, but didn't see any undesirable side effects.
2009-01-28 07:46:55 +01:00
mfranz ce2a6cfe5c Csaba HALASZ: set _arg even if there's no <command> (crash fix) 2009-01-28 07:46:31 +01:00
Tim Moore 31d9eaf54c Use osg::Geometry code to draw trees ourselves.
This reverts back in the direction of Yon's original patch: the model is
drawn within ShaderGeometry::drawImplementation. This saves a lot of memory
over the previous approach of creating a PrimitiveSet for each model.
2009-01-28 07:43:09 +01:00
Tim Moore 781c445d14 Merge branch 'topic/modelopt' into next 2009-01-23 23:27:48 +01:00
Tim Moore 26a416399f Merge branch 'topic/yontree' into next 2009-01-23 23:27:37 +01:00
Tim Moore f7dc7f039e QuadTreeBuilder: create leaves on demand
This avoids lots of empty leaves.
2009-01-23 19:30:29 +01:00
Tim Moore 3c74fea087 Rewrite ShaderGeometry to use display lists and OSG primitives.
Based on a patch from Yon Uriarte.

Eliminate _trees list from ShaderGeometry

Use the position and scale values that are already available.
2009-01-23 19:29:18 +01:00
Tim Moore be0635bfd3 Optimize empty groups from .ac models
The OSG optimizer seems to have changed since this work was originally done.
2009-01-23 16:11:23 +01:00
Tim Moore 6723ef95c2 Merge branch 'maint' into next 2009-01-19 00:13:07 +01:00
Tim Moore 1a8fd62680 Protect against division by zero in QuadTreeBuilder
This could only happen when there's one leaf in the tree, or all the objects
happen to have the same position. Noticed by Csaba Halaz
2009-01-19 00:04:59 +01:00
Tim Moore 8b57ed46b1 Sort cloud sprites using std::sort, based on projected Z.
A "cleanup" of cloud sorting.
2009-01-16 00:37:40 +01:00
Tim Moore 25c08e56c2 Merge branch 'foo' into next 2009-01-15 22:52:11 +01:00
jmt 0f148b6ab6 Fix linkage of test programs with OpenThreads. 2009-01-15 22:49:00 +01:00
jmt 47575fe357 Commit Benoit Laniel's patch which converts more SimGear pieces to use
OpenThreads primitives directly.
2009-01-15 22:49:00 +01:00
jmt 7c14453b5a Since we're now sure 1.9.1 will not be released from trunk, here's Yon
Uriarte's patch to convert SGReferenced over to OpenThread's atomic int.
2009-01-15 22:49:00 +01:00
Tim Moore a47d5536fa Merge branch 'maint' into next 2009-01-14 22:34:20 +01:00
Tim Moore db8f7f21e8 Remove OptionsPusher and manipulation of osgDB dataFilePathList.
The bug it worked around has been fixed in the OSG ac3d loader, and changing
the path list has unpleasant multithreading implications.
2009-01-14 22:13:12 +01:00
Tim Moore 3c312c55f1 Merge branch 'maint' into next 2009-01-14 12:13:44 +01:00
Tim Moore 2d11419cba SGPropertyNode must increment / decrement the reference counter in an aliased
node.

From Csaba Halász.
2009-01-14 12:10:23 +01:00
Tim Moore 07a4508944 Merge branch 'topic/mat-anim' into next 2009-01-13 22:58:45 +01:00
Tim Moore 62913739bb Merge branch 'maint' into next 2009-01-13 22:52:19 +01:00
Tim Moore 55e9d8d944 SGMaterialAnimation: Don't install an update callback if values are static 2009-01-13 15:35:15 +01:00
Tim Moore a9439d58c7 SGMaterialAnimation: factor out update of osg::Material 2009-01-13 13:15:34 +01:00
fredb 800ad40c4c Csaba/Jester : fix the material animation and display night textures 2009-01-13 10:37:38 +01:00
Tim Moore 62864637a3 Merge branch 'maint' into next 2009-01-12 13:14:31 +01:00
fredb 4d4ac7ea24 fix end of file 2009-01-12 13:13:04 +01:00
fredb 119651482d ignore generated files 2009-01-12 13:12:50 +01:00