Commit Graph

59 Commits

Author SHA1 Message Date
Robert Osfield
734463fcc7 Warning fixes 2009-02-03 15:28:53 +00:00
Robert Osfield
418dc34776 Fixed warnings 2009-01-07 11:24:47 +00:00
Robert Osfield
9b1445d5b9 Fixed warnings 2008-12-18 13:56:30 +00:00
Robert Osfield
720551d549 From Michael Platings, Converted std::fstream/ifstream/ofstream to osgDB::fstream/ifstream/ofstream and
fopen to osgDB::fopen to facilitate support for wide character filenames using UT8 encoding.
2008-11-07 15:08:08 +00:00
Robert Osfield
5a9e957412 Added docs for read-threads <numthreads> command line options 2008-09-26 13:51:49 +00:00
Robert Osfield
4cb79dcddf From Jean-Sebastian Guay, fixed windows build 2008-09-24 16:03:47 +00:00
Robert Osfield
edc966c4c2 Added "serialize" and plugin "preload" options in the "read-threads" code path. 2008-09-23 15:41:49 +00:00
Robert Osfield
1b02cf99dc Added read-threads <numThreads> command line and read thread test back end 2008-09-23 13:58:49 +00:00
Robert Osfield
22eae68e48 From Mathias Froehlich, "This is a generic optimization that does not depend on any cpu or instruction
set.

The optimization is based on the observation that matrix matrix multiplication
with a dense matrix 4x4 is 4^3 Operations whereas multiplication with a
transform, or scale matrix is only 4^2 operations. Which is a gain of a
*FACTOR*4* for these special cases.
The change implements these special cases, provides a unit test for these
implementation and converts uses of the expensiver dense matrix matrix
routine with the specialized versions.

Depending on the transform nodes in the scenegraph this change gives a
noticable improovement.
For example the osgforest code using the MatrixTransform is about 20% slower
than the same codepath using the PositionAttitudeTransform instead of the
MatrixTransform with this patch applied.

If I remember right, the sse type optimizations did *not* provide a factor 4
improovement. Also these changes are totally independent of any cpu or
instruction set architecture. So I would prefer to have this current kind of
change instead of some hand coded and cpu dependent assembly stuff. If we
need that hand tuned stuff, these can go on top of this changes which must
provide than hand optimized additional variants for the specialized versions
to give a even better result in the end.

An other change included here is a change to rotation matrix from quaterion
code. There is a sqrt call which couold be optimized away. Since we divide in
effect by sqrt(length)*sqrt(length) which is just length ...
"
2008-09-17 16:14:28 +00:00
Robert Osfield
5711964481 Added unit test to smoke out a thread issue with using ofstream("/dev/null") inside
osg::notify()
2008-06-03 11:28:16 +00:00
Robert Osfield
daef0f64f2 From Jose Delport, "attached is a version of osgunittests that does not give false alarms
for the case where q1 = -q2. The output of 'osgunittests quat' is now
much cleaner.
"
2008-03-13 16:38:05 +00:00
Robert Osfield
f4afa427a7 From Roland Smeenk, "Attached you will find a large set of small typo fixes (mainly in the comments)." 2007-12-10 17:30:18 +00:00
Robert Osfield
5b305e37b0 From Mathias Froehlich, "Attached is a changed version of osgunittests.cpp. The __FUNCTION__
macro/string value is not portable. Instead the functions name is just put
into the string."
2007-12-06 17:01:22 +00:00
Robert Osfield
3d7fbeca28 Added testPolytope entry 2007-12-04 14:43:14 +00:00
Robert Osfield
d8cbd49471 Added thread unit test to test the create, start and destruction of threads 2007-09-25 10:18:50 +00:00
Robert Osfield
5817d4c83e From David Spilling, tweaked quat tests to reproduce getRotate errors. 2007-08-27 09:51:24 +00:00
Robert Osfield
cc0f1cb0fe From Martin Lavery and Robert Osfield, Updated examples to use a variation of the MIT License 2007-06-12 14:20:16 +00:00
Robert Osfield
0f132ab21e Added support for using quat_scaled sx sy sz for testing getting quats from scaled
matrices.  Removed broken Matrixd/quat test
2007-06-07 11:05:59 +00:00
Robert Osfield
9a0b39c34b From J.P Delport, "attached find an updated osgunittests.cpp that allows for the testing of
the matrix.getRotate() function when a matrix contains a scale as well
as a rotation.

The scale can optionally be switched off, see the top of
testQuatFromMatrix().

As expected, all the current methods for mat to quat conversion fail
these new tests. When the scale is omitted, mk2 of getRotate with sign
instead of signOrZero passes, as well as mk1.
"
2007-06-01 21:38:53 +00:00
Robert Osfield
11df762e08 From Olar Flebbe, "Visual Studio 2005 triggered a small glitch in UnittestFramework.cpp
Do not derefence it2 if it is at end()."
2007-05-29 09:57:18 +00:00
Robert Osfield
6c74589014 Added signOrZero template method, and to Matrix_implementation.cpp usage of this
method in the get(Quat&) code.
2007-05-09 09:26:33 +00:00
Robert Osfield
ef84805d5a Added SETUP_COMMANDLINE_APPLICATION and SETUP_COMMANDLINE_EXAMPLE macros 2007-04-12 09:59:34 +00:00
Robert Osfield
2187b061fc From Eric Wing,
"Attached is a patch allows access access to the CMake MACOSX_BUNDLE
option. Now SETUP_APPLICATION and SETUP_EXAMPLE take an additional
optional parameter that specifies if the program is a command line
application or a GUI application (think: IS_COMMANDLINE_APP). Passing
1 means true (is_commandline_app). Passing 0 or omitting the parameter
means false.

I changed the scripts for osgversion and osgunittests to support this
option because I believe they are command line apps. Are there any
others?"
2007-04-12 09:33:24 +00:00
Robert Osfield
5be86601bb Removed old GNUmakefile.inst files 2007-04-10 13:58:18 +00:00
Robert Osfield
2e6ee4bb39 Removed old gmake and VisualStudio build files 2007-04-10 13:10:25 +00:00
Robert Osfield
6d7b5e7ebd From Eric Wing, pedantic warning fixes 2007-04-06 15:36:13 +00:00
Robert Osfield
d9a94f7890 Moved the TARGET_NAME setting into the SETUP_APPLICATION/EXAMPLE macro 2007-03-19 17:18:59 +00:00
Robert Osfield
da64127539 Ran dos2unix on CMakeLists.txt files. 2007-03-19 13:26:34 +00:00
Robert Osfield
be3f61c49f From Luigi Calori, move to using local CMakeLists.txt files and explicit file lists.
From Robert Osfield, small ammendments of the above to seperate example and application installs, and fix the osgPlugins install directory.
2007-03-19 12:30:26 +00:00
Robert Osfield
eb4ad4229f Moved osgProducer and osgproducerviewer out into their own repository.
Clean up the source for remaining references to osgProducer/Producer.
2007-02-27 13:16:18 +00:00
Robert Osfield
b121c9686f Ported following examples to osgViewer:
osgteapot
osgtessellate
osgtext
osgtexture1D
osgtexture2D
osgtexture3D
osgtexturerectangle
osgvertexprogram
osgvolume
osgwindows
osgsimple
osgkeyboardmouse
2007-01-11 15:19:59 +00:00
Robert Osfield
47d1404c2b Removed now redundent OSG_EXPORT to solve build problems under Windows 2006-12-22 16:48:17 +00:00
Robert Osfield
c9c2950759 Moved UnitTestFramework from core osg lib into osgunittests example 2006-12-19 17:06:59 +00:00
Robert Osfield
d1b14abb91 Added sizeof(short int) 2006-08-23 13:18:22 +00:00
Robert Osfield
564ee34f76 Added Matrix*::getRotate()/setRotate(Quat), deprecating Matrix*::get(Quat&), Matrix*::set(Quat&) 2006-07-31 17:31:21 +00:00
Robert Osfield
f977d7c606 Updated osgunittests with a matrix invert unit test, and added a conditional
calling of invert_4x4 or invert_4x3 depending on the the right hand column of the matrix.

Updated wrappers
2006-07-28 13:48:08 +00:00
Robert Osfield
032bba78fa From J.P. Delport, added units tests to pick up on erroneous Matrix::get(Quat&) computation. 2006-07-27 11:13:56 +00:00
Robert Osfield
b6b9e4bc7e fixed warning and add a few extra tests 2006-07-04 09:46:41 +00:00
Robert Osfield
c986f6ea41 Added a performace test section to osgunitests, currently just does basic C/C++ tests. 2006-07-03 13:53:39 +00:00
Robert Osfield
69cd27e37f Added sizeof(std::string) test to osgunittests 2005-06-08 10:39:43 +00:00
Robert Osfield
3953190dfe Fixed typo in testLookAt debug info. 2005-04-17 19:14:32 +00:00
Robert Osfield
21ea5a55a8 Added #include <osg/io_utils> 2005-04-08 09:51:56 +00:00
Robert Osfield
8176434fc6 Added size of Mutex. 2005-02-22 14:42:14 +00:00
Robert Osfield
355650ac1d From Nicolas Brodu, new faster osg::Quat::makeRotate(Vec3d,Vec3d) implmentation.
From Robert Osfield, modes to osg::Quat to keep the original implmentation around
as makeRotate_original(,) and added tests into osgunittest to test the new
methods provide equivilant results to the original implemementation.  The
orignal implementation will be removed once the new method is more widely tested.
2005-01-27 14:39:58 +00:00
Robert Osfield
d397b5b90b Added sizeof tests of istream::pos_type and off_type to osgunittests.
Added debuggin messages to endian handling code in Archive::open().
2004-11-10 21:28:06 +00:00
Robert Osfield
c22f24f57a Added test for quat multiplication ordering. 2004-08-03 19:00:33 +00:00
Robert Osfield
f02c75f5ea Added Vec2d, Vec3d and Vec4d classes, and remapped Vec2, Vec3 and Vec4 to
Vec2f, Vec3f an Vec4f respectively, with typedef's to the from Vec* to Vec*f.
2004-05-20 10:15:48 +00:00
Robert Osfield
4aa7afedf3 Removed include <iostream> where possible, replacing with istream or ostream and changing
std::cout/cerr to osg::notify().
2004-03-03 13:27:21 +00:00
Robert Osfield
7d69f8e193 Added getPerspective() method to Matrix* and SceneView 2003-09-29 13:14:34 +00:00
Robert Osfield
fe5e6d14de Added test of sizeof(types) - run osgunittests sizeof. 2003-09-02 20:03:01 +00:00