Commit Graph

997 Commits

Author SHA1 Message Date
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
Robert Osfield
6096af0b99 From Mathieu Marache, "I tried the latest developper release 1.9.4 and found that I hadn't
the osgsimpleviewerQt4 example in my Visual studio solutions... After
looking into it it seems that you cannot have both Qt3 and Qt4
enabled. After modifying the root CMakeLists.txt to use :

FIND_PACKAGE(Qt)  which should ask you to choose betwwen Qt3 and Qt4
if you have both

instead of :

FIND_PACKAGE(Qt3)
FIND_PACKAGE(Qt4)

I had the project generated. But then due to the way CMake handles Qt4
I had to modify osgsimpleviewerQt4's CMakeLists.txt to have the binary
link with QtOpengl4. "
2007-05-15 11:31:09 +00:00
Robert Osfield
e41cd46da8 Set up new view dependent overlay technique control methods 2007-05-14 20:23:10 +00:00
Robert Osfield
74e968df76 Clean up comments and rebuilt wrappers.
Added extra event handlers to osgsimulator example
2007-05-14 16:14:40 +00:00
Robert Osfield
fac01b5a23 Replaced TARGET_ADD_LIBRARIES to TARGET_EXTERNAL_LIBRARIES for WxWidgets to avoid debug
issues
2007-05-14 16:13:33 +00:00
Robert Osfield
b97d8c0fe0 Added TerrainNode::init() and s/getTreatBoundariesToValidDataAsDefaultValue flag. 2007-05-13 09:54:51 +00:00
Robert Osfield
acb2ed177c Added ValidDataOperator base class and NoDataValue and ValidRange subclasses, and
support for it in osgTerrain::Layer and GeometryTechniqnue.
2007-05-11 18:25:06 +00:00
Robert Osfield
5e161ff0e0 Fixed CMake support for osgsimpleviewWX 2007-05-11 12:46:38 +00:00
Robert Osfield
925efc9685 From Gian Lorenzetto, osgsimpleviewWX example, CMake support added by Robert Osfield 2007-05-11 09:07:00 +00:00
Robert Osfield
4eb8427327 From Michael Hartman, " Here is the MFC_OSG example. It is very basic and the community is welcome to enhance/improve this example. There is one bug documented in the Readme.txt file that I just have not had time to solve. Also, the code is built outside of the OSG environment and uses environment variables to get to the OSG distribution headers and examples. That should be the only change a user needs to make to get the code to compile." 2007-05-11 08:19:46 +00:00
Robert Osfield
8c7b5b5865 Added supoort for transforming layers by an offset and scale 2007-05-10 18:07:54 +00:00
Robert Osfield
bd194693dd Added automatic enabling of blending when alpha value != 1.0 occur in the color
or transfer function data.
2007-05-10 12:33:56 +00:00
Robert Osfield
6c74589014 Added signOrZero template method, and to Matrix_implementation.cpp usage of this
method in the get(Quat&) code.
2007-05-09 09:26:33 +00:00
Robert Osfield
2d0fd3a645 Further work on dome correction 2007-05-08 15:32:35 +00:00
Robert Osfield
00e1af1902 Firt cut at full dome correction of wrap around movies and imagery 2007-05-08 12:18:57 +00:00
Robert Osfield
af5b6aa43e Added CartizianLocator 2007-05-03 16:23:19 +00:00
Robert Osfield
8c9ec06447 Added OpenThreads to TARGET_COMMON_LIBRARIES 2007-05-03 10:10:23 +00:00
Robert Osfield
40db1a8934 Moved VBO switching code into inline methods into osg::State to speed performance 2007-05-01 06:28:20 +00:00
Robert Osfield
efb52dfab9 Added TerrainNode::setColorFilter(layerNum,Filter) to allow developers to set
what type of texture filter to use, either LINEAER and NEAREST.
2007-04-30 09:47:35 +00:00
Robert Osfield
2929667dc4 Added using of VertexBufferObject and ElementsBufferObject classes 2007-04-26 16:50:35 +00:00
Robert Osfield
2ca0075426 Added --static and --vbo options to allow the user to toggle on/off dynamic updating
of geometry and use of vertex buffer objects.
2007-04-25 15:32:33 +00:00
Robert Osfield
ef84805d5a Added SETUP_COMMANDLINE_APPLICATION and SETUP_COMMANDLINE_EXAMPLE macros 2007-04-12 09:59:34 +00:00
Robert Osfield
2187b061fc From Eric Wing,
"Attached is a patch allows access access to the CMake MACOSX_BUNDLE
option. Now SETUP_APPLICATION and SETUP_EXAMPLE take an additional
optional parameter that specifies if the program is a command line
application or a GUI application (think: IS_COMMANDLINE_APP). Passing
1 means true (is_commandline_app). Passing 0 or omitting the parameter
means false.

I changed the scripts for osgversion and osgunittests to support this
option because I believe they are command line apps. Are there any
others?"
2007-04-12 09:33:24 +00:00
Robert Osfield
4ba0a43ffc From Eric Wing, "Minor robustness fix to osgsimpleviewerCocoa." 2007-04-12 09:18:40 +00:00
Robert Osfield
17054afc8f Changed the parameter handling so that it supports left to right inheritance of settings 2007-04-11 11:20:42 +00:00
Robert Osfield
5be86601bb Removed old GNUmakefile.inst files 2007-04-10 13:58:18 +00:00
Robert Osfield
2e6ee4bb39 Removed old gmake and VisualStudio build files 2007-04-10 13:10:25 +00:00
Robert Osfield
e2ba8d91c0 Added extra check to prevent calling frame() when the window has been closed. 2007-04-06 19:38:22 +00:00
Robert Osfield
6d7b5e7ebd From Eric Wing, pedantic warning fixes 2007-04-06 15:36:13 +00:00
Robert Osfield
abb72cc182 Removed OpenThreads reference 2007-04-04 08:06:22 +00:00
Robert Osfield
43c24da12d Added setValue method and osg::Image setup to osg::TransferFunction1D, and setup
of TransferFunction1D into osgterrain example.
2007-04-02 13:06:59 +00:00
Robert Osfield
0c44e9ac19 Added creation of basic geoemtry to test Locator and extents 2007-03-29 14:45:35 +00:00
Robert Osfield
c996c545b7 From Eric Wing, "Added the conditionals for SDLMain." 2007-03-29 09:29:26 +00:00