From 566b4cd999ff60321a200eeab5b43b59775a6d47 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 6 Nov 2008 14:56:31 +0000 Subject: [PATCH] Updated wrappers --- src/osgWrappers/osg/FrameBufferObject.cpp | 59 +++++++++++++++++++ src/osgWrappers/osg/Image.cpp | 10 ++++ .../osgViewer/ViewerEventHandlers.cpp | 23 ++++++++ 3 files changed, 92 insertions(+) diff --git a/src/osgWrappers/osg/FrameBufferObject.cpp b/src/osgWrappers/osg/FrameBufferObject.cpp index 90f87123d..218cfb28a 100644 --- a/src/osgWrappers/osg/FrameBufferObject.cpp +++ b/src/osgWrappers/osg/FrameBufferObject.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -176,6 +177,64 @@ BEGIN_VALUE_REFLECTOR(osg::FrameBufferAttachment) __int__compare__C5_FrameBufferAttachment_R1, "", ""); + I_Method0(osg::RenderBuffer *, getRenderBuffer, + Properties::NON_VIRTUAL, + __RenderBuffer_P1__getRenderBuffer, + "", + ""); + I_Method0(const osg::RenderBuffer *, getRenderBuffer, + Properties::NON_VIRTUAL, + __C5_RenderBuffer_P1__getRenderBuffer, + "", + ""); + I_Method0(osg::Texture *, getTexture, + Properties::NON_VIRTUAL, + __Texture_P1__getTexture, + "", + ""); + I_Method0(const osg::Texture *, getTexture, + Properties::NON_VIRTUAL, + __C5_Texture_P1__getTexture, + "", + ""); + I_Method0(int, getCubeMapFace, + Properties::NON_VIRTUAL, + __int__getCubeMapFace, + "", + ""); + I_Method0(int, getTextureLevel, + Properties::NON_VIRTUAL, + __int__getTextureLevel, + "", + ""); + I_Method0(int, getTexture3DZOffset, + Properties::NON_VIRTUAL, + __int__getTexture3DZOffset, + "", + ""); + I_Method0(int, getTextureArrayLayer, + Properties::NON_VIRTUAL, + __int__getTextureArrayLayer, + "", + ""); + I_SimpleProperty(int, CubeMapFace, + __int__getCubeMapFace, + 0); + I_SimpleProperty(osg::RenderBuffer *, RenderBuffer, + __RenderBuffer_P1__getRenderBuffer, + 0); + I_SimpleProperty(osg::Texture *, Texture, + __Texture_P1__getTexture, + 0); + I_SimpleProperty(int, Texture3DZOffset, + __int__getTexture3DZOffset, + 0); + I_SimpleProperty(int, TextureArrayLayer, + __int__getTextureArrayLayer, + 0); + I_SimpleProperty(int, TextureLevel, + __int__getTextureLevel, + 0); END_REFLECTOR TYPE_NAME_ALIAS(std::map< osg::Camera::BufferComponent COMMA osg::FrameBufferAttachment >, osg::FrameBufferObject::AttachmentMap) diff --git a/src/osgWrappers/osg/Image.cpp b/src/osgWrappers/osg/Image.cpp index f3231ab12..032885de4 100644 --- a/src/osgWrappers/osg/Image.cpp +++ b/src/osgWrappers/osg/Image.cpp @@ -374,6 +374,16 @@ BEGIN_OBJECT_REFLECTOR(osg::Image) __void__update__NodeVisitor_P1, "", ""); + I_Method3(void, sendPointerEvent, IN, int, x, IN, int, y, IN, int, buttonMask, + Properties::VIRTUAL, + __void__sendPointerEvent__int__int__int, + "method for sending pointer events to images that are acting as front ends to interactive surfaces such as a vnc or browser window. ", + ""); + I_Method2(void, sendKeyEvent, IN, int, key, IN, bool, keyDown, + Properties::VIRTUAL, + __void__sendKeyEvent__int__bool, + "method for sending key events to images that are acting as front ends to interactive surfaces such as a vnc or browser window. ", + ""); I_StaticMethod1(bool, isPackedType, IN, GLenum, type, __bool__isPackedType__GLenum_S, "", diff --git a/src/osgWrappers/osgViewer/ViewerEventHandlers.cpp b/src/osgWrappers/osgViewer/ViewerEventHandlers.cpp index c9aa1b6ae..fa7f95905 100644 --- a/src/osgWrappers/osgViewer/ViewerEventHandlers.cpp +++ b/src/osgWrappers/osgViewer/ViewerEventHandlers.cpp @@ -13,6 +13,8 @@ #include #include #include +#include +#include #include #include #include @@ -106,6 +108,27 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::HelpHandler) __void__setKeyEventTogglesOnScreenHelp__int); END_REFLECTOR +BEGIN_OBJECT_REFLECTOR(osgViewer::InteractiveImageHandler) + I_DeclaringFile("osgViewer/ViewerEventHandlers"); + I_BaseType(osgGA::GUIEventHandler); + I_Constructor1(IN, osg::Image *, image, + Properties::NON_EXPLICIT, + ____InteractiveImageHandler__osg_Image_P1, + "", + ""); + I_Method4(bool, handle, IN, const osgGA::GUIEventAdapter &, ea, IN, osgGA::GUIActionAdapter &, aa, IN, osg::Object *, x, IN, osg::NodeVisitor *, nv, + Properties::VIRTUAL, + __bool__handle__C5_osgGA_GUIEventAdapter_R1__osgGA_GUIActionAdapter_R1__osg_Object_P1__osg_NodeVisitor_P1, + "Handle events, return true if handled, false otherwise. ", + ""); + I_ProtectedMethod5(bool, mousePosition, IN, osgViewer::View *, view, IN, osg::NodeVisitor *, nv, IN, const osgGA::GUIEventAdapter &, ea, IN, int &, x, IN, int &, y, + Properties::NON_VIRTUAL, + Properties::CONST, + __bool__mousePosition__osgViewer_View_P1__osg_NodeVisitor_P1__C5_osgGA_GUIEventAdapter_R1__int_R1__int_R1, + "", + ""); +END_REFLECTOR + BEGIN_OBJECT_REFLECTOR(osgViewer::LODScaleHandler) I_DeclaringFile("osgViewer/ViewerEventHandlers"); I_BaseType(osgGA::GUIEventHandler);