Commit Graph

1029 Commits

Author SHA1 Message Date
Robert Osfield
6844ac0209 Moved SimpleViewer from osgViewer into the osgviewerCocoa example directory as this
is the only place in the OSG that now relies upon SimpleViewer.
2007-06-06 10:58:21 +00:00
Robert Osfield
4c2814945e Renamed osgmultiplecameras to osgcompositeviewer 2007-06-05 19:44:11 +00:00
Robert Osfield
18b305062a Renamed osgmultiplecamrea to osgcompositeviewer 2007-06-05 19:41:22 +00:00
Robert Osfield
04d1c77d92 Added CompositeViewer support into FLTK example 2007-06-05 19:40:07 +00:00
Robert Osfield
4f5a421c81 Added support for CompositeViewer 2007-06-05 19:10:18 +00:00
Robert Osfield
6576252211 Removed setting of font resolutions and added control of threading, with the default
theading set to SingleThreading to avoid crashes associated with non thread safe
sections of osgFX - the need to be fixed!!!
2007-06-04 19:33:59 +00:00
Robert Osfield
e25f04c4db Added control of threading model, setting default to SingleThreaded to avoid crash
associated with mixing useCursor(false) and multi-threading.
2007-06-04 17:11:40 +00:00
Robert Osfield
757c3c56b2 Fixed stray control character 2007-06-04 15:11:46 +00:00
Robert Osfield
8a38f80443 Cleaned up example 2007-06-04 14:47:16 +00:00
Robert Osfield
f3ec476d9f From Martin Lavery and Robert Osfield, ported fltk example to osgViewer::Viewer 2007-06-04 14:46:38 +00:00
Robert Osfield
ac739a2e6a Added local FindFLTK.cmake to avoid problems with FLTK no being found by standard
CMake FindFLTK.cmake.
2007-06-04 13:45:58 +00:00
Robert Osfield
a9d9d387df Fixed spelling of Receives 2007-06-04 08:38:11 +00:00
Robert Osfield
b5791629ea Added Viewer::setUpViewerAsEmbeddedInWindow convinience method 2007-06-03 09:34:28 +00:00
Robert Osfield
089b9dbd88 Removed osgsimple example 2007-06-03 09:11:41 +00:00
Robert Osfield
e9258849c3 Merged the osgviewerQT3 and QT4 examples into a single osgviewerQT example, and
ported across from SimpleViewer to using Viewer
2007-06-03 09:09:09 +00:00
Robert Osfield
14d1a325e5 Changed external library specication 2007-06-03 08:58:32 +00:00
Robert Osfield
b91bd278cc Ported across from SimpleViewer to using Viewer 2007-06-02 16:23:07 +00:00
Robert Osfield
ea990dddfa Ported QT3 example across to use osgViewer::Viewer, and made it possible to use the same source for both QT3 and QT4 2007-06-02 16:01:56 +00:00
Robert Osfield
179f903c90 Added osgViewer::GraphicsWindowEmbedded and ported GLUT, SDL and WX examples across from SimpleViewer to Viewer. 2007-06-02 15:31:21 +00:00
Robert Osfield
8edb2f7284 Ported GLUT example to using osgViewer::Viewer rather than SimpleViewer by using
a local GraphicsWindowEmbedded class to help the adaption.
2007-06-02 12:03:24 +00:00
Robert Osfield
0ab50f6100 Renamed all osgsimpleviewer* files to osgviewer* 2007-06-01 22:41:11 +00:00
Robert Osfield
33b6fdd6c6 Renamed osgsimpleviewer* examples to osgviewer* in prep for replacement of SimpleViewer by Viewer 2007-06-01 22:33:05 +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
c913f00d21 From Michael Hartman, "CMakeLists.txt:
Changed this back to setup_example since WIN32 flag is now supported.

 

MFC_OSG.h:

   Added flag to indicate when the rendering thread has exited.

 

MFC_OSG.cpp:

   Code modifications to support rendering flag thread exit.

 

MFC_OSG_MDIView.cpp:

   Change to OnDestroy function to wait until we get render thread exit flag is true before we close the window.

 

 

Main Exit Process:

   User presses escape button

   Viewer captures escape button and stops threading etc.

   Viewer sets Done when shutdown is complete

   MFC Render Thread monitors viewer->done for true

   MFC Render Thread exits while loop and sets MFC Done flag

   MFC View Window monitors MFC Done flag and then closes/destroys the window

"
2007-06-01 21:28:18 +00:00
Robert Osfield
604bd9b6d7 Removed setViewUpOnScreen settings 2007-06-01 19:21:41 +00:00
Robert Osfield
8dd2c34e4d Improved the handling of the -p path option 2007-06-01 19:01:06 +00:00
Robert Osfield
e741afb5be Added recording of camera paths 2007-06-01 11:21:57 +00:00
Robert Osfield
4a4bca88f5 Added support for specifying which screen number to place the window 2007-05-29 13:28:40 +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
2528eabd0e Added --object, --ortho and --persp OverlayNode options 2007-05-28 15:44:37 +00:00
Robert Osfield
6a93e71f43 Improved the accuracy of the overlaynode settings 2007-05-28 15:17:27 +00:00
Robert Osfield
4abacc9d3d Added project down to base implementation. 2007-05-28 13:56:26 +00:00
Robert Osfield
784383ac08 Added camera event callback support into osgViewer 2007-05-27 17:29:29 +00:00
Robert Osfield
0ee956eb36 Added option for using the different overlay techniques. 2007-05-27 14:49:58 +00:00
Robert Osfield
90a24a103f Comment out the setting of single threading. 2007-05-25 19:32:15 +00:00
Robert Osfield
e775026697 Added osgstaticviewer example to demonstrate how to put a static lib built viewer 2007-05-25 15:25:39 +00:00
Robert Osfield
32931f90a8 From Luigi Calori, build fixes for Win32 build osg WxWidgets example 2007-05-25 13:15:00 +00:00
Robert Osfield
30a06a033e From Peter Hrenka, (note from Robert Osfield, renamed GenericPrimitiveFunctor mention below to TemplatePrimitiveFunctor).
"Since we desperately needed a means for picking Lines
and Points I implemented (hopefully!) proper geometrical tests
for the PolytopeIntersector.

First of all I implemented a new "GenericPrimiteFunctor"
which is basically an extended copy TriangleFunctor which also
handles Points, Lines and Quads through suitable overloads of
operator(). I would have liked to call it "PrimitiveFunctor"
but that name was already used...
I used a template method to remove redundancy in the
drawElements method overloads. If you know of platforms where
this will not work I can change it to the style used
in TriangleFunctor.

In PolytopeIntersector.cpp I implemented a
"PolytopePrimitiveIntersector" which provides the needed
overloads for Points, Lines, Triangles and Quads to
the GenericPrimitiveFunctor. This is then used in the
intersect method of PolytopeIntersector.

Implementation summary:
- Points: Check distance to all planes
- Lines: Check distance of both ends against each plane.
  If both are outside -> line is out
  If both are in -> continue checking
  One is in, one is out -> compute intersection point (candidate)
  Then check all candidates against all other polytope
  planes. The remaining candidates are the proper
  intersection points of the line with the polytope.
- Triangles: Perform Line-Checks for all edges of the
  triangle as above. If there is an proper intersection
  -> done.
  In the case where there are more than 2 polytope
  plane to check against we have to check for the case
  where the triangle encloses the polytope.
  In that case the intersection lines of the polytope
  planes are computed and checked against the triangle.
- Quads: handled as two triangles.

This is implementation is certainly not the fastest.
There are certainly ways and strategies to improve it.


I also enabled the code for PolytopeIntersector
in osgkeyboardmouse and added keybindings to
switch the type of intersector ('p') and the picking
coordinate system ('c') on the fly. Since the
PolytopeIntersector does not have a canonical
ordering for its intersections (as opposed to
the LineSegementIntersector) I chaged the
implementation to toggle all hit geometries.


I tested the functionality with osgkeyboardmouse
and several models and it seems to work for
polygonal models. Special nodes such as billboards
do not work.


The next thing on my todo-list is to implement
a an improved Intersection-Structure for the
PolytopeIntersector. We need to know
which primitives where hit (and where).

"
2007-05-23 11:05:59 +00:00
Robert Osfield
db2cef09b3 Reverting Luigi's addition of argv[1] as it breaks the build. 2007-05-21 13:15:26 +00:00
Robert Osfield
592143b018 From Luigi Calori, changed hardwired "cow.osg" paramter to argv[1] 2007-05-21 12:30:14 +00:00
Robert Osfield
9da1c67961 Converted tabs to 4 spaces 2007-05-21 12:28:25 +00:00
Robert Osfield
a441b1cf35 Made the near far ratio lower to allow one to be near the terrain before clipping
comes in to effect
2007-05-19 13:38:38 +00:00
Robert Osfield
95e77d02ec From Michael Hartman, "I have made a small change to the osgviewerMFC application that resolved most of my home computer issues. It seams that my home computer needed to have the pixel format set with PFD_DOUBLEBUFFER.
Also,  with the cmake ability you are free to remove the MFC_OSG_MDI.vcproj file.
"
2007-05-19 12:27:53 +00:00
Robert Osfield
de598bffaa From Lugi Calori, fix for Win32 build of osgsimpleviewerWX 2007-05-19 12:16:06 +00:00
Robert Osfield
79b274b3d6 Added range of CameranManipulators to allow us to navigate the scene freely 2007-05-18 09:49:30 +00:00
Robert Osfield
7a66aaca15 Added -f/--fixed option to allow use to freeze the animation of the cessna. 2007-05-18 09:43:25 +00:00
Robert Osfield
cf9518f346 Added support for View::setFustionDistance(..) 2007-05-17 19:58:57 +00:00
Robert Osfield
7f1cb32fc1 From Michael Hartman, "I have gone in and created a CMakeList.txt file for osgviewerMFC application.
Below is the changes made to the included files.  The examples CMakeList.txt file was not included but the code change needed for osgviewerMFC inclusion is listed below.

 

CMakeList.txt:

This is a little different than other example cmakelist.txt files in that I could not use the setup_example macro.   I had to go in and extract out the important parts of the macro and inline them in the CMakeList.txt file so that I could add the WIN32 declaration into the ADD_EXECUTABLE() statement.  In the future the setup_example macro might be modified to support osgviewerMFC but this is special case so you might not want to muddy the water for one example.

 

 

MFC_OSG.h:

This file had some small changes:

From: #include <osgViewer/GraphicsWindowWin32>

To:   #include <osgViewer/api/win32/GraphicsWindowWin32>

 

Also added two new function declarations

      Void PreFrameUpdate(void);

      Void PostFrameUpdate(void);

 

 

MFC_OSG.cpp:

This file changed only in that I am explicitly showing the viewer run loop and added the two new functions in the MFC_OSG.h file.

 

"
2007-05-17 11:04:57 +00:00
Robert Osfield
d80cf6b5ee Futher work on view dependent OverlayNode 2007-05-16 19:19:43 +00:00
Robert Osfield
7b644e6d82 Added -n/--no-overlay option 2007-05-15 14:53:58 +00:00