Commit Graph

31 Commits

Author SHA1 Message Date
Robert Osfield
2cf3224dd3 From Jan Pecvia, improvements to manipulators and added new manipulator to osgviewer 2010-05-27 13:59:34 +00:00
Robert Osfield
db003c12c0 Fixed 3 space indenting in headers. 2010-05-25 17:02:11 +00:00
Robert Osfield
d0f48a2712 From Jan Perciva with changes from Robert Osfield, "I am submitting improved osgGA camera manipulators.
Changes:
- new mouse wheel zoom/movement/center functionality
- ability to fix vertical axis (important for CAD)
- possibility to specify values as absolute values or relative to model size
- kind of backward compatibility by flags passed to constructor
- and much more
- restructuring classes to use kind of hierarchy and standard way of event processing (handle methods). This way, there is much more code reusability and it is more easy to develop new kinds of manipulators.

Briefly, the new architecture keeps MatrixManipulator as base abstract class. StandardManipulator is the feature-rich standard manipulator with two main descendant classes: OrbitManipulator and FirstPersonManipulator. OrbitManipulator is base class for all trackball style manipulators, based on center, rotation and distance from center. FirstPersonManipulator is base for walk or fly style manipulators, using position and rotation for camera manipulation.
"

Changes by Robert: Replaced osg::Vec3 by osg::Vec3d, introduced DEFAULT_SETTINGS enum and usage.  Added frame time member variables in prep for improving throw animation when vysync is off.
2010-05-25 12:05:13 +00:00
Robert Osfield
ff38da1290 Refactor various NodeTracker and MatrixManipulator classes to use the osg::ObserverNodePath and osg::oberserver_ptr<> classes 2010-02-15 20:15:32 +00:00
Robert Osfield
214e1b81ed Simplified throw rate code, and add throw rate compensation into zoom in/out code. 2009-06-25 18:31:43 +00:00
Robert Osfield
b1a99ba25f From Lee Bulter, "I noticed that when "throwing" things the rate of motion once thrown was
dependent on the complexity of the geometry. For complex scenes this
meant that it looked like you were "throwing" the display into molasses.
For simple geometry things get over-excited once thrown.

The fix is to factor in the frame rendering time to the caluclated
motion. I've implemented this for rotation and panning.

Now when things are thrown they maintain a rate very close to what was
happening when the mouse button was released."
2009-06-25 18:11:29 +00:00
Robert Osfield
4f72be65dc From Cory Riddell, "I added an _allowThrow bool and get / set accessors to
TrackballManipulator. The purpose of this is to disable throwing when
you release the mouse button while moving the mouse. The default
settings is true (ie, allow throw). The two source files are attached.
"
2009-04-09 14:31:15 +00:00
Robert Osfield
06ef559d91 From Martin Beckett, added get/setScrollWheelZoomDelta() support for controlling the mouse scroll wheel zoom delta. 2009-03-11 10:50:03 +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
f1c2694c17 Updated copyright years. 2006-07-18 15:21:48 +00:00
Robert Osfield
0347895c96 Fixed typo in comments and onscreen help. 2005-12-09 20:03:04 +00:00
Robert Osfield
b0869a6f60 Added s/getCenter and s/getRotation methods, and updated wrapper. 2005-11-18 15:00:34 +00:00
Robert Osfield
38a9dc51f8 From Toshiyuki Takeahei, addition of s/getDistance() methods 2005-11-18 14:49:05 +00:00
Robert Osfield
b15b677cc3 From Mikkel Gjøl, addition of paramter set/get methods to osgGA::*Manipulators,
change of ' ' to GUIEventAdapter::KEY_Space, fix to url in Matrix_implementation.cpp.
Syntax fixes by Robert Osfield to above submission fix inconsistencies with normal
OSG coding style.
2005-11-17 11:03:20 +00:00
Robert Osfield
678b22ce83 Updated Copyright notices to 1998-2005. 2005-04-14 21:41:28 +00:00
Don BURNS
5d10547ac5 Added getCameraByName method to viewer and home(double currentTime) to
MatrixManipulator, UFO, Trackball and ANimation manipulator.
2005-03-20 23:57:17 +00:00
Robert Osfield
89236b46fd From Mason Menninger, addition of setTrackballSize() parameter. 2005-01-22 16:55:48 +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
ce79e6f400 Added osgGA::TrackballManipulator::g/setMinimumZoomScale() method. 2004-03-08 11:41:57 +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
940ce67133 Removed remaining dependancies on osg::Camera. 2003-05-19 15:15:17 +00:00
Robert Osfield
11053aaa5c Change the className() functions from non const to const to be consistent with the
osg::Object definition.
2003-03-29 22:07:03 +00:00
Robert Osfield
8779fe20a7 Added help support for display help on screen to osgProducer::Viewer. 2003-03-26 12:50:30 +00:00
Robert Osfield
0d3f78350a Added keyboard mouse binding usage to the osg::ApplicationUsage and
osgGA::GUIEventHandler and its subclasses.
2003-02-19 10:43:02 +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
ac0de068d9 Changed the private: to protected: to allow easier extension. 2002-10-21 13:02:30 +00:00
Robert Osfield
fc5f07acaa Fixed the numerical accuracy problems in the Drive and Flight Manipulators. 2002-08-29 20:41:19 +00:00
Robert Osfield
44beefa9a5 Fixed numerical accuracy problem in Trackball manipulator. 2002-08-29 16:38:51 +00:00
Robert Osfield
03ee77a315 Updates, from Neil Salter, to comments etc to osgGA which add better
explanations of how each of the classes operates.
2002-08-28 14:27:18 +00:00
Robert Osfield
3a964a6b93 Updated docs and added osgGA 2002-07-16 20:07:32 +00:00
Robert Osfield
cf4a3500ec Added new osgGA - GUI Adapter library submitted by Neil Salter. This will
replace the current GUI adapter code inside osgUtil.
2002-05-09 10:31:03 +00:00