Updated wrappers

This commit is contained in:
Robert Osfield
2007-01-11 15:54:11 +00:00
parent ddba526d54
commit 7249d5c122
6 changed files with 83 additions and 41 deletions

View File

@@ -94,6 +94,10 @@ BEGIN_OBJECT_REFLECTOR(osg::TexGenNode)
__C5_TexGen_P1__getTexGen,
"Get the const TexGen. ",
"");
I_Method1(void, setThreadSafeRefUnref, IN, bool, threadSafe,
__void__setThreadSafeRefUnref__bool,
"Set whether to use a mutex to ensure ref() and unref() are thread safe. ",
"");
I_SimpleProperty(osg::TexGenNode::ReferenceFrame, ReferenceFrame,
__ReferenceFrame__getReferenceFrame,
__void__setReferenceFrame__ReferenceFrame);
@@ -103,5 +107,8 @@ BEGIN_OBJECT_REFLECTOR(osg::TexGenNode)
I_SimpleProperty(unsigned int, TextureUnit,
__unsigned_int__getTextureUnit,
__void__setTextureUnit__unsigned_int);
I_SimpleProperty(bool, ThreadSafeRefUnref,
0,
__void__setThreadSafeRefUnref__bool);
END_REFLECTOR

View File

@@ -15,6 +15,7 @@
#include <osg/Node>
#include <osg/NodeVisitor>
#include <osg/Object>
#include <osg/State>
#include <osg/Vec4>
#include <osgSim/OverlayNode>
@@ -127,6 +128,18 @@ BEGIN_OBJECT_REFLECTOR(osgSim::OverlayNode)
__C5_osg_Camera_P1__getCamera,
"Get the const camera used to implement the render to texture of the overlay subgraph. ",
"");
I_Method1(void, setThreadSafeRefUnref, IN, bool, threadSafe,
__void__setThreadSafeRefUnref__bool,
"Set whether to use a mutex to ensure ref() and unref() are thread safe. ",
"");
I_Method1(void, resizeGLObjectBuffers, IN, unsigned, int,
__void__resizeGLObjectBuffers__unsigned,
"Resize any per context GLObject buffers to specified size. ",
"");
I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, x, 0,
__void__releaseGLObjects__osg_State_P1,
"If State is non-zero, this function releases any associated OpenGL objects for the specified graphics context. ",
"Otherwise, releases OpenGL objexts for all graphics contexts. ");
I_SimpleProperty(osg::Camera *, Camera,
__osg_Camera_P1__getCamera,
0);
@@ -148,5 +161,8 @@ BEGIN_OBJECT_REFLECTOR(osgSim::OverlayNode)
I_SimpleProperty(GLenum, TexEnvMode,
__GLenum__getTexEnvMode,
__void__setTexEnvMode__GLenum);
I_SimpleProperty(bool, ThreadSafeRefUnref,
0,
__void__setThreadSafeRefUnref__bool);
END_REFLECTOR

View File

@@ -12,6 +12,7 @@
#include <osg/Drawable>
#include <osg/Node>
#include <osg/Vec3>
#include <osg/Vec3d>
#include <osgUtil/IntersectionVisitor>
#include <osgUtil/LineSegmentIntersector>
@@ -39,7 +40,7 @@ BEGIN_OBJECT_REFLECTOR(osgUtil::LineSegmentIntersector)
I_Constructor3(IN, osgUtil::Intersector::CoordinateFrame, cf, IN, double, x, IN, double, y,
____LineSegmentIntersector__CoordinateFrame__double__double,
"Convinience constructor for supporting picking in WINDOW, or PROJECTION coorindates In WINDOW coordinates creates a start value of (x,y,0) and end value of (x,y,1). ",
"In PROJECTION coordinates (clip space cube) creates a start value of (x,y,1) and end value of (x,y,-1). In VIEW and MODEL coordinates creates a start value of (x,y,0) and end value of (x,y,1). ");
"In PROJECTION coordinates (clip space cube) creates a start value of (x,y,-1) and end value of (x,y,1). In VIEW and MODEL coordinates creates a start value of (x,y,0) and end value of (x,y,1). ");
I_Method1(void, insertIntersection, IN, const osgUtil::LineSegmentIntersector::Intersection &, intersection,
__void__insertIntersection__C5_Intersection_R1,
"",
@@ -86,10 +87,40 @@ END_REFLECTOR
TYPE_NAME_ALIAS(std::vector< unsigned int >, osgUtil::LineSegmentIntersector::Intersection::IndexList);
TYPE_NAME_ALIAS(std::vector< double >, osgUtil::LineSegmentIntersector::Intersection::RatioList);
BEGIN_VALUE_REFLECTOR(osgUtil::LineSegmentIntersector::Intersection)
I_Constructor0(____Intersection,
"",
"");
I_Method0(const osg::Vec3d &, getLocalIntersectPoint,
__C5_osg_Vec3d_R1__getLocalIntersectPoint,
"",
"");
I_Method0(osg::Vec3d, getWorldIntersectPoint,
__osg_Vec3d__getWorldIntersectPoint,
"",
"");
I_Method0(const osg::Vec3 &, getLocalIntersectNormal,
__C5_osg_Vec3_R1__getLocalIntersectNormal,
"",
"");
I_Method0(osg::Vec3, getWorldIntersectNormal,
__osg_Vec3__getWorldIntersectNormal,
"",
"");
I_SimpleProperty(const osg::Vec3 &, LocalIntersectNormal,
__C5_osg_Vec3_R1__getLocalIntersectNormal,
0);
I_SimpleProperty(const osg::Vec3d &, LocalIntersectPoint,
__C5_osg_Vec3d_R1__getLocalIntersectPoint,
0);
I_SimpleProperty(osg::Vec3, WorldIntersectNormal,
__osg_Vec3__getWorldIntersectNormal,
0);
I_SimpleProperty(osg::Vec3d, WorldIntersectPoint,
__osg_Vec3d__getWorldIntersectPoint,
0);
I_PublicMemberProperty(double, ratio);
I_PublicMemberProperty(osg::NodePath, nodePath);
I_PublicMemberProperty(osg::ref_ptr< osg::Drawable >, drawable);
@@ -97,8 +128,11 @@ BEGIN_VALUE_REFLECTOR(osgUtil::LineSegmentIntersector::Intersection)
I_PublicMemberProperty(osg::Vec3d, localIntersectionPoint);
I_PublicMemberProperty(osg::Vec3, localIntersectionNormal);
I_PublicMemberProperty(osgUtil::LineSegmentIntersector::Intersection::IndexList, indexList);
I_PublicMemberProperty(osgUtil::LineSegmentIntersector::Intersection::RatioList, ratioList);
I_PublicMemberProperty(unsigned int, primitiveIndex);
END_REFLECTOR
STD_SET_REFLECTOR(std::multiset< osgUtil::LineSegmentIntersector::Intersection >);
STD_VECTOR_REFLECTOR(std::vector< double >);

View File

@@ -112,7 +112,5 @@ BEGIN_VALUE_REFLECTOR(osgUtil::PlaneIntersector::Intersection)
I_PublicMemberProperty(osgUtil::PlaneIntersector::Intersection::Attributes, attributes);
END_REFLECTOR
STD_VECTOR_REFLECTOR(std::vector< double >);
STD_VECTOR_REFLECTOR(std::vector< osgUtil::PlaneIntersector::Intersection >);

View File

@@ -13,8 +13,6 @@
#include <osg/FrameStamp>
#include <osg/Node>
#include <osgDB/DatabasePager>
#include <osgGA/EventQueue>
#include <osgGA/GUIEventHandler>
#include <osgViewer/Scene>
// Must undefine IN and OUT macros defined in Windows headers
@@ -25,8 +23,6 @@
#undef OUT
#endif
TYPE_NAME_ALIAS(std::list< osg::ref_ptr< osgGA::GUIEventHandler > >, osgViewer::Scene::EventHandlers);
BEGIN_OBJECT_REFLECTOR(osgViewer::Scene)
I_VirtualBaseType(osg::Referenced);
I_Constructor0(____Scene,
@@ -48,30 +44,6 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::Scene)
__osg_FrameStamp_P1__getFrameStamp,
"",
"");
I_Method1(void, setEventQueue, IN, osgGA::EventQueue *, eventQueue,
__void__setEventQueue__osgGA_EventQueue_P1,
"",
"");
I_Method0(osgGA::EventQueue *, getEventQueue,
__osgGA_EventQueue_P1__getEventQueue,
"",
"");
I_Method0(const osgGA::EventQueue *, getEventQueue,
__C5_osgGA_EventQueue_P1__getEventQueue,
"",
"");
I_Method1(void, addEventHandler, IN, osgGA::GUIEventHandler *, eventHandler,
__void__addEventHandler__osgGA_GUIEventHandler_P1,
"",
"");
I_Method0(osgViewer::Scene::EventHandlers &, getEventHandlers,
__EventHandlers_R1__getEventHandlers,
"",
"");
I_Method0(const osgViewer::Scene::EventHandlers &, getEventHandlers,
__C5_EventHandlers_R1__getEventHandlers,
"",
"");
I_Method1(void, setDatabasePager, IN, osgDB::DatabasePager *, dp,
__void__setDatabasePager__osgDB_DatabasePager_P1,
"",
@@ -88,10 +60,6 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::Scene)
__void__frameAdvance,
"",
"");
I_Method0(void, frameEventTraversal,
__void__frameEventTraversal,
"",
"");
I_Method0(void, frameUpdateTraversal,
__void__frameUpdateTraversal,
"",
@@ -103,12 +71,6 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::Scene)
I_SimpleProperty(osgDB::DatabasePager *, DatabasePager,
__osgDB_DatabasePager_P1__getDatabasePager,
__void__setDatabasePager__osgDB_DatabasePager_P1);
I_SimpleProperty(osgViewer::Scene::EventHandlers &, EventHandlers,
__EventHandlers_R1__getEventHandlers,
0);
I_SimpleProperty(osgGA::EventQueue *, EventQueue,
__osgGA_EventQueue_P1__getEventQueue,
__void__setEventQueue__osgGA_EventQueue_P1);
I_SimpleProperty(osg::FrameStamp *, FrameStamp,
__osg_FrameStamp_P1__getFrameStamp,
0);

View File

@@ -10,10 +10,12 @@
#include <osgIntrospection/StaticMethodInfo>
#include <osgIntrospection/Attributes>
#include <osg/DisplaySettings>
#include <osg/Node>
#include <osgGA/EventQueue>
#include <osgGA/GUIEventHandler>
#include <osgGA/MatrixManipulator>
#include <osgUtil/LineSegmentIntersector>
#include <osgViewer/View>
// Must undefine IN and OUT macros defined in Windows headers
@@ -80,6 +82,18 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::View)
__C5_EventHandlers_R1__getEventHandlers,
"",
"");
I_Method1(void, setDisplaySettings, IN, osg::DisplaySettings *, ds,
__void__setDisplaySettings__osg_DisplaySettings_P1,
"Set the DsplaySettings object associated with this view. ",
"");
I_Method0(osg::DisplaySettings *, getDisplaySettings,
__osg_DisplaySettings_P1__getDisplaySettings,
"Set the DsplaySettings object associated with this view. ",
"");
I_Method0(const osg::DisplaySettings *, getDisplaySettings,
__C5_osg_DisplaySettings_P1__getDisplaySettings,
"Set the DsplaySettings object associated with this view. ",
"");
I_Method0(void, setUpViewAcrossAllScreens,
__void__setUpViewAcrossAllScreens,
"Convinience method for creating slave Cameras and associated GraphicsWindows across all screens. ",
@@ -88,6 +102,14 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::View)
__void__setUpViewOnSingleScreen__unsigned_int,
"Convinience method for a single Camara associated with a single full screen GraphicsWindow. ",
"");
I_MethodWithDefaults4(bool, computeIntersections, IN, float, x, , IN, float, y, , IN, osgUtil::LineSegmentIntersector::Intersections &, intersections, , IN, osg::Node::NodeMask, traversalMask, 0xffffffff,
__bool__computeIntersections__float__float__osgUtil_LineSegmentIntersector_Intersections_R1__osg_Node_NodeMask,
"Compute intersections between a ray through the specified master cameras window/eye coords and a specified node. ",
"Note, when a master cameras has slaves and no viewport itself its coordinate frame will be in clip space i.e. -1,-1 to 1,1, while if its has a viewport the coordintates will be relative to its viewport dimensions. Mouse events handled by the view will automatically be attached into the master camera window/clip coords so can be passed directly on to the computeIntersections method. ");
I_MethodWithDefaults5(bool, computeIntersections, IN, float, x, , IN, float, y, , IN, osg::NodePath &, nodePath, , IN, osgUtil::LineSegmentIntersector::Intersections &, intersections, , IN, osg::Node::NodeMask, traversalMask, 0xffffffff,
__bool__computeIntersections__float__float__osg_NodePath_R1__osgUtil_LineSegmentIntersector_Intersections_R1__osg_Node_NodeMask,
"Compute intersections between a ray through the specified master cameras window/eye coords and a specified nodePath's subgraph. ",
"");
I_Method0(void, requestRedraw,
__void__requestRedraw,
"requestRedraw() requests a single redraw. ",
@@ -107,6 +129,9 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::View)
I_SimpleProperty(osgGA::MatrixManipulator *, CameraManipulator,
__osgGA_MatrixManipulator_P1__getCameraManipulator,
__void__setCameraManipulator__osgGA_MatrixManipulator_P1);
I_SimpleProperty(osg::DisplaySettings *, DisplaySettings,
__osg_DisplaySettings_P1__getDisplaySettings,
__void__setDisplaySettings__osg_DisplaySettings_P1);
I_SimpleProperty(osgViewer::View::EventHandlers &, EventHandlers,
__EventHandlers_R1__getEventHandlers,
0);