From bcda53acb1e5b69c136e91273b021490e27c4ffb Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 19 Dec 2006 16:47:34 +0000 Subject: [PATCH] Updated wrappers --- src/osgWrappers/osg/GraphicsContext.cpp | 8 ++++++ src/osgWrappers/osg/View.cpp | 4 +++ src/osgWrappers/osgSim/ElevationSlice.cpp | 16 +++++------ src/osgWrappers/osgSim/HeightAboveTerrain.cpp | 16 +++++------ src/osgWrappers/osgSim/LineOfSight.cpp | 16 +++++------ src/osgWrappers/osgUtil/SceneView.cpp | 28 ++++++++++++++++++- src/osgWrappers/osgViewer/View.cpp | 13 +++++++-- src/osgWrappers/osgViewer/Viewer.cpp | 4 +++ 8 files changed, 77 insertions(+), 28 deletions(-) diff --git a/src/osgWrappers/osg/GraphicsContext.cpp b/src/osgWrappers/osg/GraphicsContext.cpp index d65559d05..e3c3fac23 100644 --- a/src/osgWrappers/osg/GraphicsContext.cpp +++ b/src/osgWrappers/osg/GraphicsContext.cpp @@ -159,6 +159,14 @@ BEGIN_VALUE_REFLECTOR(osg::GraphicsContext::ScreenIdentifier) I_Constructor0(____ScreenIdentifier, "", ""); + I_Constructor1(IN, unsigned int, screenNum, + ____ScreenIdentifier__unsigned_int, + "", + ""); + I_Constructor3(IN, const std::string &, hostName, IN, unsigned int, displayNum, IN, unsigned int, screenNum, + ____ScreenIdentifier__C5_std_string_R1__unsigned_int__unsigned_int, + "", + ""); I_PublicMemberProperty(std::string, _hostName); I_PublicMemberProperty(unsigned int, _displayNum); I_PublicMemberProperty(unsigned int, _screenNum); diff --git a/src/osgWrappers/osg/View.cpp b/src/osgWrappers/osg/View.cpp index 61a5d77b6..c02cc119f 100644 --- a/src/osgWrappers/osg/View.cpp +++ b/src/osgWrappers/osg/View.cpp @@ -64,6 +64,10 @@ BEGIN_OBJECT_REFLECTOR(osg::View) __C5_Slave_R1__getSlave__unsigned_int, "", ""); + I_Method0(void, updateSlaves, + __void__updateSlaves, + "", + ""); I_SimpleProperty(osg::Camera *, Camera, __osg_Camera_P1__getCamera, __void__setCamera__osg_Camera_P1); diff --git a/src/osgWrappers/osgSim/ElevationSlice.cpp b/src/osgWrappers/osgSim/ElevationSlice.cpp index 65a631724..6aec50439 100644 --- a/src/osgWrappers/osgSim/ElevationSlice.cpp +++ b/src/osgWrappers/osgSim/ElevationSlice.cpp @@ -58,10 +58,10 @@ BEGIN_VALUE_REFLECTOR(osgSim::ElevationSlice) __C5_DistanceHeightList_R1__getDistanceHeightIntersections, "Get the intersections in the form a vector of pair representing distance along the slice and height. ", ""); - I_Method1(void, computeIntersections, IN, osg::Node *, scene, - __void__computeIntersections__osg_Node_P1, - "Compute the intersections with the specified scene graph, the results are stored in vectors of Vec3d. ", - "Note, if the topmost node is a CoordinateSystemNode then the input points are assumed to be geocentric, with the up vector defined by the EllipsoidModel attached to the CoordinateSystemNode. If the topmost node is not a CoordinateSystemNode then a local coordinates frame is assumed, with a local up vector. "); + I_MethodWithDefaults2(void, computeIntersections, IN, osg::Node *, scene, , IN, osg::Node::NodeMask, traversalMask, 0xffffffff, + __void__computeIntersections__osg_Node_P1__osg_Node_NodeMask, + "Compute the intersections with the specified scene graph, the results are stored in vectors of Vec3d. ", + "Note, if the topmost node is a CoordinateSystemNode then the input points are assumed to be geocentric, with the up vector defined by the EllipsoidModel attached to the CoordinateSystemNode. If the topmost node is not a CoordinateSystemNode then a local coordinates frame is assumed, with a local up vector. "); I_Method0(void, clearDatabaseCache, __void__clearDatabaseCache, "Clear the database cache. ", @@ -78,10 +78,10 @@ BEGIN_VALUE_REFLECTOR(osgSim::ElevationSlice) __osgUtil_IntersectionVisitor_R1__getIntersectionVisitor, "Get the IntersectionVistor that does the intersection traversal over the scene. ", "Note, if you want to customized the traversal then you can use the IntersectionVisitor's method to alter its behavior. "); - I_StaticMethod3(osgSim::ElevationSlice::Vec3dList, computeElevationSlice, IN, osg::Node *, scene, IN, const osg::Vec3d &, startPoint, IN, const osg::Vec3d &, endPoint, - __Vec3dList__computeElevationSlice__osg_Node_P1__C5_osg_Vec3d_R1__C5_osg_Vec3d_R1_S, - "Compute the vertical distance between the specified scene graph and a single HAT point. ", - ""); + I_StaticMethodWithDefaults4(osgSim::ElevationSlice::Vec3dList, computeElevationSlice, IN, osg::Node *, scene, , IN, const osg::Vec3d &, startPoint, , IN, const osg::Vec3d &, endPoint, , IN, osg::Node::NodeMask, traversalMask, 0xffffffff, + __Vec3dList__computeElevationSlice__osg_Node_P1__C5_osg_Vec3d_R1__C5_osg_Vec3d_R1__osg_Node_NodeMask_S, + "Compute the vertical distance between the specified scene graph and a single HAT point. ", + ""); I_SimpleProperty(osgSim::DatabaseCacheReadCallback *, DatabaseCacheReadCallback, __DatabaseCacheReadCallback_P1__getDatabaseCacheReadCallback, __void__setDatabaseCacheReadCallback__DatabaseCacheReadCallback_P1); diff --git a/src/osgWrappers/osgSim/HeightAboveTerrain.cpp b/src/osgWrappers/osgSim/HeightAboveTerrain.cpp index f4e183e8d..79a0ab388 100644 --- a/src/osgWrappers/osgSim/HeightAboveTerrain.cpp +++ b/src/osgWrappers/osgSim/HeightAboveTerrain.cpp @@ -60,10 +60,10 @@ BEGIN_VALUE_REFLECTOR(osgSim::HeightAboveTerrain) __double__getLowestHeight, "Get the lowest height that the should be tested for. ", ""); - I_Method1(void, computeIntersections, IN, osg::Node *, scene, - __void__computeIntersections__osg_Node_P1, - "Compute the HAT intersections with the specified scene graph. ", - "The results are all stored in the form of a single height above terrain value per HAT test. Note, if the topmost node is a CoordinateSystemNode then the input points are assumed to be geocentric, with the up vector defined by the EllipsoidModel attached to the CoordinateSystemNode. If the topmost node is not a CoordinateSystemNode then a local coordinates frame is assumed, with a local up vector. "); + I_MethodWithDefaults2(void, computeIntersections, IN, osg::Node *, scene, , IN, osg::Node::NodeMask, traversalMask, 0xffffffff, + __void__computeIntersections__osg_Node_P1__osg_Node_NodeMask, + "Compute the HAT intersections with the specified scene graph. ", + "The results are all stored in the form of a single height above terrain value per HAT test. Note, if the topmost node is a CoordinateSystemNode then the input points are assumed to be geocentric, with the up vector defined by the EllipsoidModel attached to the CoordinateSystemNode. If the topmost node is not a CoordinateSystemNode then a local coordinates frame is assumed, with a local up vector. "); I_Method0(void, clearDatabaseCache, __void__clearDatabaseCache, "Clear the database cache. ", @@ -80,10 +80,10 @@ BEGIN_VALUE_REFLECTOR(osgSim::HeightAboveTerrain) __osgUtil_IntersectionVisitor_R1__getIntersectionVisitor, "Get the IntersectionVistor that does the intersection traversal over the scene. ", "Note, if you want to customized the traversal then you can use the IntersectionVisitor's method to alter its behavior. "); - I_StaticMethod2(double, computeHeightAboveTerrain, IN, osg::Node *, scene, IN, const osg::Vec3d &, point, - __double__computeHeightAboveTerrain__osg_Node_P1__C5_osg_Vec3d_R1_S, - "Compute the vertical distance between the specified scene graph and a single HAT point. ", - ""); + I_StaticMethodWithDefaults3(double, computeHeightAboveTerrain, IN, osg::Node *, scene, , IN, const osg::Vec3d &, point, , IN, osg::Node::NodeMask, traversalMask, 0xffffffff, + __double__computeHeightAboveTerrain__osg_Node_P1__C5_osg_Vec3d_R1__osg_Node_NodeMask_S, + "Compute the vertical distance between the specified scene graph and a single HAT point. ", + ""); I_SimpleProperty(osgSim::DatabaseCacheReadCallback *, DatabaseCacheReadCallback, __DatabaseCacheReadCallback_P1__getDatabaseCacheReadCallback, __void__setDatabaseCacheReadCallback__DatabaseCacheReadCallback_P1); diff --git a/src/osgWrappers/osgSim/LineOfSight.cpp b/src/osgWrappers/osgSim/LineOfSight.cpp index 6b4137ea9..ea23d5ed9 100644 --- a/src/osgWrappers/osgSim/LineOfSight.cpp +++ b/src/osgWrappers/osgSim/LineOfSight.cpp @@ -91,10 +91,10 @@ BEGIN_VALUE_REFLECTOR(osgSim::LineOfSight) __C5_Intersections_R1__getIntersections__unsigned_int, "Get the intersection points for a single line of sight test. ", ""); - I_Method1(void, computeIntersections, IN, osg::Node *, scene, - __void__computeIntersections__osg_Node_P1, - "Compute the LOS intersections with the specified scene graph. ", - "The results are all stored in the form of Intersections list, one per LOS test. "); + I_MethodWithDefaults2(void, computeIntersections, IN, osg::Node *, scene, , IN, osg::Node::NodeMask, traversalMask, 0xffffffff, + __void__computeIntersections__osg_Node_P1__osg_Node_NodeMask, + "Compute the LOS intersections with the specified scene graph. ", + "The results are all stored in the form of Intersections list, one per LOS test. "); I_Method0(void, clearDatabaseCache, __void__clearDatabaseCache, "Clear the database cache. ", @@ -111,10 +111,10 @@ BEGIN_VALUE_REFLECTOR(osgSim::LineOfSight) __osgUtil_IntersectionVisitor_R1__getIntersectionVisitor, "Get the IntersectionVistor that does the intersection traversal over the scene. ", "Note, if you want to customized the traversal then you can use the IntersectionVisitor's method to alter its behavior. "); - I_StaticMethod3(osgSim::LineOfSight::Intersections, computeIntersections, IN, osg::Node *, scene, IN, const osg::Vec3d &, start, IN, const osg::Vec3d &, end, - __Intersections__computeIntersections__osg_Node_P1__C5_osg_Vec3d_R1__C5_osg_Vec3d_R1_S, - "Compute the intersection between the specified scene graph and a single LOS start,end pair. ", - "Returns an IntersectionList, of all the points intersected. "); + I_StaticMethodWithDefaults4(osgSim::LineOfSight::Intersections, computeIntersections, IN, osg::Node *, scene, , IN, const osg::Vec3d &, start, , IN, const osg::Vec3d &, end, , IN, osg::Node::NodeMask, traversalMask, 0xffffffff, + __Intersections__computeIntersections__osg_Node_P1__C5_osg_Vec3d_R1__C5_osg_Vec3d_R1__osg_Node_NodeMask_S, + "Compute the intersection between the specified scene graph and a single LOS start,end pair. ", + "Returns an IntersectionList, of all the points intersected. "); I_SimpleProperty(osgSim::DatabaseCacheReadCallback *, DatabaseCacheReadCallback, __DatabaseCacheReadCallback_P1__getDatabaseCacheReadCallback, __void__setDatabaseCacheReadCallback__DatabaseCacheReadCallback_P1); diff --git a/src/osgWrappers/osgUtil/SceneView.cpp b/src/osgWrappers/osgUtil/SceneView.cpp index 6e1081fc9..29a4dd261 100644 --- a/src/osgWrappers/osgUtil/SceneView.cpp +++ b/src/osgWrappers/osgUtil/SceneView.cpp @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -19,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -66,12 +68,36 @@ BEGIN_ENUM_REFLECTOR(osgUtil::SceneView::FusionDistanceMode) END_REFLECTOR BEGIN_OBJECT_REFLECTOR(osgUtil::SceneView) - I_BaseType(osg::Referenced); + I_BaseType(osg::Object); I_BaseType(osg::CullSettings); I_ConstructorWithDefaults1(IN, osg::DisplaySettings *, ds, NULL, ____SceneView__osg_DisplaySettings_P1, "Construct a default scene view. ", ""); + I_ConstructorWithDefaults2(IN, const osgUtil::SceneView &, sceneview, , IN, const osg::CopyOp &, copyop, osg::CopyOp(), + ____SceneView__C5_SceneView_R1__C5_osg_CopyOp_R1, + "", + ""); + I_Method0(osg::Object *, cloneType, + __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, + __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, + __bool__isSameKindAs__C5_osg_Object_P1, + "", + ""); + I_Method0(const char *, libraryName, + __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, + __C5_char_P1__className, + "return the name of the object's class type. ", + "Must be defined by derived classes. "); I_MethodWithDefaults1(void, setDefaults, IN, unsigned int, options, osgUtil::SceneView::STANDARD_SETTINGS, __void__setDefaults__unsigned_int, "Set scene view to use default global state, light, camera and render visitor. ", diff --git a/src/osgWrappers/osgViewer/View.cpp b/src/osgWrappers/osgViewer/View.cpp index b6845ac37..ce80e5cb0 100644 --- a/src/osgWrappers/osgViewer/View.cpp +++ b/src/osgWrappers/osgViewer/View.cpp @@ -27,7 +27,6 @@ TYPE_NAME_ALIAS(std::list< osg::ref_ptr< osgGA::GUIEventHandler > >, osgViewer:: BEGIN_OBJECT_REFLECTOR(osgViewer::View) I_BaseType(osg::View); - I_BaseType(osgViewer::Scene); I_Constructor0(____View, "", ""); @@ -67,8 +66,16 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::View) __C5_EventHandlers_R1__getEventHandlers, "", ""); - I_Method0(void, init, - __void__init, + I_Method0(void, setUpViewAcrossAllScreens, + __void__setUpViewAcrossAllScreens, + "Convinience method for creating slave Cameras and associated GraphicsWindows across all screens. ", + ""); + I_Method0(void, setUpRenderingSupport, + __void__setUpRenderingSupport, + "", + ""); + I_Method0(void, assignSceneDataToCameras, + __void__assignSceneDataToCameras, "", ""); I_SimpleProperty(osgGA::MatrixManipulator *, CameraManipulator, diff --git a/src/osgWrappers/osgViewer/Viewer.cpp b/src/osgWrappers/osgViewer/Viewer.cpp index ebc8bada1..2950416b4 100644 --- a/src/osgWrappers/osgViewer/Viewer.cpp +++ b/src/osgWrappers/osgViewer/Viewer.cpp @@ -25,6 +25,10 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::Viewer) I_Constructor0(____Viewer, "", ""); + I_Method0(void, realize, + __void__realize, + "set up windows and associated threads. ", + ""); I_Method0(void, frame, __void__frame, "Render a complete new frame. ",