Commit Graph
164 Commits
Author SHA1 Message Date
ThorstenB 7b0c25f91e #83: John Denker: Set correct file modes
Sources shouldn't be executable.
2011-02-19 11:54:10 +01:00
Torsten Dreyer e988dc0e42 Fix bug in SGMisc<T>:: normalizePeriodic()
SGMisc<T>::normalizePeriodic(min,max,value) returned zero for
all values less than min.
Example:
A call of normalizePeriodic(0,twopi(),-pi()) returned zero
where the correct value would be 3*pi().
2011-01-17 19:51:29 +01:00
James Turner b9a34b1b05 Initial work on CMake support for SimGear. 2010-12-19 14:16:39 +00:00
ThorstenB 9f88b077ee remove old .cvsignore files
Hello GIT!
2010-11-14 15:09:36 +01:00
Tim Moore bfe953c18d replace glu functions with equivalents from OSG 2010-10-08 23:44:38 +02:00
James Turner d31c1df639 More ignore files, for 'make check' binaries 2010-08-08 09:55:31 +01:00
James Turner aa859c488f Remove deprecated vector classes - finally! 2010-07-30 00:46:30 +01:00
James Turner 7beaf3705e Add closest-point calculation to SGRay, to replace a vector.h helper. 2010-07-23 13:04:09 +01:00
James Turner dd044844e5 Add radial intersection code to SGGeodesy, and test coverage for geocentric helpers. 2010-06-14 10:15:44 +01:00
James Turner 0c8c596ee5 Fix longitude sign convention of geocentric routines
(derived from the Williams aviation formulary, with W longitude +ve)
2010-06-11 18:38:43 +02:00
Mathias Froehlich f161f78a33 Add a tight and cheap method to represent a rotation.
Adapt tests for that new method.
2010-05-17 23:13:59 +02:00
frohlich 490dad7838 Provide a more exact sphere/box test.
Modified Files:
	simgear/math/SGIntersect.hxx simgear/math/SGBox.hxx
2010-05-05 09:43:32 +02:00
fredb 3dcffc7df8 MINGW patch from Benoît Laniel 2010-01-25 14:35:45 +01:00
Tim Moore 0710b781d3 Merge branch 'torsten/geoequal' 2010-01-25 14:01:52 +01:00
torsten 6c14e7127d add "operator == ()" to SGGeod and SGGeoc 2010-01-03 10:10:32 +01:00
jmt 578af00b0d Allow geocentric distance computations to return radians. 2010-01-03 10:10:02 +01:00
Tim Moore b1c49045a8 forward declare Point3D in sg_types.hxx
This avoids sucking in SGMath.hxx -- and therefore a bunch of OSG headers --
into many compilation units.
2009-10-18 12:11:13 +02:00
torsten bcf727cf58 Catch a possible floating point error in SGGeodesy::SGCartToGeod() for cartesian coordinates close to the geocenter region. 2009-09-22 22:44:38 +02:00
frohlich 4f802689f2 Correct finite precision issues.
Use consistent function names.
Implement changes consistently over the different vector sizes.

Modified Files:
	SGVec2.hxx SGVec3.hxx SGVec4.hxx
2009-09-17 12:21:42 +02:00
John Denker ccf0ba50c4 Implement vector _projection_ functions. 2009-09-09 23:28:16 +02:00
frohlich 795d481ca6 Switch to new vector conversion functions.
Modified Files:
	simgear/math/SGGeod.cxx simgear/math/SGQuat.hxx
	simgear/math/SGVec2.hxx simgear/math/SGVec3.hxx
	simgear/math/SGVec4.hxx simgear/scene/material/Effect.cxx
	simgear/scene/model/SGInteractionAnimation.cxx
	simgear/scene/model/SGMaterialAnimation.cxx
	simgear/scene/model/SGRotateTransform.cxx
	simgear/scene/model/SGScaleTransform.cxx
	simgear/scene/model/SGTranslateTransform.cxx
	simgear/scene/model/animation.cxx
	simgear/scene/model/particles.cxx
	simgear/scene/model/placement.cxx
	simgear/scene/model/shadanim.cxx
	simgear/scene/sky/CloudShaderGeometry.cxx
	simgear/scene/sky/cloud.cxx simgear/scene/sky/cloudfield.cxx
	simgear/scene/sky/dome.cxx simgear/scene/sky/sky.cxx
	simgear/scene/tgdb/GroundLightManager.cxx
	simgear/scene/tgdb/SGOceanTile.cxx
	simgear/scene/tgdb/SGTexturedTriangleBin.hxx
	simgear/scene/tgdb/SGVasiDrawable.cxx
	simgear/scene/tgdb/TreeBin.cxx simgear/scene/tgdb/obj.cxx
 	simgear/scene/tgdb/pt_lights.cxx
	simgear/scene/util/SGUpdateVisitor.hxx
2009-09-09 08:39:55 +02:00
frohlich f141cc28b0 Add some comments.
Make sure floating point constants do not introduce useless upcasts.
Remove now unused and not really usefull method.

Modified Files:
	simgear/math/SGQuat.hxx
2009-09-05 17:01:58 +02:00
frohlich ce54997be5 Should be now more easy to make use of SGMath without having osg.
Modified Files:
	simgear/scene/sky/dome.cxx simgear/math/SGGeod.cxx
	simgear/math/SGGeod.hxx simgear/math/SGQuat.hxx
	simgear/math/SGVec2.hxx simgear/math/SGVec3.hxx
	simgear/math/SGVec4.hxx
2009-09-05 17:01:58 +02:00
torsten e782adef94 Avoid NAN due to floating point rounding errors 2009-08-23 21:37:03 +02:00
torsten 992a057a1b warning fix (multiline comment) 2009-08-23 21:37:02 +02:00
torsten 2c07222ef6 warning fixes 2009-08-23 21:37:02 +02:00
fredb 7e7d877874 Fix case typo 2009-07-27 23:47:15 +02:00
fredb efa2876e29 Compile latest SimGear under MSVC9 2009-07-27 23:47:15 +02:00
frohlich 75c2a45b25 Add some trailing spaces ...
Modified Files:
 	./simgear/math/SGIntersect.hxx
2009-06-23 10:42:42 +02:00
fredb f4a527c57c Add a simple class to subdivide Bezier curves 2009-06-15 10:23:22 +02:00
Tim Moore 7e7ce2f38e Merge branch 'maint' into next 2009-05-18 00:34:06 +02:00
mfranz f91d96b51a - fix one broken #include path (in a not usually compiled test app)
- turn four #include paths from the "foo" form to <foo>

The quotes form is normally only used for headers with path relative
to the including file's path, though the standard doesn't strictly
mandate this. This is consistent with the rest of sg, it makes the
code's intent clearer and helps to find headers. (And it's a few
milliseconds faster, too.)
2009-05-16 16:18:37 +02:00
frohlich 61084cf1ba Make triangle sphere intersection tests usable with mixes types.
Modified Files:
	simgear/math/SGIntersect.hxx
2009-03-18 07:53:50 +01:00
frohlich 06ad73f85b Add convenience function to keep position with just an other elevation.
Modified Files:
	simgear/math/SGGeod.hxx
2009-03-11 20:06:56 +01:00
fredb 9b67f52d56 SGMatrix<T>::preMultTranslate should return self ( as postMultTranslate do ) 2009-03-05 10:32:06 +01:00
frohlich e417903c23 Additions for the boundingvolumes
Modified Files:
	SGGeometryTest.cxx SGIntersect.hxx SGLineSegment.hxx
	SGTriangle.hxx
2009-03-05 10:32:05 +01:00
frohlich 19bc1e6313 Initialize random number for the tests.
Define the triangles center by the weighted sum of the vertices.

Modified Files:
	SGGeometryTest.cxx SGTriangle.hxx
2009-02-27 23:34:15 +01:00
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 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
timoore ecf0a1a736 Fix include path 2009-01-08 23:06:23 +01:00
jmt 94942d1ac4 Add some syntactic helpers to allow distance/course to be queried between
two geodetic points. This still entails a full _geo_inverse_wgs_84 call,
but makes call sites neater.
2009-01-08 23:05:12 +01:00
ehofman d4c7e95092 Replace SG_USE_STD() by using std:: 2008-07-28 07:52:13 +00:00
ehofman 733e6fa14f Reduce compiler.h to almost nothing (but it's worth keeping around I think, for
the MSVC and MipsPro warning stuff).

As a result of this patch, simgear/sg_traits.h can be deleted. So can SGCMath.h,
but I'll do that separately.

There is one more 'mechanical' change to come - getting rid of SG_USING_STD(X),
but I want to keep that separate from everything else. (There's another mechnica
l change, replacing <math.h> with <cmath> and so on *everywhere*, but one step a
t a time)
2008-07-25 18:35:40 +00:00
ehofman cd72eb20c6 Attached patches remove BORLANDC, and hence SG_MATH_EXCEPTION_CLASH and SG_INCOM
PLETE_FUNCTIONAL from SimGear and FlightGear.

As a result, SG_HAVE_STD_INCLUDES is now *always* set, so I will get the boring
fixes for that done, but separately. I'm still auditing the other things in comp
ilers.h - there's a lot that can die now BORLAND is gone.
2008-07-25 10:39:20 +00:00
timoore d219c5c4c6 Don't include <iostream> and "using" declarations in header files
<iostream> sucks in expensive initialization of the standard streams
and isn't appropriate in a header file. Use <istream> and <ostream>
instead.

using declarations should never appear at global scope in a header
file; source files get to decide what they want to use in their
namespace.
2008-06-02 20:21:27 +00:00
timoore c7dab4abea rewrite of sky dome code
Add more points to the dome, giving it a dome shape rather than a
dunce cap shape.

Represent as OpenGL DrawElements instead of as triangle strips.

Only calculate have the sky colors and reflect those across the dome.
2008-04-14 21:44:21 +00:00
timoore 600726976c Add methods to SGGeod to return OSG Matrix objects for local frames.
Methods have been added for Z down (simulation) and Z up frames.
2008-03-04 08:53:27 +00:00