Commit Graph

4374 Commits

Author SHA1 Message Date
Robert Osfield
c79a7e7ad5 Work in progress on shaders support 2007-06-01 18:27:08 +00:00
Robert Osfield
78c831f850 Changed name of AnimationPathHandler to RecordCameraPathHandler 2007-06-01 10:42:24 +00:00
Robert Osfield
5a80e4bfdc From Jeremy Moles, new event handler to record the camera path. A few small tweaks by Robert Osfield to make it more consistent with the old osgProducer::Viewer behavior. 2007-06-01 10:39:27 +00:00
Robert Osfield
9b1426e47e Improved taper ratio computation 2007-05-30 17:56:43 +00:00
Robert Osfield
7b31aeca43 Added set up of overlay stateset 2007-05-30 16:36:47 +00:00
Robert Osfield
a510ecf5bd Added trapezodial fitting code 2007-05-30 14:18:33 +00:00
Robert Osfield
34fe63a74f Fixed case of when view==NULL 2007-05-30 09:25:01 +00:00
Robert Osfield
f012e4516c From Sherman Wilcox, "The issue itself occurs when a model is tessellated
that has greater than unsigned short number of vertexes. An object
called vertexPtrToIndexMap contains vertexes and their indexes. This
std::map object can obviously hold a quantity that is greater than
unsigned short, however osg::DrawElementsUShort objects were being
created to reference these vertexes and their indexes.
osg::DrawElementsUShort can only hold indexes that are 16-bit
quantities.

...

proposed_patch_2\tessellator.cpp. This solution examines the size of
vertexPtrToIndexMap and selects 1 of 3 possible osg::DrawElements
objects: DrawElementsUByte, DrawElementsUShort, or DrawElementsUInt.
The main drawback of this particular solution is the code duplication.
However, the repair is straightforward."
2007-05-29 10:31:03 +00:00
Robert Osfield
adf95c8261 Fixed handle on non ellipsoid models 2007-05-28 15:27:21 +00:00
Robert Osfield
4abacc9d3d Added project down to base implementation. 2007-05-28 13:56:26 +00:00
Robert Osfield
02d2963df4 Updated version number, wrappers and readme for release 2007-05-28 10:17:52 +00:00
Robert Osfield
49217e8a88 From Frauciel Luc, "Added support for other pointers than mouses by using a nearpoint and farpoint instead of mousex,mousey + Camera (see Dragger and Dragger.cpp).
The major modification concern the LineProjector class in Projector.cpp. The intersection was previously done in window space, I've modified it to compute it in object space."
2007-05-28 10:14:29 +00:00
Robert Osfield
c072e4adac Updated wrappers 2007-05-27 19:35:50 +00:00
Robert Osfield
9e9b9250c3 Updated wrappers 2007-05-27 18:18:17 +00:00
Robert Osfield
784383ac08 Added camera event callback support into osgViewer 2007-05-27 17:29:29 +00:00
Robert Osfield
a49ec6e78d Updated calling of master camera's update callback 2007-05-27 15:24:41 +00:00
Robert Osfield
4e3e789acf Added testing to see if camera allows events before automatically attaching a trackball manipulator 2007-05-27 14:52:43 +00:00
Robert Osfield
f290ce193d Updated wrappers 2007-05-26 16:02:28 +00:00
Robert Osfield
005268e982 Fixes to help C# binding dev. 2007-05-26 15:49:35 +00:00
Robert Osfield
27a1406819 From Blake Williams, "I discovered why the \u2013CompositeViewer option for the osghud example does not work. The run() function adds a camera manipulator to each view that does not have one assigned, which causes the view with the HUD camera to point somewhere other than where it should. I just added a check before a new default camera manipulator is added to ensure that the view allows event focus before a camera manipulator is added." 2007-05-26 15:47:53 +00:00
Robert Osfield
6b75603ace From Charles Cole, "Attached are mods to the OpenFlight plug-in to help further implement
the specification.  With these mods, blink sequences are now created for
flashing light point nodes, either palletized (v.15.8 and later) or
non-palletized (15.7 and earlier).  Thanks to Brede for his
implementation of the palletized light point nodes.

There is still work to do on adding the capability to properly handle
light point system nodes, but this does add some capability that did not
previously exist.  So, I wanted to at least submit this and I will
hopefully provide the additional capability in the near future.

I've tested the code modifications with Visual Studio 2005.  I don't
have the means to test any other operating system, but I would suspect
that there shouldn't be any issue (famous last words).  I used the test
files that I uploaded to the users forum to test the changes.

In addition to the added capability, I changed the light point node
radius to the "actualPixelSize" value in the file.  Previously, the
radius was set to half the actual pixel size (see
LightPointRecords.cpp).  Not sure why this was the case.  But, it was
brought to my attention by a co-worker who created the OpenFlight files
and was testing them with different viewers.  If there's some history
for setting the radius to half the size, then this change can be
omitted."
2007-05-26 15:42:30 +00:00
Robert Osfield
6583b5b370 From Charles Cole, "he attached code
implements the LightPointSystem class to allow for the OpenFlight
plug-in to read and handle light point system nodes.  The behavior is
very similar to the old plug-in in that a MultiSwitch node is created to
handle the "enabled" flag bit set in the node record.  The code also
reverts the changes for the actualPixelSize as mentioned above.  And
lastly, the code requires the previously submitted changes for the
plug-in.

As for the other changes, I've tested the code with Visual Studio 2005
and the files that I posted in the users forum.

With all of the submitted changes, the OpenFlight plug-in should now be
capable of loading files with light point system nodes and the use of
palletized light points and non-palletized light points.
"
2007-05-25 19:35:19 +00:00
Robert Osfield
a8cae09c30 Added s/getOverlayBaseHeight methods 2007-05-25 16:00:38 +00:00
Robert Osfield
96f0e8bd54 Added some debug message to the set/getWindowSystemInterface function 2007-05-25 15:57:59 +00:00
Robert Osfield
8a1ac890f3 Introduce C entry point support for plugin setup for better static build support 2007-05-25 15:27:06 +00:00
Robert Osfield
1676ae839f Added C entry point graphicswindow_X11() to help with static build support 2007-05-25 15:26:13 +00:00
Robert Osfield
74d19eed34 Implemnet clampping of ovleray polytope to base plane 2007-05-25 10:14:05 +00:00
Robert Osfield
27173bdf73 Changed debug message to INFO 2007-05-25 10:13:36 +00:00
Robert Osfield
80d260c472 From Colin McDonald, "The writeImage method in ReaderWriterPNM.cpp had an error checking the
accepted file extensions, so that once the plugin was loaded in the
Registry it would grab any image file write request, regardless of the
file extension.  This was a particular problem if it was statically loaded."
2007-05-24 16:11:42 +00:00
Robert Osfield
a22a7f867e Improved the polytope cutting and project calculation 2007-05-24 14:20:02 +00:00
Robert Osfield
6bf7fec64e From Olaf, "there are more dubious calls to istream::readsome instead of
istream::read. IMHO it does make no sense here and potentially breaks
this plugin."
2007-05-24 09:49:22 +00:00
Robert Osfield
babee83194 From Serge Lages, support for install api directories, with tweaks from Robert Osfield 2007-05-24 08:51:55 +00:00
Robert Osfield
6918cc69e9 Fixed brackets 2007-05-23 19:30:16 +00:00
Robert Osfield
908da298bb From Anders Backman, add -DJAS_WIN_MSVC_BUILD for Win32 build 2007-05-23 15:24:16 +00:00
Robert Osfield
58fc56aabd Made the local shaders definitions static const char to avoid multiple definiations 2007-05-23 15:14:18 +00:00
Robert Osfield
7673184d01 Added insertion of center point into object polytope 2007-05-23 14:55:59 +00:00
Robert Osfield
6a6f57ad56 Added angular sorting of the points on the plane intersecting the cut plane. 2007-05-23 13:26:21 +00:00
Robert Osfield
d4fab04128 Updated wrappers 2007-05-23 12:35:37 +00:00
Robert Osfield
bfcaba55fb Added platform specific GraphicsWindow* headers to public headers listings 2007-05-23 12:21:20 +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
e346396abd From Roger James, "Here is a small fix for the ac3d plugin geode.cpp. The fix is entirely localised to ac3d::Geode::OutputTriangleStripDARR.
It resolves an issue when processing a DrawArrayLengths with multiple lengths where the vertex indices were incorrect for all but the first chunk."
2007-05-22 14:00:51 +00:00
Robert Osfield
4613269a81 Changed the way the the InputRange is adjusted on the event state to fix bugs related to picking 2007-05-22 13:48:21 +00:00
Robert Osfield
5056f6fee6 Added osg::Camera::ProjectionResizePolicy enum and associated methods for controlling
how the field of view is adjust on window resizes.
2007-05-22 09:32:38 +00:00
Robert Osfield
d22208f701 Added extra checks to make sure that graphics operations arn't done on no longer valid graphics contexts 2007-05-21 18:46:57 +00:00
Robert Osfield
d74d62ed0b Fixed Viewer::checkWindowStatus() to work correctly when running single threaded 2007-05-21 18:17:54 +00:00
Robert Osfield
94b3a63e0c From Olaf Flebbe, "FlightGear/OSG on Windows did not load the Texture Fonts.
1) TXF Fonts are binary.
2) Do not rely on the result of istream::readsome if buffer _is_ empty
and no data have been read before."
2007-05-21 08:01:45 +00:00
Robert Osfield
d2ed03f931 Added istream:imbue(std::locale::classic()) setting to prevent non classic locals
from being used when the .osg plugin reads and writes.
2007-05-21 06:57:30 +00:00
Robert Osfield
e138b956c5 From Stephan Huber, "attached you'll find some modifications and enhancements to the carbon's
implementation of GraphicsWindow:

- usage of WindowData, you can specify an existing window to use via
osg::Traits
- implementation of setScreenResolution and setScreenRefreshRate
- implementation of setWindowDecoration when window is already created.

There seems to be  a bug regarding multiple threads and closing windows,
see my other mail on osg-users.
"
2007-05-20 13:42:41 +00:00
Robert Osfield
9497d75cc9 Added support for version of the osgPlugins directory, which now gets versioned
according to the OpenSceneGraph/CMakeLists.txt and the include/osg/Version settings.
These changes mean that the 1.9.5 release will have a libs/osgPlugins-1.9.5 directory.
2007-05-20 12:29:11 +00:00
Robert Osfield
732685d125 Fixed build error under float matrix build 2007-05-20 11:13:18 +00:00