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 ...
"
"I made several modifications:
* The cause of my errors was that my OSG source directory path contains spaces. To fix this issue I wrapped all paths with quotes, as stated in doxygen documentation.
* I also received some warning messages about deprecated doxygen settings, which I fixed by updating the doxygen file, i.e. running \u2018doxygen \u2013u doxygen.cmake\u2018. By running this command deprecated doxygen options are removed, some option comments have changed and quite some options have been added (I kept their default settings unless mentioned).
* I was surprised to find that the doxygen OUTPUT_DIRECTORY was set to \u201c${OpenSceneGraph_SOURCE_DIR}/doc\u201d, which does not seem appropriate for out of source builds; I changed this to \u201c${OpenSceneGraph_BINARY_DIR}/doc\u201d. (On the other hand, maybe a cmake selectable option should be given to the user?)
* Fixed two warnings I received about unexpected end-of-list-markers in \u2018osg\AnimationPath and \u2018osgUtil\CullVisitor due to excess trailing points in comments.
* Fixed a warning in osgWidget\StyleInterface due to an #include directive (strangely) placed inside a namespace.
* Fixed a warning in osg\Camera due to the META_Object macro that confused doxygen. Adding a semi-colon fixed this.
* Removed auto_Mainpage from the INCLUDE option, because I am positive that this file does not belong there; It never generated useful documentation anyway.
* I added the OSG version number environment variable to the PROJECT_NUMBER option so that the version number is now shown on the main page of generated documentation (e.g. index.html).
* Changed option FULL_PATH_NAMES to YES, but made sure STRIP_FROM_PATH stripped the absolute path until the include dir. This fixed an issue that created mangled names for identical filenames in different directories. E.g. osg/Export and osgDB/Export are now correctly named.
* Changed option SHOW_DIRECTORIES to yes, which is a case of preference I guess.
"
paramters in its constructor to allow it to be used to create rotations around a point.
This provides the same interface and functionality as osgUtil::TransformCallback but
has the advantage and AnimationPathCallback is fully supported by the .osg and .ive file formats.
Made Matrix be a typedef to either Matrixf or Matrixd. Defaults to Matrixf.
Converted the osgGA::MatrixManipulators and osgProducer::Viewer/OsgCameraGroup
across to using exclusively Matrixd for internal computations and passing betwen
Manipulators, Producer and SceneView. Note, SceneView still uses Matrix internally
so will depend on what is set as the default in include/osg/Matrix.
Added the ability to osgProducer::setDone/getDone(), kept done() as the
method that the viewer main loop uses for detecting the exit condition.
that they arn't created on the stack inappropriately.
Split the implemention of Matrix up so that it is a simple no referenced counted
class and can be safefly created on the stack. To support referenced counting a
seperate subclass now exists, this is RefMatrix which inherits from both Matrix and
Object.
PositionAttitudeTransform, removed the equivialnt callbacks once found in these
transform classes.
Changed the NodeCallback class so its derived from osg::Object instead of
osg::Referenced to allow it to be saved out in the .osg format.
Added support for Update and Cull callbacks into the .osg file format.
Added support for AnimationPathCallback into the .osg file format.
the osgGA::AnimationPathManipulator to handle it.
Added a new Drawable::ConstAttributeFunctor and make the accept(PrimitiveFunctor)
be a const method so can disallows modification. Added Drawable::supports(...) methods
for each of the AttributeFunctor, ConstAttributeFunctor and PrimitiveFunctor so
that programs can querry whether it is possible to use functors with that object type.
the clash with the parameter type itself.
Addd a PER_PRIMTIIVE_SET handling to the existing PER_PRIMTIIVE code, this code
is still flacky though and needs a rewrite as it doens't handle all attributes or
the full consequences of per primitive and per primitive set bindings.
Converted AnimationPath so it is now subclassed from osg::Transform::ComputeTransfromCallback()
so that it can be directly attached to the scene to move objects about.
Changed the osg::SateSet::setGlobalDefaults() so that is sets GL_DEPTH_TEST
to ON.
Added guards and creation of default helper classes in osgGLUT::Viewer and
osgUtil::SceneView so that sensible defaults are used when no settings
are used of osg::State/StateSet,osgUtil::RenderStage/RenderGraph/CullVisitor.