Commit Graph

1297 Commits

Author SHA1 Message Date
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
0598ac3b69 Updated osgwidget examples to use the new osg::clone() methods 2008-09-17 14:23:25 +00:00
Robert Osfield
6ea2adf1f5 Introduced beginings of osgVolume NodeKit. 2008-09-16 15:32:23 +00:00
Robert Osfield
b5474780c3 Change the GLSL textureRec and texture2D parameters to use .st to make sure they only use 2D coords.
Add setResizeNonPowerOfTwoHint to false for Texture2D.
2008-09-16 09:31:29 +00:00
Robert Osfield
d07f3d5662 Added optional usage of DCMTK in the dicom plugin 2008-09-15 19:59:12 +00:00
Robert Osfield
b55ed0c56b Added reading of whole directories of images 2008-09-13 13:38:06 +00:00
Robert Osfield
b000198cc4 Removed use of ints and reading from gl_FragColor in shader 2008-09-12 15:41:30 +00:00
Robert Osfield
ff299eb104 Introduced osgTerrain::WhiteListTileLoadedCallback for the management of options terrain layers 2008-09-11 13:21:58 +00:00
Robert Osfield
a214a677f8 First cut of WhiteListTileLoadedCallback 2008-09-11 10:40:48 +00:00
Robert Osfield
4f6b405edf Added support for reading source image file names from the command line. 2008-09-11 09:05:16 +00:00
Robert Osfield
b4b5b5ea41 Introduced TerrainTile::TileLoadedCallback 2008-09-10 18:11:54 +00:00
Robert Osfield
b0cf7823a7 Added playing of the imagesequence on creation of the imagesequence 2008-09-10 11:27:00 +00:00
Robert Osfield
5484981693 Removed std:: from in front of strcmp and added a string.h 2008-09-01 10:19:06 +00:00
Robert Osfield
9499cfa420 Improved the GLSL implementation. 2008-08-26 17:40:04 +00:00
Robert Osfield
6c047f7abe Added testing of max texture size using a realize operation 2008-08-25 11:37:53 +00:00
Robert Osfield
94c6c9d32a Added support for event handler for non shader path, enable alpha func 2008-08-25 10:38:39 +00:00
Robert Osfield
8d8852bc23 Added command line arguments to Viewer constructor, and added meaningful error message when no 3d image is provided 2008-08-25 09:53:24 +00:00
Robert Osfield
f5105510f3 Added support for reading the image transform from UserData in the form of a Matrix. 2008-08-22 16:35:49 +00:00
Robert Osfield
3cec676d98 Added --mip command line option which enables Maximum Intensity Projection filtering 2008-08-18 15:08:04 +00:00
Robert Osfield
38f6cddc2c Changed osg::ImageSequence::set/getDuration to set/getLength() to be in keeping with the
osg::ImageStream's getLength().
2008-08-15 16:21:44 +00:00
Robert Osfield
b6292f4537 Fixed the name of _playToggle 2008-08-15 13:07:04 +00:00
Robert Osfield
927942a0f8 Further work on osg::ImageSequence, improving pause functionality, and introducing new seek(double time) method 2008-08-15 12:45:20 +00:00
Robert Osfield
56001f3d82 Added event handler to toggling looping and play/pause 2008-08-14 16:28:45 +00:00
Robert Osfield
5cac386fa6 Renamed enums in osgWidget from ALLCAPITALS to normal OSG conventional of AllCapital 2008-07-25 20:50:42 +00:00
Robert Osfield
c9dc578186 Added support for pruning old images, recording the Duration in the .osg file, and -o filename output support in osgimagesequence. 2008-07-22 16:44:49 +00:00
Robert Osfield
66c2add024 Improved position when multiple videos are provided 2008-07-22 15:58:40 +00:00
Robert Osfield
669d6be0b2 Fixed handling of TextureCubeMap's with mipmapped/ImageSequence/PBO's. 2008-07-22 14:47:59 +00:00
Robert Osfield
041a06b89d Further work on osg::ImageSequence/osgDB::ImagePager 2008-07-21 21:00:57 +00:00
Robert Osfield
acd7e65687 Added basic image sequencing 2008-07-21 17:28:22 +00:00
Robert Osfield
dc19bcc7e0 Added --login <url> <username> <password> http authentication. 2008-07-21 15:05:08 +00:00
Robert Osfield
ac61676368 Initial cut of osgimagesequence example 2008-07-21 10:57:06 +00:00
Robert Osfield
b068777c22 Refactored the MultiTextureControl node callback so that the update is now
done as an update callback, with the elevation aquired via a cull callback
2008-07-16 15:58:15 +00:00
Robert Osfield
a20e5791d9 From Jeremy Moles, Updated file references to reflect new data in OpenSceneGraph-Data 2008-07-15 22:30:51 +00:00
Robert Osfield
8fe0820bb8 Converted tabs to four spaces 2008-07-15 22:03:59 +00:00
Robert Osfield
b343cbfc5f Removed now redundent example 2008-07-15 19:23:48 +00:00
Robert Osfield
f1138fa684 From Jean-Sebastian Guay, "Here are the CMakeLists.txt files for the osgWidget examples, changed to use SETUP_EXAMPLE like the other examples." 2008-07-15 18:53:16 +00:00
Robert Osfield
43cedf9eb4 Fixed typo 2008-07-15 18:12:17 +00:00
Robert Osfield
c2b77aa08e From Jeremy Moles, import of the osgWidget NodeKit, sourced from the original http://osgwidget.googlecode.com/svn/trunk
Notes from Robert Osfield, I've merged osgWidget trunk, and added/changed CMakeLists.txt file to make it suitable for inclusion in the core OSG, and moved imagery/scripts/shaders out into OpenSceneGraph-Data
2008-07-15 17:21:25 +00:00
Robert Osfield
ccb50019e4 Cleaned up osgkdtree example 2008-07-12 11:19:25 +00:00
Robert Osfield
2b5708888e From Adrain Egli, "i added a default scene with 7 different draggers attached. it's more easy to test the draggers." 2008-07-11 19:52:25 +00:00
Robert Osfield
15e5bdbcae Added range of camera manipulators and a center of screen test intersection that
is insticated by pressing 'c' key
2008-07-09 19:28:00 +00:00
Robert Osfield
3965fe357b Moved KdTree build code into osg::KdTree 2008-07-06 12:14:19 +00:00
Robert Osfield
44d144997e Added prelimnary KdTree data structure and automatic kdtree build support
into osgDB::Registry/osgTerrain so that newly created subgraphs can have 
KdTree built on all osg::Geometry automatically on load/creation.
2008-07-04 15:57:48 +00:00
Robert Osfield
e2ae39c8f6 Introduced bounding boxes to KDLeaf and KDNode structs 2008-07-03 17:18:14 +00:00
Robert Osfield
178d6ff423 Added new data structure + build algorithm that places triangles into leaves
without being shared, but with varying the boundaries of leaves so that they
may overlap.
2008-07-03 15:49:28 +00:00
Robert Osfield
7db303b16b Added header guards 2008-07-03 11:23:44 +00:00
Robert Osfield
f0defbd824 Refactored example so that the example will be able to run different kdtree data strucutres/algorithms. 2008-07-03 11:22:23 +00:00
Robert Osfield
1729ec0819 Implement an experiemental triangle kdtree building support 2008-07-03 10:24:20 +00:00
Robert Osfield
82ed445a31 Added Vec3Array arrange pointer to avoid dynamic cast 2008-07-01 13:56:02 +00:00
Robert Osfield
12044a43d9 From Eric Sokolowski, Cmake support for osgviewerCocoa 2008-06-26 13:08:24 +00:00