Updated wrappers
This commit is contained in:
@@ -31,7 +31,12 @@ osg::Node* createInteractiveQuad(const osg::Vec3& origin, osg::Vec3& widthAxis,
|
||||
texture,
|
||||
osg::StateAttribute::ON);
|
||||
|
||||
pictureQuad->setEventCallback(new osgViewer::InteractiveImageHandler(image));
|
||||
|
||||
|
||||
osg::ref_ptr<osgViewer::InteractiveImageHandler> callback = new osgViewer::InteractiveImageHandler(image);
|
||||
|
||||
pictureQuad->setEventCallback(callback.get());
|
||||
pictureQuad->setCullCallback(callback.get());
|
||||
|
||||
osg::Geode* geode = new osg::Geode;
|
||||
geode->addDrawable(pictureQuad);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <osg/BufferObject>
|
||||
#include <osg/CopyOp>
|
||||
#include <osg/FrameStamp>
|
||||
#include <osg/Image>
|
||||
#include <osg/NodeVisitor>
|
||||
#include <osg/Object>
|
||||
@@ -384,6 +385,11 @@ BEGIN_OBJECT_REFLECTOR(osg::Image)
|
||||
__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_Method1(void, setFrameLastRendered, IN, const osg::FrameStamp *, frameStamp,
|
||||
Properties::VIRTUAL,
|
||||
__void__setFrameLastRendered__C5_osg_FrameStamp_P1,
|
||||
"method for passing frame information to the custom Image classes, to be called only when objects associated with imagery are not culled. ",
|
||||
"");
|
||||
I_StaticMethod1(bool, isPackedType, IN, GLenum, type,
|
||||
__bool__isPackedType__GLenum_S,
|
||||
"",
|
||||
@@ -433,6 +439,9 @@ BEGIN_OBJECT_REFLECTOR(osg::Image)
|
||||
I_SimpleProperty(const std::string &, FileName,
|
||||
__C5_std_string_R1__getFileName,
|
||||
__void__setFileName__C5_std_string_R1);
|
||||
I_SimpleProperty(const osg::FrameStamp *, FrameLastRendered,
|
||||
0,
|
||||
__void__setFrameLastRendered__C5_osg_FrameStamp_P1);
|
||||
I_SimpleProperty(unsigned int, ImageSizeInBytes,
|
||||
__unsigned_int__getImageSizeInBytes,
|
||||
0);
|
||||
|
||||
@@ -361,7 +361,5 @@ END_REFLECTOR
|
||||
|
||||
STD_MAP_REFLECTOR(std::map< const osg::LineSegment * COMMA osgUtil::IntersectVisitor::HitList >)
|
||||
|
||||
STD_VECTOR_REFLECTOR(std::vector< int >)
|
||||
|
||||
STD_VECTOR_REFLECTOR(std::vector< osgUtil::Hit >)
|
||||
|
||||
|
||||
@@ -12,9 +12,12 @@
|
||||
|
||||
#include <osg/ApplicationUsage>
|
||||
#include <osg/Camera>
|
||||
#include <osg/CopyOp>
|
||||
#include <osg/Drawable>
|
||||
#include <osg/Image>
|
||||
#include <osg/NodeVisitor>
|
||||
#include <osg/Object>
|
||||
#include <osg/RenderInfo>
|
||||
#include <osgGA/GUIActionAdapter>
|
||||
#include <osgGA/GUIEventAdapter>
|
||||
#include <osgViewer/ViewerEventHandlers>
|
||||
@@ -111,16 +114,54 @@ END_REFLECTOR
|
||||
BEGIN_OBJECT_REFLECTOR(osgViewer::InteractiveImageHandler)
|
||||
I_DeclaringFile("osgViewer/ViewerEventHandlers");
|
||||
I_BaseType(osgGA::GUIEventHandler);
|
||||
I_BaseType(osg::Drawable::CullCallback);
|
||||
I_Constructor1(IN, osg::Image *, image,
|
||||
Properties::NON_EXPLICIT,
|
||||
____InteractiveImageHandler__osg_Image_P1,
|
||||
"",
|
||||
"");
|
||||
I_Method0(osg::Object *, cloneType,
|
||||
Properties::VIRTUAL,
|
||||
__osg_Object_P1__cloneType,
|
||||
"Clone the type of an object, with Object* return type. ",
|
||||
"Must be defined by derived classes. ");
|
||||
I_Method1(osg::Object *, clone, IN, const osg::CopyOp &, copyop,
|
||||
Properties::VIRTUAL,
|
||||
__osg_Object_P1__clone__C5_osg_CopyOp_R1,
|
||||
"Clone an object, with Object* return type. ",
|
||||
"Must be defined by derived classes. ");
|
||||
I_Method1(bool, isSameKindAs, IN, const osg::Object *, obj,
|
||||
Properties::VIRTUAL,
|
||||
__bool__isSameKindAs__C5_osg_Object_P1,
|
||||
"",
|
||||
"");
|
||||
I_Method0(const char *, libraryName,
|
||||
Properties::VIRTUAL,
|
||||
__C5_char_P1__libraryName,
|
||||
"return the name of the object's library. ",
|
||||
"Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name. ");
|
||||
I_Method0(const char *, className,
|
||||
Properties::VIRTUAL,
|
||||
__C5_char_P1__className,
|
||||
"return the name of the object's class type. ",
|
||||
"Must be defined by derived classes. ");
|
||||
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_Method3(bool, cull, IN, osg::NodeVisitor *, nv, IN, osg::Drawable *, drawable, IN, osg::RenderInfo *, renderInfo,
|
||||
Properties::VIRTUAL,
|
||||
__bool__cull__osg_NodeVisitor_P1__osg_Drawable_P1__osg_RenderInfo_P1,
|
||||
"do customized cull code, return true if drawable should be culled. ",
|
||||
"");
|
||||
I_ProtectedConstructor0(____InteractiveImageHandler,
|
||||
"",
|
||||
"");
|
||||
I_ProtectedConstructorWithDefaults2(IN, const osgViewer::InteractiveImageHandler &, rhs, , IN, const osg::CopyOp &, copyop, osg::CopyOp::SHALLOW_COPY,
|
||||
____InteractiveImageHandler__C5_InteractiveImageHandler_R1__C5_osg_CopyOp_R1,
|
||||
"",
|
||||
"");
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user