Commit Graph

49 Commits

Author SHA1 Message Date
Laurens Voerman
628f8fd9dc added call to copy constructor for virtual base classes in copy constructor of derived classes, removed these for abstract classes 2016-08-29 10:41:40 +02:00
Robert Osfield
977ec20751 Refactored Callback system in osg::Node, osg::Drawable, osg::StateSet and osg::StateAttribute to use a new osg::Callback base class.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14244 16af8721-9629-0410-8352-f15c8da7e697
2014-06-05 16:26:13 +00:00
Robert Osfield
68412a1784 From Magnus Kessler, "remove unecessary conversion from float in double precision method" 2012-03-29 09:57:47 +00:00
Robert Osfield
14a563dc9f Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
Robert Osfield
f6517d2f8b From Alexander Wiebel, "I did some spell checking in my spare time. Here come 20 files." 2010-09-24 14:53:10 +00:00
Robert Osfield
9510df9c2e From Alan Dickinson, change methods to virtual. 2008-09-18 13:54:13 +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
9c8e44659f From Erik van Dekker,
"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.

 "
2008-08-18 11:00:40 +00:00
Robert Osfield
cac6e2facb Added continuous recording of the animation path to the RecordAnimationPathHandler 2008-05-26 17:30:43 +00:00
Robert Osfield
a64dc27595 Added clear() 2007-06-13 19:54:00 +00:00
Robert Osfield
f1c2694c17 Updated copyright years. 2006-07-18 15:21:48 +00:00
Robert Osfield
35fcaf7bde Convert tabs to spaces. 2005-11-17 17:44:48 +00:00
Robert Osfield
83d492162e Added the support in AnimationPathCallback for taking a pivot, axis and rotation rate
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.
2005-11-09 15:11:22 +00:00
Robert Osfield
290e0b6eed From Alberto Jaspe, added double precision interpolation method 2005-10-10 09:17:22 +00:00
Robert Osfield
538ced579e Removed deprecated API in preparation for 0.9.9 release. 2005-05-09 13:09:07 +00:00
Robert Osfield
678b22ce83 Updated Copyright notices to 1998-2005. 2005-04-14 21:41:28 +00:00
Robert Osfield
d268cf46fa Renamed SG_LIBRARY and SG_EXPORT macro's to OSG_LIBRARY and OSG_EXPORT 2005-04-11 17:14:17 +00:00
Robert Osfield
a0ba625cb0 Property API clean to smooth the task of generating wrappers. 2004-12-17 01:06:33 +00:00
Robert Osfield
66396e9452 Teaks to API to make it easier to generate wrappers automatically 2004-12-13 01:07:24 +00:00
Robert Osfield
a85ea0a8cc From Brede Johhansen, fixed copy and paste bug where in getInverse(..) methods 2004-09-01 08:34:49 +00:00
Robert Osfield
b855987297 From Paul Martz, typos and spelling fixes. 2004-09-01 08:15:36 +00:00
Robert Osfield
7eb3f2646e From Norman Vine (with small tweaks by Robert Osfield), build fixes for Cygwin 2004-08-04 08:27:43 +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
c46855976c Added empty() method as a convinience method for setting checking whether
an animation path contains any control points
2004-03-26 10:48:29 +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
ac812539d8 Added scale parameter into PositionAttitudeTransform.
Added pivotPoint parameter into AnimationPathCallack.
2004-02-22 11:58:44 +00:00
Robert Osfield
d2491f6750 Added AnimationPathCallback::s/getTimeOffset and s/getTimeMultiplier() methods. 2004-02-21 16:56:23 +00:00
Robert Osfield
a6541a27bf Added missing _pause(false) into AnimationPathCallback default contructor. 2004-02-20 20:47:35 +00:00
Robert Osfield
a992676a98 Added missing initialization in the AnimationPathCallback constructor. 2004-02-20 20:10:51 +00:00
Robert Osfield
d83fa3fca5 Added AnimationPathCallback::getAnimationTime() method 2004-01-31 11:34:28 +00:00
Robert Osfield
72b8e5797c Fixed for Win32 build 2004-01-13 09:47:31 +00:00
Robert Osfield
b89ec5dcf9 Changed of _firstTime intial values of 0 to DBL_MAX. 2004-01-12 13:53:04 +00:00
Robert Osfield
bc7622149d Updated to slideshow3D to support animation + pausing of animation.
Updated associated osg/osgUtil classes that provide animation pausing.
2003-11-03 23:13:31 +00:00
Robert Osfield
792bba05b9 Added new Matrixf and Matrixd implementations.
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.
2003-09-05 22:35:34 +00:00
Robert Osfield
5b93250eb0 Added support for Matrixd and Matrixf implementations, with the default
Matrix typedef's to either Matrixd or Matrixf.
2003-09-05 20:48:42 +00:00
Robert Osfield
c1b1a091fa From Tree, addition of ; after MACRO_'s to help with Java port.
From Tree + Robert, Addition of LEFT_BASE_LINE,RIGHT_BASE_LINE,CENTER_BASE_LINE
Alignment options in Text.
2003-04-27 10:58:39 +00:00
Robert Osfield
48bda9cc79 Added new Copyright/License notice to header and source files. 2003-01-21 16:45:36 +00:00
Robert Osfield
f36bc69c58 Made the more of the OSG's referenced object desctructors protected to ensure
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.
2003-01-10 09:25:42 +00:00
Robert Osfield
141f065b17 Removed the dual inheritance from the AnimationPathCallback, moving the
NodeVisitor implemention into the .cpp.

Small tweak to the lighpoint drawable implmenentation to improve the additive
blending and state resotoration.
2003-01-03 21:42:02 +00:00
Robert Osfield
fe64942c54 Added a AnimationPathCallback which can update both a MatrixTransform and a
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.
2003-01-02 20:10:04 +00:00
Robert Osfield
c6b6e200a4 Added supported for setting animation path on MatrixTransform's. 2002-12-16 09:55:30 +00:00
Robert Osfield
5eb65f65cc Added support for recording camera animation paths in osgGLUT::Viewer, and fixed
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.
2002-11-06 10:24:33 +00:00
Robert Osfield
bfd614f907 Fixed the names of the ControlPoint parameters so they weren't capitals, to avoid
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.
2002-10-10 14:58:44 +00:00
Robert Osfield
525fc2f746 Set the default values for scale to 1,1,1. This fixes the bug obsevered when
using AnimationPath with MatrixTransform without setting the scale value of
the osg::AnimationPath::ControlPoint's.
2002-10-07 20:01:28 +00:00
Robert Osfield
12226e4371 Converted the instances of const built in types being returned from methods
and passed as paramters into straight forward non const built in types,
i.e. const bool foogbar(const int) becomes bool foobar(int).
2002-09-02 12:31:35 +00:00
Robert Osfield
f9cc8783b3 Futher improvements and fixes to osg::AnimationPath, and the osglight
demo to show it action.
2002-08-13 15:31:10 +00:00
Robert Osfield
3a964a6b93 Updated docs and added osgGA 2002-07-16 20:07:32 +00:00
Robert Osfield
9574ce97d2 Updated TODO list.
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.
2002-04-21 22:05:26 +00:00
Robert Osfield
1bdebcf174 Added new osg::AnimationPath which is contaner for a set of key frames for
defining an animation path.  To be used with osg::Transform etc.
2002-02-27 00:58:54 +00:00