Commit Graph

4568 Commits

Author SHA1 Message Date
Robert Osfield
c4b3e32436 Updated wrappers 2007-06-24 10:55:43 +00:00
Robert Osfield
1e506da145 From Trajce Nikolov, PixelBufferWin32 implementation 2007-06-24 10:18:54 +00:00
Robert Osfield
b9947a8189 Simplified decoration code and added support for reading Traits::supportsResize 2007-06-23 21:55:35 +00:00
Robert Osfield
581b1c322e Added setting of the Camera's projection matrix to fit the windowing aspect ratio. 2007-06-23 11:21:54 +00:00
Robert Osfield
1b3468413d Added ability to compile OpenGL objects via pbuffers in the DatabasePager/Viewer 2007-06-22 14:48:18 +00:00
Robert Osfield
e8a65e4cff From Trajce Nikolov, windows build fixes 2007-06-21 11:20:54 +00:00
Robert Osfield
4677fe20a7 Added dummy init method 2007-06-20 12:34:37 +00:00
Robert Osfield
1de128de27 Added placeholder for PixelBufferWin32 2007-06-20 12:29:19 +00:00
Robert Osfield
9f72c9392e Added code of support for contouring shaders 2007-06-20 12:00:29 +00:00
Robert Osfield
fadc115066 Updated wrappers 2007-06-20 11:59:53 +00:00
Robert Osfield
78b6ada743 Completed implementation of PixelBufferX11. 2007-06-20 11:59:27 +00:00
Robert Osfield
ac69f49b55 Added beginnings of osgViewer::PixelBufferX11 2007-06-19 17:12:05 +00:00
Robert Osfield
d4309ce69a Added use of GLSL filters 2007-06-18 12:10:46 +00:00
Robert Osfield
cff9188caf Fixed namespace 2007-06-15 16:08:33 +00:00
Robert Osfield
bd6a001dcc Added default values for ambientBias 2007-06-15 14:57:17 +00:00
Robert Osfield
c9513f2ec6 Removed now redundent file 2007-06-15 14:02:55 +00:00
Robert Osfield
f423c7660f Fixed handling of cases when no matrix is attached to intersections 2007-06-15 13:12:46 +00:00
Robert Osfield
08d3b13430 Added ShadowMap::s/getAmbientBias, updated NEWS and wrappers 2007-06-15 12:59:22 +00:00
Robert Osfield
314a22d553 Changed the version format. 2007-06-15 12:41:46 +00:00
Robert Osfield
4979a0ac41 Added handling of when mouse delta is too high, indicating a inconsitency in the
the events.  These changes prevent irratic high speed spinning when releasing the
mouse point in a different screen from when the mouse event started.
2007-06-15 10:12:57 +00:00
Robert Osfield
10235ad0b4 Fixed null pointer derefence bug 2007-06-15 09:29:23 +00:00
Robert Osfield
9c3ae6f3c2 Addded missing namespace 2007-06-15 08:36:35 +00:00
Robert Osfield
f61c6262f7 Included shaders directly into source, added support for toggle lighting on/off 2007-06-14 20:58:43 +00:00
Robert Osfield
97b53024d4 Fixed typo 2007-06-14 19:17:31 +00:00
Robert Osfield
60af7de2d3 Updated wrapers, changelog, README and AUTHORS files for 1.9.9 release 2007-06-13 21:15:04 +00:00
Robert Osfield
56a24486cd Updated wrappers and Version numbers for 1.9.9 release 2007-06-13 21:00:28 +00:00
Robert Osfield
a9287fe824 Added ability to set the keyboard bindings in the RecordaAnimationPathHandler 2007-06-13 20:52:07 +00:00
Robert Osfield
21033536a7 From Jeremy Moles & Robert Osfield, Added support for playback of animation paths using 'Z' key 2007-06-13 20:34:16 +00:00
Robert Osfield
8c727acddc Added new shader support 2007-06-13 19:53:48 +00:00
Robert Osfield
aab2ed9094 From John Shue, fixed typo in CMakeLists.txt 2007-06-13 19:44:56 +00:00
Robert Osfield
b8f9364cef Wired up new shaders 2007-06-13 14:05:21 +00:00
Robert Osfield
d2c16c2fa0 Added better handling of 0,0,0 values 2007-06-13 13:41:23 +00:00
Robert Osfield
29be5312a0 Added OSG_SCREEN and OSG_WINDOW env var checking in the Viewer::realize() 2007-06-13 11:09:31 +00:00
Robert Osfield
6f95508df8 Updated wrappers 2007-06-13 10:45:36 +00:00
Robert Osfield
a9a55de053 Added osgViewer::View::setUpViewInWindow(...) method and command line option into
osgViewer::Viewer to allow you to specify the window dimentions and screen for
the window on startup.
2007-06-13 10:38:40 +00:00
Robert Osfield
1625360b63 Fixed versioning 2007-06-13 10:12:55 +00:00
Robert Osfield
7016db5f26 Removed ParallelSplitShadowMap as its currently a non op. 2007-06-13 09:56:12 +00:00
Robert Osfield
3c4730bdce Updated wrappers 2007-06-12 19:46:56 +00:00
Robert Osfield
a7a0e2c4d3 Added Image::g/setOrigin to help movie plugins tell applications that the imagery
is not the usual OpenGL BOTTOM_LEFT orientation, but with the origin TOP_LEFT.  This
allows geometry setup code to flip the t tex coord to render the movie the correct way up.
2007-06-12 16:55:44 +00:00
Robert Osfield
2658819e66 UPdated wrappers 2007-06-12 15:52:13 +00:00
Robert Osfield
64c8e7c2bc From Stephan Huber, "while porting my own code to the new osgViewer I discover more and more
bugs in the Carbon-implementation of GraphicsWindow, so here's another
fix for setWindowDecorationImplementation, now updates the
titlebar-height, and fixes some display-issues when switching the
decoration on/off.
"
2007-06-12 15:38:09 +00:00
Robert Osfield
ab347eb34c Changed _data to _movieData to avoid possible confusion 2007-06-12 14:43:26 +00:00
Robert Osfield
aa970f2a30 Changed the throw dection time to 0.02 2007-06-12 09:55:40 +00:00
Robert Osfield
3eb4c3baa6 Work in progress on perspective view dependant codes 2007-06-12 08:30:41 +00:00
Robert Osfield
c7f5d96caf From Stephan Huber, "the computation of the windowtitlebar-height was wrong, attached you'll
find a fixed version for GraphicsWindowCarbon.cpp
"
2007-06-12 08:28:41 +00:00
Robert Osfield
d8a3d7aa4e Updated wrappers 2007-06-10 20:12:47 +00:00
Robert Osfield
08a793eb87 From Stephan Huber and Robert Osfield,
Stephan: "attached you'll find some modifications to the GraphicsWindow-class and
their platform-dependant implementations.

The problem:
setWindowRectangle and setWindowDecoration do not update the
traits-object, so, if you call setWindowRectangle on a
not-realized-window it will open with another size when realized later.
getWindowRectangle reports possible wrong sizes if setWindowRectangle
called before.

My solution:
split the implementation in two parts:
GraphicsWindow::setWindowRectangle will update its traits-object and
call afterwards the virtual method setWindowRectangleImplementation
(which is implemented by the derived platformspecific classess). For
setWindowDecoration I am useing a similar mechanism.

I hope you'll find the submission useful, the Win32 and X11 changes are
not tested but should work."

Changes to this made by Robert are call of resized in setWindowRectangle 
instead of setting of Traits, and use of a bool return type.
2007-06-10 19:53:18 +00:00
Robert Osfield
43790b07b3 From Vladimir Shabanov, "osg::Image::isImageTranslucent() now handles
GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_INT_2_10_10_10_REV and
GL_HALF_FLOAT_NV pixel formats."
2007-06-10 19:22:13 +00:00
Robert Osfield
3d918ef35f From Vladimir Shabanov, "DDS plugin now works with these formats:
R3G3B2, R5G6B5, A1R5G5B5, X1R5G5B5, A4R4G4B4, X4R4G4B4, R8G8B8 (now
without swaping of red and blue), A8R8G8B8 (also w/o swapping),
X8R8G8B8, A8B8G8R8, X8B8G8R8, A2R10G10B10, A2B10G10R10, L4A4 (not work
on my machine), L16A16, L16, A16B16G16R16, A16B16G16R16F,
Q16W16V16U16, R32F, R16F and A32B32G32R32F.

And these ones are correctly detected, but prints "unsupported" using
osg::notify(osg::WARN) and are not loaded:
A8R3G3B2, G16R16, G16R16F, G32R32F and CxV8U8.

Also added checking of not supported DDPF_BUMPDUDV (V8U8, V16U16,
Q8W8U8L8, A2W10U10V10 etc.) and DDPF_BUMPLUMINANCE (L6V5U5, X8L8V8U8,
etc.) pixel formats.

Mipmap handling is slightly modified and now support all additional formats.
"
2007-06-10 19:18:27 +00:00
Robert Osfield
b48ed1a4d4 Improved the set up of static build, added freetype plugin to plugins that support static usage 2007-06-10 09:51:29 +00:00
Robert Osfield
2532b5f06e Improved the detection of throwing of the mouse. 2007-06-09 17:58:37 +00:00
Robert Osfield
43ba59f7ec Updated wrappers 2007-06-09 10:18:28 +00:00
Robert Osfield
90ae3f385b Added DisplaySettings to osg::Camera, and support into osg::View for initializing
the Camera to the DisplaySettings ScreenWidth/Height/Distance.  Added support
for dual screen horizontal split stereo.
2007-06-09 10:06:38 +00:00
Robert Osfield
e3d7e6e173 Added debug code path that prints out font details. 2007-06-08 20:11:50 +00:00
Robert Osfield
3e8be9ac7d From Stephan Huber, "attached you'll find a new GraphicsWindowCarbon-header and .cpp, the
changes I made:

+ put a warning in the console if a nonexistant screen is requested
+ add getters for the aglcontext and pixelformat -- I need access to
them in my own code.
"
2007-06-08 11:04:30 +00:00
Robert Osfield
b4cd96ebdd From Jason Daly, "We have a few OpenFlight files that used to display properly with the
old loader, but appear very, very wrong with the new one.  I traced the
problem to the handling of the palette override flags in the external
reference records.  The current behavior for handling the palette
override flags for external references has different offsets for
different OpenFlight version (2 bytes for 14.2-15.1 and 4 bytes for 15.2
and later).  However, I believe this behavior is incorrect.

I know that the original 14.2 OpenFlight spec (dated April 1995)
specifies 2 bytes between the filename and the override flags, and the
15.4 and later specs specify 4 bytes.  However, I also found a 14.2.4
OpenFlight spec (dated January 1996) that changes the specification to 4
bytes.  Also, the databases in question were created using an old IRIX
version of MultiGen II, which wrote OpenFlight 14.2 files natively.
These files also have 4 bytes between the filename and flags.
Furthermore, these databases have always worked properly under earlier
versions of OSG, under Performer, and in every MultiGen product we've used.

This leads me to believe that the original 14.2 spec was incorrect (the
14.2.4 spec corrected this error), and there should be 4 bytes between
the filename and flags for all OpenFlight files version 14.2 and later.

The attached fix modifies the OpenFlight loader to behave in this way."
2007-06-08 10:58:22 +00:00
Robert Osfield
c8a5db6a71 Updated wrappers 2007-06-08 10:42:52 +00:00
Robert Osfield
b1909ff55a From Jason Daly, "This changes the handling of textures in the OpenFlight loader.
Currently, if the texture attribute file doesn't explicitly specify an
internal format, the loader will force it to use GL_RGB, which keeps
translucent textures (eg. GL_RGBA textures) from showing up properly.

This patch changes the default behavior to simply use the image's format
instead of forcing a particular format."
2007-06-08 10:22:44 +00:00
Robert Osfield
6bc1a940c9 Updated wrappers 2007-06-07 21:07:30 +00:00
Robert Osfield
5a8ec8f470 Commented out the Scene Stats entry as its not implemented yet. 2007-06-07 20:26:29 +00:00
Robert Osfield
4b73712f51 Added automatic stopping of animation when home() is called 2007-06-07 12:23:21 +00:00
Robert Osfield
32236ab2a4 From Per Fahlberg, "To get the pfb (Performer) plugin to compile I had to remove some of the
libraries listed under TARGET_EXTERNAL_LIBRARIES.
The removed libraries are not needed when linking the plugin, they are
loaded during runtime by Performer.
The modified file is attached."
2007-06-07 12:05:09 +00:00
Robert Osfield
3b1c5c3b96 Introduced a destruct method to help clean up the Registry. 2007-06-07 11:19:02 +00:00
Robert Osfield
9064895b91 Revert the signOrZero cade path in the getRotate() to fix bugs. 2007-06-07 11:06:40 +00:00
Robert Osfield
51d489fb97 Added View::home() method and updated wrappers 2007-06-07 09:58:49 +00:00
Robert Osfield
1d7ba27e72 Removed redundent files 2007-06-07 09:24:46 +00:00
Robert Osfield
766e58a589 Updated wrappers 2007-06-07 08:52:51 +00:00
Robert Osfield
211abb16dc Updated version numbers for release 2007-06-06 21:43:38 +00:00
Robert Osfield
3f7ffb088e Revert the setting of SingleThreaded under Windows in suggestBestThreadingModel() 2007-06-06 17:01:37 +00:00
Robert Osfield
34b4fb524d Fixed includes 2007-06-06 14:51:08 +00:00
Robert Osfield
87c9b39c98 From Roger James, "These fix a couple of problems in the ac3d writer.
1. Number of child node of the world object set incorrectly in when scene contains shape drawables.

2. Incorrect handling of line primitives."
2007-06-06 11:34:19 +00:00
Robert Osfield
36d50301cf From Olaf Flebbe, "an implementation of GraphicsWindow::setCursor for WIN32." 2007-06-06 11:28:44 +00:00
Robert Osfield
85c8797bc4 Moved HelpHandler and StatsHandler classes into ViewerEventHandlers header, removed HelpHandler and StatsHandler headers 2007-06-06 11:21:13 +00:00
Robert Osfield
118a6b3bf2 Updated wrappers 2007-06-06 11:10:44 +00:00
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
6e3c9ad3d3 Added support for passing in ArgumentParser in Viewer and CompositeViewer constructor 2007-06-06 10:57:02 +00:00
Robert Osfield
2c16c5b87d Change interator to const_iterator to try and avoid Solaris build failure 2007-06-05 14:37:55 +00:00
Robert Osfield
2b9f209765 From Per Fahlberg, "added use of the internal format specified in the OpenFlight format attr files." 2007-06-05 11:18:28 +00:00
Robert Osfield
a1e436d9e7 From Jeremy Moles and Rbert Osfeild, added extra details about CMake build options. 2007-06-04 20:32:15 +00:00
Robert Osfield
1f2cfa91c3 Warning fix 2007-06-04 15:05:59 +00:00
Robert Osfield
3bc90a837e From Roger James, "Here are my fixes for transparency in the Collada DAE reader." 2007-06-04 11:47:05 +00:00
Robert Osfield
a1fc3e63a8 From Martin Lavery and Robert Osfield, added use of hardwarded value kCGLCEMPEngine
to fix build failure on slightly older versions of OSX.
2007-06-04 11:14:17 +00:00
Robert Osfield
3ec3bf1679 Updated wrappers 2007-06-04 10:56:01 +00:00
Robert Osfield
448efe0722 Added osg::Hint class 2007-06-04 10:47:15 +00:00
Robert Osfield
a9d9d387df Fixed spelling of Receives 2007-06-04 08:38:11 +00:00
Robert Osfield
30e4eb833f Updated wrappers 2007-06-03 10:00:09 +00:00
Robert Osfield
b5791629ea Added Viewer::setUpViewerAsEmbeddedInWindow convinience method 2007-06-03 09:34:28 +00:00
Robert Osfield
6fc3543cc8 updated wrapper 2007-06-01 22:28:03 +00:00
Robert Osfield
b92ebca928 From Maria Ten, "The constructor method of the EllipsoidLocator of osgTerrain assumes
that the terrain is always the Earth planet. I changed the constructor
method to accept the Equator radius and the Polar radius like
parameters. By default, it assumes the Earth radius for the
EllipsoidLocator. I added a setEllipsoidModel method, too.

Now, we are developing some libraries for a GIS applicacion, and our
libraries can visualize terrains of planets like Mars. I think that is
a interesting change."
2007-06-01 21:33:29 +00:00
Robert Osfield
523337ea20 Updated wrappers 2007-06-01 19:53:14 +00:00
Robert Osfield
053ba0c543 From Wojciech Lewandowski, "I did few tests to see whether adding PreDraw callback would help us with SPI problems when using Viewer. Results were positive so I decided to give it a try and ask you to verify and maybe merge with existing codebase.
I added _preDrawCallback member and neccessary access methods plus modified osgUtil RenderStage.cpp to invoke it before all drawInner calls are made. I tried to maintain symmetry with postDrawCallback but you know better where is a proper place for this call ;-)
"
2007-06-01 19:45:24 +00:00
Robert Osfield
822868ca31 From Mathias Froelich, "have done an interface to change the mouse cursor in the X11 graphics
window.
The win32 implementation is still in its original shape since I have no win32
implementation available.

I have chosen the enum approach for the first cut. That is benefitial since
the user does not need to track creation of mouse cursors for different
windows and displays in presence of multiple viewer windows.

The default set of available mouse shapes is the same set that was available
with glut. That set served many OpenGL applications well, so the hope is that
this is enough.

Even though, that implementation is still extensible:
I have digged out the way SDL defines new mouse cursors and added a still
documented out function prototype in the GraphicsWindow that can be used to
extend the current implemtation for arbitrary mouse shapes. That is not
implemented yet.

I hope that somebody with a win32 test system can catch up that implementation
on win32."
2007-06-01 19:43:28 +00:00
Robert Osfield
fcafd4db06 From Stephan Huber, "attached you'll find the modified ImageStream
and a small fix for QuicktimeImageStream to disable debug-logging :)"
2007-06-01 19:19:23 +00:00
Robert Osfield
3d853fcbc6 Removed the debug message for the ortho path. 2007-06-01 19:01:23 +00:00
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
Robert Osfield
6a29688896 From Stephan Huber, "I cleaned the code a little bit and improved the handling of loops:
I added a new protected virtual method to ImageStream called
applyLoopingMode()  which is called from setLoopingMode. The
quicktime-plugin has an implementation of applyLoopingMode which sets
some flags for the quicktime, so that quicktime handles the loop
playback by itself.

This has some benefits:

+ no gaps when looping audio
+ simplified code

Attached you'll find the modified files, hope you'll find them useful."
2007-05-19 14:00:39 +00:00
Robert Osfield
e37ec98748 Various additions to better support view dependent overlay node, and updated wrappers 2007-05-19 13:43:38 +00:00
Robert Osfield
e3747b1004 From Rafa Giatan and Robert Osfield, added support for User defined events, by adding
UserData to Events.
2007-05-19 13:39:55 +00:00
Robert Osfield
c100841487 In Drawable::releaseGLObjects() replaced glDeleteLists with Drawable::deleteDisplayList(..) to prevent inappropriate OpenGL deletion when current thread does have required grpahics contxt 2007-05-19 07:08:20 +00:00
Robert Osfield
7d39c74029 Updated wrappers 2007-05-18 11:22:56 +00:00
Robert Osfield
0d71586ee0 Added support for tracking the CoordinateSystemNode path, and passing this on to
camera manipulators.
2007-05-18 10:33:56 +00:00