Commit Graph

9757 Commits

Author SHA1 Message Date
Robert Osfield
137605eba8 Added support for using PagedLOD to managing loading of presentation preview and then the main presentation in the background paging thread 2009-07-16 10:12:33 +00:00
Cedric Pinson
a13b32a124 From Cedric Pinson, add accessors to osgAnimation ActionCallback 2009-07-15 20:52:51 +00:00
Robert Osfield
a45ac2ef43 Added alias from xml to p3d to ensure backwards compatibility with old present3D files with the.xml extenstion 2009-07-15 17:01:47 +00:00
Robert Osfield
956bf3e395 Quitened down debug info. 2009-07-15 15:28:19 +00:00
Robert Osfield
c491373698 Cleaned up indenting 2009-07-14 13:32:06 +00:00
Robert Osfield
adc68d79af Converted code to use osg::asciiToFloat() instead of relying upong the C libraries sscanf to read floats as the C library is locale sensitive. 2009-07-14 13:30:28 +00:00
Robert Osfield
65c8357f76 From Alexandre Amalric, "I'm using osg svn version 2.9.5 and I've apparently found a bug in osgPlugin logo.
When using more than one view logosCullCallback function is called without checking context ID from the cull visitor is equal to logo _contextID variable. It involves updating logo's viewport with different sizes.
So I made a fix well working, at least the way I use the plugin."

Note, from Robert Osfield, changed code to return true to signal culling of logo when being applied to a window that it wasn't assigned to.
2009-07-14 12:22:47 +00:00
Robert Osfield
cc37d7f439 Moved the getting of the ReaderWriter to do the actual model loading to later so that it only gets invoked when required. 2009-07-14 11:19:22 +00:00
Robert Osfield
424e892f99 Quietened down debug messages, and added early return when filename contains server address. 2009-07-14 11:18:11 +00:00
Robert Osfield
f9517fde6a Refactored the setup of the reading of the wrl file by allow reading from istreams, as well as nesting of filepaths using a local osgDB::Options to prevent threading issues.
Also fixed crash in parsing of the vrml data structures that occurred when no vrml material was assigned.
2009-07-14 10:37:31 +00:00
Robert Osfield
c690dfec50 Quitened down debug messages 2009-07-14 10:35:53 +00:00
Robert Osfield
148798137c Fixed the handling of compressed files 2009-07-14 10:04:18 +00:00
Robert Osfield
bedd22de23 From Cory Riddel based on suggestion from Robert Osfield, "I've been running with your suggested changes for a few days now and it
has been working perfectly. I'm still not entirely clear why adding a
slave/subgraph causes the problem."
2009-07-13 16:39:51 +00:00
Robert Osfield
9aa6d33980 From David Fries, "Comparing the win32 barrier to the pthread barrier, win32 puts the
while in an else clause.  When if is true the phase changes and the
while condition will always by false, so might as well put the while
in the else to skip the check.  There's also a benefit to having the
code logic similar between platforms.
"
2009-07-13 16:14:43 +00:00
Robert Osfield
3983f38f18 From David Fries, "Here is a fix for a deadlock seen under Windows using OpenThreads
Barrier operations.  The error is with atomic operations in the
win32 condition implementation.  The attached sample program will
reliably trigger with as few as three threads and a dual core system,
though sometimes it will take 65,000 iterations.

2.8.1 was the base for these changes

Win32ConditionPrivateData.h
Win32ConditionPrivateData::wait does two operations to decrement
waiters_ then read, when InterlockedDecrement decrements and returns
the value in one operation.  The two operations allows another thread
to also decrement with both getting 0 for an answer.

Win32ConditionPrivateData::broadcast is using waiters_ directly
instead of using the w value read earlier, if it was safe to use
waiters_ directly there would be no need for InterlockedGet or w.

overview of deadlock in barrier with three threads
one thread in broadcast, 2 threads in wait,
release semaphore 2, waits on waiters_done_
both threads wake, decrement waiters_, get 0 for w,
       <logic error here>
one calls set waiters_done_,
broadcast thread comes out of waiters_done_,
other thread calls waiters_done_, (which leaves waiters_done_ in the
signaled state)
       <sets the trap>
broadcast thread returns releases mutex, other threads get
mutex and also return,
next barrier, first two threads enter wait, one goes to broadcast, release
semaphore 2, skips waiters_done_ as it had been released last time
returns, processes, enters the barrier for the next barrier operation
and waits,
three threads are now in wait, two have the previous barrier phase,
one the current phase, there's one count left in the semaphore which a
thread gets, returns, enters the barrier as a waiter, sleeps, and the
deadlock is completed"
2009-07-13 16:05:57 +00:00
Robert Osfield
c47c0c2a26 From Stephan Huber, "ttached you'll find a small fix for the
GraphicsWindowCocoa-implementation, which enhances multithreaded
stability, it ensures that modifications to the size of an openglcontext
is done only from one thread.
"
2009-07-13 08:30:20 +00:00
Robert Osfield
554a6da56d Reverted erronous check-in (which was r10454) 2009-07-12 15:44:57 +00:00
Robert Osfield
6e6a7c960e Added Dragger::s/getActivationModKeyMask(..) and Dragger::s/getActivationKeyEvent(...) methods to make it possible to have draggers that only respond when you press a specified modified key or standard key.
Changed the optional dragger in osgvolume to require the shift key to be pressed for the dragger to become active.
2009-07-03 19:16:53 +00:00
Robert Osfield
cb1b874167 From and incorported the addition from Paul Fotheringham, addition of define VCL_CAN_STATIC_CONST_INIT_FLOAT to be zero to solve build error under Linux
From Robert Osfield, general cleaned up ITK side to CMakeList.txt.
2009-07-03 19:07:02 +00:00
Robert Osfield
1d320d3ca1 To the ITK code path added support for handling a whole directory of dicom files. 2009-07-03 18:58:01 +00:00
Robert Osfield
11d7d98e79 Updated version numbers for 2.9.6 release 2009-07-03 10:33:51 +00:00
Robert Osfield
48d28aaf1a Updated wrappers 2009-07-03 10:27:58 +00:00
Robert Osfield
baef387b3d Added TrackballDragger code path 2009-07-03 05:54:27 +00:00
Robert Osfield
b37e871cec Added callback to locator in support of interactive updating of the volume extents 2009-07-03 05:54:02 +00:00
Robert Osfield
78229df14a Added setUpGeometry to Dragger base class to make it easier to use draggers interchangably. 2009-07-03 05:52:52 +00:00
Robert Osfield
48dddc37b8 Introduced a Locator callback and associated usage of this callback to provide interactive updating of the volume bounds 2009-07-03 05:25:08 +00:00
Robert Osfield
23dec86e22 Added support for a "-m" option that adds a tab box manipulator to allow positioning and resizing of the rendered volume 2009-07-02 18:50:45 +00:00
Robert Osfield
a4dedc227b Refactored RayTracedTechnique to allow the position of the rendered part of the volume to be decoupled from the image data. 2009-07-02 18:49:59 +00:00
Robert Osfield
2232bd5ee5 From Byran Thrall, "The OpenFlight plugin doesn't handle unrecognized options or extra
whitespace in all cases, causing it to crash."
2009-07-01 15:39:06 +00:00
Robert Osfield
af39672d3d Removed old references to CommandManager 2009-07-01 14:50:08 +00:00
Robert Osfield
a7f0f3f49d Added constructor and destructor body 2009-07-01 14:49:30 +00:00
Robert Osfield
8107bd0540 Added osgGA to the dependency list 2009-07-01 14:04:46 +00:00
Robert Osfield
2525bb5d06 Completed refactor of osgManipulator, key changes are:
Selection is now just a typedef of osg::MatrixTransform, and is deprecated

   CommandManager is shell class that just sets values directly on Dragger, and is deprecated

   Dragger now has list of DraggerCallback that takes over the roll of tracking changes to the Dragger, and
   allows users to track the dragger in any way they wish.

   Dragger now has a convinience method making MatrixTransforms track a dragger.

   Selection and CommandManager are no longer required for use of osgManipulator and are kept around for backwards compatibility.
2009-07-01 14:01:09 +00:00
Cedric Pinson
4e305cf46b From Cedric Pinson, i miss to commit the file that contains the osgAnimation::StripAnimation::traverse 2009-07-01 09:30:44 +00:00
Robert Osfield
7904fe71a5 Simplified Command and CommandManager 2009-06-30 13:00:58 +00:00
Stephan Maximilian HUBER
1ce5b648ab From Stephan Huber: updated XCode project, included osgPresentation 2009-06-30 12:41:59 +00:00
Cedric Pinson
2c012faee4 From Cedric Pinson, Traverse StripAction instead of applying, this fix the execution of FrameCallback in BlendIn, BlendOut and AnimationAction\nFix warning of osgAnimation::StatsHandler\nFix crash when running example osganimationtimeline without nathan.osg in OSG_FILE_PATH or with bad file 2009-06-30 11:55:49 +00:00
Robert Osfield
a2ae370c8e Refactored osgManipulator so that CommandManager is no longer required, instead Dragger directly manages Constaints and associate Selections. 2009-06-30 11:39:39 +00:00
Robert Osfield
a73a403301 Updated wrappers 2009-06-30 07:33:16 +00:00
Robert Osfield
e30e4df30c Introduced event handling directly into osgManipulator::Dragger to allow it be used with a global event handler passing in events. 2009-06-29 21:32:10 +00:00
Robert Osfield
8aaedda982 Changed the definition of HAVE_CONFIG_H so that it's only defined when on a now windows system, so to allow the dcmtk/osconfig.h to include the correct header on unix vs widows. 2009-06-26 16:52:27 +00:00
Robert Osfield
063bc6e513 Added search in /usr/local/dicom for dcmtk. 2009-06-26 16:39:44 +00:00
Robert Osfield
85456b1ac1 Fixed warning 2009-06-26 08:16:03 +00:00
Robert Osfield
a58ea5c87c Fixed warning 2009-06-26 08:14:09 +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
44a8e850f4 Fixed library definition 2009-06-25 18:03:30 +00:00
Robert Osfield
3a65636893 From Stephan Huber, fixes to Cocoa support 2009-06-25 16:12:58 +00:00
Robert Osfield
06abd75198 From Mathias Froehlich, "We are currently getting issues with locale settings and some osg plugins.
Therefore I have changed all the occurances of atof by asciiToFloat or
asciiToDouble.

I believe that it is safe to do so at least for all the plugins.
Included here are also asciiToFloat conversion of environment variables. One
might argue that these should be locale dependent. But IMO these should be
set and interpreted by osg independent of the current locale.
"
2009-06-25 16:07:49 +00:00
Robert Osfield
d167142a59 Fixed warnings and refactored FindFFmpeg.cmake and ffmpeg plugin CMakeLists.txt scripts to better handle different instation combinations 2009-06-25 16:02:23 +00:00