Commit Graph

2966 Commits

Author SHA1 Message Date
Robert Osfield
2797e8cb7c Improved support for setting/getting properties via the osg::UserDataContainer. 2014-02-11 18:07:37 +00:00
Robert Osfield
e3a003a08f Quitened down debug messages 2014-02-11 10:56:51 +00:00
Robert Osfield
a9f8af3fb6 Changed implementation of enums to use strings as lua type to make it easier to do comparisons and track values 2014-02-11 09:43:08 +00:00
Robert Osfield
31e98b51df Added support for serailizing and scripting BoundingBox and BoundingSphere objects 2014-02-10 16:44:13 +00:00
Robert Osfield
3dcca431a9 Fixed handling of setting member variables via the Serializers when the value is the default.
Added support for more features of the osgDB::Widget class.

Fixed handling of boolean values in the Lua plugin
2014-02-08 17:53:51 +00:00
Robert Osfield
1319c2d281 Added support for enum's in the Lua script integration 2014-02-08 10:39:20 +00:00
Robert Osfield
8ad0ab1f6b Fixed handling of returns when invoking a script, removed some debug messages, added a warning message when detecting erronous types.
Added FocusBehaviour enum to osgGA::Widget serialization
2014-02-07 16:06:57 +00:00
Robert Osfield
99eb81e743 Added support for casting objects to allow one to access a parent classes methods. 2014-02-06 11:25:37 +00:00
Robert Osfield
2b8be97297 Added support for a <hull> tag that can be used within <volume> tag. 2014-02-05 11:07:03 +00:00
Robert Osfield
c599189d7d Added lua-5.2.3 as source code so it can be optinally built as part of the lua plugin, making it possible to work out of the box across all platforms with needing lua as an external dependency.
Added the Cmake option OSG_USE_LOCAL_LUA_SOURCE to control whether to build and use the Lua source code in the lua plugin, or look for lua as an external dependency.
2014-02-04 16:49:13 +00:00
Robert Osfield
6bf6d5eeb2 Added test code for nesting a <hull> within a volume tag. 2014-02-04 16:46:33 +00:00
Robert Osfield
488e1692cc From Stephan Huber, added support for compile source code of lua with the lua plugin 2014-02-04 11:24:01 +00:00
Robert Osfield
5f8e2bda2f Added osg::CallbackObject to be used to extend C++ class from scripting languages by providing callback objects assigned to the osg::Object UserDataContainer, with the CallbackObject's Name used to map the "method" provided by the CallbackObject. The CallbackObject is implemented by the script engine to provide the neccessary glue to invoking the script with the appropriate input parameters and handling the output parameters.
To the Lua plugin added support for assigned lua functions to C++ osg::Objects via the new osg::CallbackObject mechanism.  To invoke the scripts function from C++ one must get the CallbackObject and call run on it.

Renamed ScriptCallback to ScriptNodeCallback to avoid possibly confusion between osg::CallbackObject and the ScriptNodeCallback.
2014-01-31 16:20:29 +00:00
Robert Osfield
4814a5341e Removed the invocation of gcc on all platforms 2014-01-28 15:28:17 +00:00
Robert Osfield
1270236715 From Torben Dannhauer, VisualStudio 2013 build fixes 2014-01-24 16:24:59 +00:00
Robert Osfield
8ae57c2797 From Marc Helbling, "I am sending a small fix in the PLY pseudo-loader; the extension was checked in plyfile.cpp thus preventing the loading of any .PLY file (extension in uppercase). The extension filtering is already handled by ReaderWriter::acceptsExtension in a case unsensitive way." 2014-01-24 16:01:59 +00:00
Robert Osfield
91b7104a92 Changed the handling of single window configurations so that simply reuse the View::getCamera() instead of creating a slave. 2014-01-24 14:26:25 +00:00
Robert Osfield
29ab577bc3 From Stephan Huber, "attached is a new zip containing two small fixes:
* forwarded touch-events do have a correct input-range from 0 .. 1
* I refactored sending touch-events per osc so the receiver can detect a TOUCH_ENDED better"
2014-01-24 10:10:43 +00:00
Robert Osfield
4886a8941d Fixed warnings 2014-01-23 19:55:37 +00:00
Robert Osfield
a96ad565c7 From Stephan Huber, "attached are some fixes to the osc-plugin and the touch-implementations for iOS and os x and other small bugfixes. These fixes will normalize the orientation of the touch points, and transmitting the touch points over osc via the TUIO-protocol works now more robustly between two osg-applications.
I added a new tag to p3d called forward_touch_event_to_device and renamed the existing forward_event_to_device to forward_mouse_event_to_device. This new tag will transmit touches to the virtual trackpad as touch events. I added the MultitouchTrackball to the p3d-app so zooming and moving a model remotely should now work, if you use forward_touch_event_to_device. I kept (and fixed) forward_mouse_event_to_device for background compatibility, so old presentations works as in previous versions, without the ability to zoom + scale. of course.

forward_touch_event_to_device needs some more testing, (e.g. with image-streams and keystone, afaik there’s no support for touch-events...) but for a first version it works nice.
"
2014-01-23 15:37:48 +00:00
Robert Osfield
4fef6a3c2f Refactored .p3d loader to make it less strict about the tag, property and value strings when matching them to supported values.
Examples of supported matches are:

   <Slide> and <slide> will be treated the same
   <bgcolor>WHITE</bgcolor> and <bgcolor>White</bgcolor> will be treated the same
   <text alignment="TOP_LEFT"</text> and <text alignment="top left"</text>,  <text alignment="TopLeft"</text> will all be treated the same
2014-01-22 16:29:45 +00:00
Robert Osfield
7fe3244c71 Added support for sampleRatio and sampleRatioWhenMoving <volume> properties 2014-01-22 11:25:54 +00:00
Robert Osfield
779bd20fd5 Fixed build error due to typo. 2014-01-21 17:00:56 +00:00
Robert Osfield
0d4a448c34 Fixed warning 2014-01-17 18:20:39 +00:00
Robert Osfield
354d79acd1 From Jordi Torres, "Fixed a typo in ReaderWriterCURL::ReaderWriterCURL() changed Psuedo for Pseudo." 2014-01-17 13:54:14 +00:00
Robert Osfield
e8cd06c6e9 Added hull="hul-filename" property support to <volume> tag that can used thus:
<layer>
            <volume renderer="MultiPass" hull="cow.osgt.0,-2,-4.trans.50,50,50.scale">CardiacCT</volume>
        </layer>
2014-01-16 17:17:37 +00:00
Robert Osfield
889e4749ef From Farshid Lashkari, "I've attached a fix for the Collada loader that prevents a crash with some files containing textures. I also converted an OSG_NOTICE to OSG_INFO to be consistent with other log messages within the loader." 2014-01-08 10:33:00 +00:00
Robert Osfield
84d301715e Removed more odd characters 2014-01-08 10:31:36 +00:00
Robert Osfield
32d7a48712 Removed more odd characters 2014-01-08 10:28:24 +00:00
Robert Osfield
db82bb4ab1 Removed odd characters 2014-01-08 10:24:43 +00:00
Robert Osfield
d48091d37e From Farshid Lashkari, "I've attached a small change to the DAE writer to support writing out unknown transform types. It will essentially treat it as a matrix transform, using the the local to world matrix value." 2014-01-07 16:29:22 +00:00
Robert Osfield
cc99a40b16 Added support for Switch::set/getValue() 2014-01-06 17:19:21 +00:00
Robert Osfield
fa7f25d75d Removed the prototype MethodObject classes 2014-01-06 15:46:36 +00:00
Robert Osfield
6490f1b6a5 Moved osgDB::MethodObject from lua plugin into osgDB, added support for running methods via the osgDB::PropertyInterface class.
Updated lua plugin to use new osgDB::PropertyInterface to run methods.

Added addChild/removeChild() etc to Group.cpp, and addDrawable/removeDrawable() etc. to Geode.cpp serializers.
2014-01-06 15:45:46 +00:00
Robert Osfield
bfdcf4d8d1 Fixed build of V8 and Python plugins 2014-01-03 14:36:58 +00:00
Robert Osfield
afab78ed40 Preliminary support for wrapping methods in the lua script plugin. 2013-12-25 17:36:32 +00:00
Robert Osfield
865a47bd6b Added <switch> tag to .p3d to allow one to provide multiple ways to render children within a layer. 2013-12-20 09:57:35 +00:00
Robert Osfield
3e171414bd From Michal Durkovic, "I’m building current trunk on Mac OS X 10.9 and have encountered this error during linking of osgdb_lua plugin:
Undefined symbols for architecture x86_64:

  "lua::LuaScriptEngine::pushValue(osg::Quat const&) const", referenced from:

      PushStackValueVisitor::apply(osg::Quat const&) in LuaScriptEngine.o

  "lua::LuaScriptEngine::pushValue(osg::Plane const&) const", referenced from:

      PushStackValueVisitor::apply(osg::Plane const&) in LuaScriptEngine.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)



Looks like LuaScriptEngine was missing implementation of those 2 member functions. Fixed src/osgPlugins/lua/LuaScriptEngine.cpp file in attachment.

"
2013-12-19 13:53:40 +00:00
Robert Osfield
f16f278fea From Stephan Hunber, "attached you’ll find some changes to osg/p3d:
* a new command-line-option to present3d and a new option to the p3d-plugin to suppress any found <env> tags
* a new command-line-option to present3d to forward mouse-events via osgGA::Device (defaults to off) so we can test the interface-files with present3d better
* I added a new attribute forward_to_devices for click_to_event to forward the event to all attached devices instead of handling the event locally. This will fix the annoyance with the new interface-files when toggling polygon-mode or switching light on/off.

Here’s an example:

<click_to_event forward_to_devices="true">0x72</click_to_event>
"
2013-12-19 13:49:27 +00:00
Robert Osfield
a8dc460085 Implemented support for calling scripts from with Present3D. 2013-12-19 10:02:16 +00:00
Robert Osfield
591c5bae42 Added support for new osgVolume::MultiPassTechnique to Present3D. To use add property renderer="MultiPass":
<volume renderer="MultiPass">MyVolumeData</volume>
2013-12-17 12:18:06 +00:00
Robert Osfield
ed4deeb0fb From Mike Krus, compile fix to enable compiling across a wider set of versions. 2013-12-06 09:35:57 +00:00
Robert Osfield
a5d78953d4 From Farshid Lashkari, "I recently encountered an issue attempting to load an IVE file generated by an older version of OSG. The file contained dxt1 compressed image data with mipmaps. The loaded model would cause crashes when passing the mipmap data to glCompressedTexImage2D. It seems that the size of the data array within the IVE file did not match the computed size from Image::getTotalSizeInBytesIncludingMipmaps(). This essentially made the mipmap offsets invalid within the Image object.
I'm not sure if the IVE was simply generated incorrectly, or if the Image::getTotalSizeInBytesIncludingMipmaps() was modified since the file was generated. Either way, I added a simple check in the IVE loader so that it clears the mipmap offsets if the actual data size does not match the computed data size. This seems like a safe fallback since the mipmap data can be automatically generated, and it fixes the problem in my case.

Also, while looking into this issue, I noticed that the osgDB::InputStream class applies the serialized image allocation mode. However, since the serializer is allocating the image data itself, it seems like it should force the allocation mode to USE_NEW_DELETE.
"
2013-11-21 13:59:00 +00:00
Robert Osfield
e0d3ab4412 From Stephan Huber, * GUIEventAdapter: add support for getting normalized touch points
* MultiTouchTrackball: some code cleanup and support for normalized touch-points
* oscdevice: receiving and sending multi-touch-events via the Cursor2D-profile from TUIO
* added some documentation
2013-11-18 13:25:55 +00:00
Robert Osfield
835d9455a9 Restored the rescaleToZeroToOneRange() to address rendering issues. 2013-11-12 14:21:00 +00:00
Robert Osfield
829cd9718a From Stepan Huber, "attached are my changes for the osc, zeroconf and resthttp-plugin to use the new event-class. I refactored the osgoscdevice-example so that it’s working again. " 2013-11-08 12:28:51 +00:00
Robert Osfield
2ebe81cb0e Fixed handling of web cams 2013-11-06 09:49:51 +00:00
Robert Osfield
6f6c44446c Introduced a cast(T) method into the ImageUtils template functor to allow code reading images to handle casting from source data to a form that a user can use more conviently 2013-11-06 09:23:21 +00:00
Robert Osfield
ef3a65b93f Restructed the call to avformat_open_input to provide more information. 2013-11-06 09:20:35 +00:00
Robert Osfield
b3603f76e4 Removed depreated glib call 2013-10-24 19:56:04 +00:00