From 90f355bd4e9a82d456d8acfe01d20ae7f32a92db Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 27 Mar 2007 19:39:00 +0000 Subject: [PATCH] Updated wrappers --- .../osgTerrain/GeometryTechnique.cpp | 4 +- src/osgWrappers/osgTerrain/Layer.cpp | 40 ++++++- src/osgWrappers/osgTerrain/Locator.cpp | 113 +++++++++++++++++- src/osgWrappers/osgTerrain/TerrainNode.cpp | 6 + .../osgTerrain/TerrainTechnique.cpp | 10 +- 5 files changed, 160 insertions(+), 13 deletions(-) diff --git a/src/osgWrappers/osgTerrain/GeometryTechnique.cpp b/src/osgWrappers/osgTerrain/GeometryTechnique.cpp index 7b35e9ce6..a45e8e2ec 100644 --- a/src/osgWrappers/osgTerrain/GeometryTechnique.cpp +++ b/src/osgWrappers/osgTerrain/GeometryTechnique.cpp @@ -32,9 +32,9 @@ BEGIN_OBJECT_REFLECTOR(osgTerrain::GeometryTechnique) ____GeometryTechnique__C5_GeometryTechnique_R1__C5_osg_CopyOp_R1, "Copy constructor using CopyOp to manage deep vs shallow copy. ", ""); - I_Method0(void, initialize, + I_Method0(void, init, Properties::VIRTUAL, - __void__initialize, + __void__init, "", ""); I_Method1(void, update, IN, osgUtil::UpdateVisitor *, nv, diff --git a/src/osgWrappers/osgTerrain/Layer.cpp b/src/osgWrappers/osgTerrain/Layer.cpp index d1021ecfe..00bfe6b45 100644 --- a/src/osgWrappers/osgTerrain/Layer.cpp +++ b/src/osgWrappers/osgTerrain/Layer.cpp @@ -11,8 +11,10 @@ #include #include +#include #include #include +#include #include #include #include @@ -25,7 +27,7 @@ #undef OUT #endif -BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgTerrain::ArrayLayer) +BEGIN_OBJECT_REFLECTOR(osgTerrain::ArrayLayer) I_BaseType(osgTerrain::Layer); I_Constructor0(____ArrayLayer, "", @@ -54,7 +56,7 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgTerrain::ArrayLayer) __void__setArray__osg_Array_P1); END_REFLECTOR -BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgTerrain::HeightFieldLayer) +BEGIN_OBJECT_REFLECTOR(osgTerrain::HeightFieldLayer) I_BaseType(osgTerrain::Layer); I_Constructor0(____HeightFieldLayer, "", @@ -83,7 +85,7 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgTerrain::HeightFieldLayer) __void__setHeightField__osg_HeightField_P1); END_REFLECTOR -BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgTerrain::ImageLayer) +BEGIN_OBJECT_REFLECTOR(osgTerrain::ImageLayer) I_BaseType(osgTerrain::Layer); I_Constructor0(____ImageLayer, "", @@ -112,7 +114,7 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgTerrain::ImageLayer) __void__setImage__osg_Image_P1); END_REFLECTOR -BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgTerrain::Layer) +BEGIN_OBJECT_REFLECTOR(osgTerrain::Layer) I_BaseType(osg::Object); I_Constructor0(____Layer, "", @@ -121,6 +123,31 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgTerrain::Layer) ____Layer__C5_Layer_R1__C5_osg_CopyOp_R1, "Copy constructor using CopyOp to manage deep vs shallow copy. ", ""); + 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_Method1(void, setLocator, IN, osgTerrain::Locator *, locator, Properties::NON_VIRTUAL, __void__setLocator__Locator_P1, @@ -136,6 +163,11 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgTerrain::Layer) __C5_Locator_P1__getLocator, "", ""); + I_Method0(osg::BoundingSphere, computeBound, + Properties::VIRTUAL, + __osg_BoundingSphere__computeBound, + "", + ""); I_SimpleProperty(osgTerrain::Locator *, Locator, __Locator_P1__getLocator, __void__setLocator__Locator_P1); diff --git a/src/osgWrappers/osgTerrain/Locator.cpp b/src/osgWrappers/osgTerrain/Locator.cpp index 4ae7c0c60..253ebd8db 100644 --- a/src/osgWrappers/osgTerrain/Locator.cpp +++ b/src/osgWrappers/osgTerrain/Locator.cpp @@ -10,7 +10,9 @@ #include #include +#include #include +#include #include #include @@ -22,7 +24,83 @@ #undef OUT #endif -BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgTerrain::Locator) +BEGIN_OBJECT_REFLECTOR(osgTerrain::EllipsoidLocator) + I_BaseType(osgTerrain::Locator); + I_ConstructorWithDefaults5(IN, double, longitude, , IN, double, latitude, , IN, double, deltaLongitude, , IN, double, deltaLatitude, , IN, double, height, 0.0, + ____EllipsoidLocator__double__double__double__double__double, + "", + ""); + I_MethodWithDefaults5(void, setExtents, IN, double, longitude, , IN, double, latitude, , IN, double, deltaLongitude, , IN, double, deltaLatitude, , IN, double, height, 0.0, + Properties::NON_VIRTUAL, + __void__setExtents__double__double__double__double__double, + "", + ""); + I_Method0(double, getLongitude, + Properties::NON_VIRTUAL, + __double__getLongitude, + "", + ""); + I_Method0(double, getDeltaLongitude, + Properties::NON_VIRTUAL, + __double__getDeltaLongitude, + "", + ""); + I_Method0(double, getLatitude, + Properties::NON_VIRTUAL, + __double__getLatitude, + "", + ""); + I_Method0(double, getDeltaLatitude, + Properties::NON_VIRTUAL, + __double__getDeltaLatitude, + "", + ""); + I_Method0(double, getHeight, + Properties::NON_VIRTUAL, + __double__getHeight, + "", + ""); + I_Method0(osg::EllipsoidModel *, getEllipsoidModel, + Properties::NON_VIRTUAL, + __osg_EllipsoidModel_P1__getEllipsoidModel, + "", + ""); + I_Method0(const osg::EllipsoidModel *, getEllipsoidModel, + Properties::NON_VIRTUAL, + __C5_osg_EllipsoidModel_P1__getEllipsoidModel, + "", + ""); + I_Method2(bool, convertLocalToModel, IN, const osg::Vec3d &, local, IN, osg::Vec3d &, world, + Properties::VIRTUAL, + __bool__convertLocalToModel__C5_osg_Vec3d_R1__osg_Vec3d_R1, + "", + ""); + I_Method2(bool, convertModelToWorld, IN, const osg::Vec3d &, world, IN, osg::Vec3d &, local, + Properties::VIRTUAL, + __bool__convertModelToWorld__C5_osg_Vec3d_R1__osg_Vec3d_R1, + "", + ""); + I_SimpleProperty(double, DeltaLatitude, + __double__getDeltaLatitude, + 0); + I_SimpleProperty(double, DeltaLongitude, + __double__getDeltaLongitude, + 0); + I_SimpleProperty(osg::EllipsoidModel *, EllipsoidModel, + __osg_EllipsoidModel_P1__getEllipsoidModel, + 0); + I_SimpleProperty(double, Height, + __double__getHeight, + 0); + I_SimpleProperty(double, Latitude, + __double__getLatitude, + 0); + I_SimpleProperty(double, Longitude, + __double__getLongitude, + 0); +END_REFLECTOR + +BEGIN_OBJECT_REFLECTOR(osgTerrain::Locator) I_BaseType(osg::Object); I_Constructor0(____Locator, "", @@ -31,13 +109,38 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgTerrain::Locator) ____Locator__C5_Locator_R1__C5_osg_CopyOp_R1, "Copy constructor using CopyOp to manage deep vs shallow copy. ", ""); - I_Method2(bool, convertLocalToModel, IN, const osg::Vec3d &, local, IN, osg::Vec3d &, world, - Properties::PURE_VIRTUAL, + 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_Method2(bool, convertLocalToModel, IN, const osg::Vec3d &, x, IN, osg::Vec3d &, x, + Properties::VIRTUAL, __bool__convertLocalToModel__C5_osg_Vec3d_R1__osg_Vec3d_R1, "", ""); - I_Method2(bool, convertModelToWorld, IN, const osg::Vec3d &, local, IN, osg::Vec3d &, world, - Properties::PURE_VIRTUAL, + I_Method2(bool, convertModelToWorld, IN, const osg::Vec3d &, x, IN, osg::Vec3d &, x, + Properties::VIRTUAL, __bool__convertModelToWorld__C5_osg_Vec3d_R1__osg_Vec3d_R1, "", ""); diff --git a/src/osgWrappers/osgTerrain/TerrainNode.cpp b/src/osgWrappers/osgTerrain/TerrainNode.cpp index ed8d80127..0dc29a887 100644 --- a/src/osgWrappers/osgTerrain/TerrainNode.cpp +++ b/src/osgWrappers/osgTerrain/TerrainNode.cpp @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -146,6 +147,11 @@ BEGIN_OBJECT_REFLECTOR(osgTerrain::TerrainNode) __C5_osg_TransferFunction_P1__getColorTransferFunction, "", ""); + I_Method0(osg::BoundingSphere, computeBound, + Properties::VIRTUAL, + __osg_BoundingSphere__computeBound, + "Compute the bounding volume of the terrain by computing the union of the bounding volumes of all layers. ", + ""); I_SimpleProperty(osgTerrain::Layer *, ColorLayer, __Layer_P1__getColorLayer, __void__setColorLayer__osgTerrain_Layer_P1); diff --git a/src/osgWrappers/osgTerrain/TerrainTechnique.cpp b/src/osgWrappers/osgTerrain/TerrainTechnique.cpp index f0e895774..88d1a7faa 100644 --- a/src/osgWrappers/osgTerrain/TerrainTechnique.cpp +++ b/src/osgWrappers/osgTerrain/TerrainTechnique.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #include #include @@ -69,9 +70,9 @@ BEGIN_OBJECT_REFLECTOR(osgTerrain::TerrainTechnique) __C5_TerrainNode_P1__getTerrainNode, "", ""); - I_Method0(void, initialize, + I_Method0(void, init, Properties::VIRTUAL, - __void__initialize, + __void__init, "", ""); I_Method1(void, update, IN, osgUtil::UpdateVisitor *, nv, @@ -89,6 +90,11 @@ BEGIN_OBJECT_REFLECTOR(osgTerrain::TerrainTechnique) __void__cleanSceneGraph, "Clean scene graph from any terrain technique specific nodes. ", ""); + I_Method1(void, traverse, IN, osg::NodeVisitor &, nv, + Properties::VIRTUAL, + __void__traverse__osg_NodeVisitor_R1, + "Traverse the terain subgraph. ", + ""); I_Method0(void, dirty, Properties::VIRTUAL, __void__dirty,