Commit Graph

36 Commits

Author SHA1 Message Date
Robert Osfield
dd996a3289 Introduced CMake option OSG_PROVIDE_READFILE option that defaults to ON, but when switched to OFF disables the building of the osgDB::read*File() methods,
forcing users to use osgDB::readRef*File() methods.  The later is preferable as it closes a potential threading bug when using paging databases in conjunction
with the osgDB::Registry Object Cache.  This threading bug occurs when one thread gets an object from the Cache via an osgDB::read*File() call where only
a pointer to the object is passed back, so taking a reference to the object is delayed till it gets reassigned to a ref_ptr<>, but at the same time another
thread calls a flush of the Object Cache deleting this object as it's referenceCount is now zero.  Using osgDB::readREf*File() makes sure the a ref_ptr<> is
passed back and the referenceCount never goes to zero.

To ensure the OSG builds when OSG_PROVIDE_READFILE is to OFF the many cases of osgDB::read*File() usage had to be replaced with a ref_ptr<> osgDB::readRef*File()
usage.  The avoid this change causing lots of other client code to be rewritten to handle the use of ref_ptr<> in place of C pointer I introduced a serious of
templte methods in various class to adapt ref_ptr<> to the underly C pointer to be passed to old OSG API's, example of this is found in include/osg/Group:

    bool addChild(Node* child); // old method which can only be used with a Node*

    tempalte<class T> bool addChild(const osg::ref_ptr<T>& child) { return addChild(child.get()); } // adapter template method

These changes together cover 149 modified files, so it's a large submission. This extent of changes are warrent to make use of the Object Cache
and multi-threaded loaded more robust.



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15164 16af8721-9629-0410-8352-f15c8da7e697
2015-10-22 13:42:19 +00:00
Robert Osfield
8c8b8f3305 Restructed the osgPresentation and present3D directories back to the structure that was present in OSG-3.2
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14759 16af8721-9629-0410-8352-f15c8da7e697
2015-03-04 18:36:44 +00:00
Robert Osfield
4e3715d4bb Moved old osgPresentation source files to osgPresentation/deprecated subdirectory. 2013-08-18 18:10:39 +00:00
Robert Osfield
1fcadcf514 Added support for <timeout_jump> to Timeout support. 2013-01-17 09:51:15 +00:00
Robert Osfield
b8b8365c06 Implemented basic Timeout display and timing codes 2013-01-16 16:13:30 +00:00
Robert Osfield
93334e7df0 Added movie volume animation control to <image> and <stereo_image> tags to be used in the form:
<slide>
        <properties>
            <property name="volume" type="float">0.20</property>
        </properties>

        <property_animation>
            <key_frame time="0.0">
                <property name="volume" type="float">0.0</property>
            </key_frame>
            <key_frame time="2.0">
                <property name="volume" type="float">1.0</property>
            </key_frame>
            <key_frame time="10.0">
                <property name="volume" type="float">1.0</property>
            </key_frame>
            <key_frame time="12.0">
                <property name="volume" type="float">0.0</property>
            </key_frame>
        </property_animation>

        <layer>
              <image volume="$volume" looping="ON">big_buck_bunny_1080p_stereo.ogg</image>
       </layer>
    </slide>
2013-01-11 11:30:44 +00:00
Robert Osfield
e569671d13 Added support for <image "start=10"> property that tells a video to start specificied number of sections into a video. 2013-01-10 14:37:52 +00:00
Robert Osfield
6d0e1bd50b Added region="$xmin $ymin $zmin $xmax $ymax $zmax" support to <model> tag, along with animation support via the <property_animation> support. 2012-12-20 12:14:53 +00:00
Robert Osfield
9f0906984b Removed erroneous region setting 2012-12-18 11:20:20 +00:00
Robert Osfield
236e75b2be Added xml defined property/property animation to .p3d format for <volume> propeties:
alpha="$alphaname"
   cutoff="$cutoffname"
   region="$minx $miny $minz $maxx $maxy $maxz"
   sampleDensity="$densityname"
   sampleDensityWhenMoving="$densityname"
2012-11-30 14:21:45 +00:00
Robert Osfield
42529ca415 Added preliminary support for <property_animation> 2012-11-27 15:09:44 +00:00
Robert Osfield
057f8a8b3b Added support for <image blending="ON" or blending="OFF"> to allow user definition of when to enable OpenGL blending for an image or not. 2012-11-13 14:22:37 +00:00
Robert Osfield
933baf5db4 Changed COLOUR to COLOR to be consistent with OpenGL spelling 2012-11-13 13:32:01 +00:00
Robert Osfield
92975a01fd Moved colour space conversion of volumes from the osgvolume example into osg/ImageUtils and added support for colorSpaceConversion="MODULATE_ALPHA_BY_LUMINANCE","MODULATE_ALPHA_BY_COLOUR","REPLACE_ALPHA_WITH_LUMINANCE" and "REPLACE_RGB_WITH_LUMINANCE" to .p3d <volume> tag 2012-11-13 13:16:10 +00:00
Robert Osfield
ff476e9c15 Added support for naming slides and layers with slide_name and layer_name properties respectively.
Added support for creating events based on key presses using a <key_to_run> and <key_to_jump> tags.
2012-11-09 21:32:54 +00:00
Robert Osfield
1b871a822d Added support for <imagesequence interaction_mode="USE_MOUSE_Y_POSITION"> 2012-11-08 15:45:23 +00:00
Robert Osfield
a6f3e0af78 Added event and update callbacks to pass up changes to the mouse position to the ImageSequence::seek() to control which images is selected based on mouse x position 2012-10-31 16:07:23 +00:00
Robert Osfield
d879cd7715 Intial work towards support an interaction <imagesequence> tag in Present3D. 2012-10-29 15:58:02 +00:00
Robert Osfield
2faeaf553b Added support for setting the <image> paging_mode property to PRE_LOAD_ALL_IMAGES, PAGE_AND_RETAIN_IMAGES or PAGE_AND_DICARD_IMAGE for osg::ImageStream,
with PAGE_AND_DICARD_IMAGE set as the default.
2012-06-11 19:54:07 +00:00
Robert Osfield
c39ee015d6 Added ImageStream support to <image> and <stereo_image> tags in .p3d 2012-06-08 10:26:23 +00:00
Robert Osfield
5d3cb4f754 Added osg::ImageSequence support into osgPresentation::SlideShowConstructor and the associated <image> tag in .p3d. 2012-06-08 04:18:28 +00:00
Robert Osfield
14a563dc9f Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
Robert Osfield
6aa6e9a38c Refactored the click_to_run implementation to avoid bug associated with running the first click_to_run entry in a layer when
subsequent click to run's are called.
2012-01-24 14:27:17 +00:00
Robert Osfield
881078289d Added support into the .p3d format for specifying the osgDB::Options::OptionString via the <tag options="value">.
Added support into .vnc plugin for passing in the keywords "swap", "RGB", "RGBA", "BGR", "BGRA" as OptionString values to allow .p3d presentations to control
whether the pixelformat should be swapped or set to a specific format.
2011-10-26 14:25:56 +00:00
Robert Osfield
5d26d16fd3 Added password support into present3D's vnc support via the tag usage : <vnc password="mypassword">hostname</vnc> 2011-10-26 12:48:57 +00:00
Robert Osfield
9ac24c8e5d Changed the defaults volume setting to not enable the SampleDensityWhenMoving property. 2011-06-09 10:48:19 +00:00
Robert Osfield
6b67320190 Added support for new SampleDensityWhenMovingProperty into .p3d format, with it default to 0.02.
One can override this value via the sampleDensityWhenMoving="value" property in the volume tag, i.e.

         <volume sampleDensityWhenMoving="0.01">CardiacCT</volume>

To switch the feature off set the value to 0, i.e.

         <volume sampleDensityWhenMoving="0">CardiacCT</volume>
2011-03-17 17:33:02 +00:00
Robert Osfield
256da4879e Added hud and billboard support to image, stereo_image, pdf, browser and vnc image placement 2011-03-16 10:51:42 +00:00
Robert Osfield
f2ce2f19a9 Added support hud property for title, bullets and paragraph tags 2011-03-15 19:54:57 +00:00
Robert Osfield
52ff51e0eb Implemented billboard="on" option for image, bullet and paragraph tags 2011-03-14 21:36:32 +00:00
Robert Osfield
8b8ca09ab1 Added support for passing options to the .dot plugin 2010-04-28 18:53:34 +00:00
Robert Osfield
dbbe73304a Added support for using graphviz dot for graphics visualization via <graph>filename</graph> token. 2010-04-28 14:56:38 +00:00
Robert Osfield
d17d7159a1 Ported osgUtil, osgDB, osgGA, NodeKits and plugins to compile against OpenGL ES 1.1 and OpenGL ES 2.0. 2009-10-28 20:31:57 +00:00
Robert Osfield
ca78f3a6bc Added support to .p3d format's volume tag for the properties:
region="xmin ymin zmin xmax ymax zmax"
   alpha="float_value"
   cutoff="float_value"
   sampleDenstiy="float_value"
2009-08-27 16:42:47 +00:00
Robert Osfield
93996e6133 Added support for volume tags with properties:
dragger="box" or dragger="trackball"

and

    technique="light" or technique="isosurface" or technique="iso" or technique="mip"

and

    tf="transferfunctionfile.tf"

i.e.

         <volume dragger="box">CardiacCT</volume>
         <volume tf="colour.tf">CardiacCT</volume>
         <volume technique="isosurface">CardiacCT</volume>
2009-08-05 14:37:56 +00:00
Robert Osfield
95355c2a49 Refactored preset3D/p3d plugin so that common scene graph extensions and classes now live in a separate osgPresenttation NodeKit. 2009-06-24 16:03:49 +00:00