From 259daac9a9a18250821772a9877b57f15030cd47 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 18 Nov 2009 11:26:00 +0000 Subject: [PATCH] Updated wrappers --- src/osgWrappers/osg/DisplaySettings.cpp | 39 +++ src/osgWrappers/osg/GraphicsContext.cpp | 12 +- src/osgWrappers/osg/Shader.cpp | 123 ++++++- src/osgWrappers/osg/State.cpp | 9 + src/osgWrappers/osgAnimation/Action.cpp | 316 +----------------- .../osgAnimation/ActionVisitor.cpp | 28 +- src/osgWrappers/osgAnimation/Bone.cpp | 2 +- .../osgAnimation/MorphGeometry.cpp | 2 +- src/osgWrappers/osgAnimation/RigGeometry.cpp | 78 +++-- src/osgWrappers/osgAnimation/Skeleton.cpp | 21 +- src/osgWrappers/osgAnimation/Skinning.cpp | 2 - src/osgWrappers/osgAnimation/StatsVisitor.cpp | 16 +- .../osgAnimation/UpdateCallback.cpp | 43 +-- src/osgWrappers/osgText/Font.cpp | 5 - 14 files changed, 264 insertions(+), 432 deletions(-) diff --git a/src/osgWrappers/osg/DisplaySettings.cpp b/src/osgWrappers/osg/DisplaySettings.cpp index ea9cb92a1..44ac1a02b 100644 --- a/src/osgWrappers/osg/DisplaySettings.cpp +++ b/src/osgWrappers/osg/DisplaySettings.cpp @@ -404,6 +404,36 @@ BEGIN_OBJECT_REFLECTOR(osg::DisplaySettings) __unsigned_int__getMaxBufferObjectPoolSize, "", ""); + I_Method1(void, setGLContextVersion, IN, const std::string &, version, + Properties::NON_VIRTUAL, + __void__setGLContextVersion__C5_std_string_R1, + "Set the hint of which OpenGL version to attempt to create a graphics context for. ", + ""); + I_Method0(const std::string, getGLContextVersion, + Properties::NON_VIRTUAL, + __C5_std_string__getGLContextVersion, + "Get the hint of which OpenGL version to attempt to create a graphics context for. ", + ""); + I_Method1(void, setGLContextFlags, IN, unsigned int, flags, + Properties::NON_VIRTUAL, + __void__setGLContextFlags__unsigned_int, + "Set the hint of the flags to use in when creating graphic contexts. ", + ""); + I_Method0(unsigned int, getGLContextFlags, + Properties::NON_VIRTUAL, + __unsigned_int__getGLContextFlags, + "Get the hint of the flags to use in when creating graphic contexts. ", + ""); + I_Method1(void, setGLContextProfileMask, IN, unsigned int, mask, + Properties::NON_VIRTUAL, + __void__setGLContextProfileMask__unsigned_int, + "Set the hint of the profile mask to use in when creating graphic contexts. ", + ""); + I_Method0(unsigned int, getGLContextProfileMask, + Properties::NON_VIRTUAL, + __unsigned_int__getGLContextProfileMask, + "Get the hint of the profile mask to use in when creating graphic contexts. ", + ""); I_SimpleProperty(bool, AccumBuffer, __bool__getAccumBuffer, 0); @@ -431,6 +461,15 @@ BEGIN_OBJECT_REFLECTOR(osg::DisplaySettings) I_SimpleProperty(float, EyeSeparation, __float__getEyeSeparation, __void__setEyeSeparation__float); + I_SimpleProperty(unsigned int, GLContextFlags, + __unsigned_int__getGLContextFlags, + __void__setGLContextFlags__unsigned_int); + I_SimpleProperty(unsigned int, GLContextProfileMask, + __unsigned_int__getGLContextProfileMask, + __void__setGLContextProfileMask__unsigned_int); + I_SimpleProperty(const std::string &, GLContextVersion, + 0, + __void__setGLContextVersion__C5_std_string_R1); I_SimpleProperty(unsigned int, MaxBufferObjectPoolSize, __unsigned_int__getMaxBufferObjectPoolSize, __void__setMaxBufferObjectPoolSize__unsigned_int); diff --git a/src/osgWrappers/osg/GraphicsContext.cpp b/src/osgWrappers/osg/GraphicsContext.cpp index 0e826b4b3..4f4fa5fdc 100644 --- a/src/osgWrappers/osg/GraphicsContext.cpp +++ b/src/osgWrappers/osg/GraphicsContext.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #include #include @@ -485,9 +486,11 @@ BEGIN_OBJECT_REFLECTOR(osg::GraphicsContext::Traits) I_DeclaringFile("osg/GraphicsContext"); I_BaseType(osg::Referenced); I_BaseType(osg::GraphicsContext::ScreenIdentifier); - I_Constructor0(____Traits, - "", - ""); + I_ConstructorWithDefaults1(IN, osg::DisplaySettings *, ds, 0, + Properties::NON_EXPLICIT, + ____Traits__DisplaySettings_P1, + "", + ""); I_PublicMemberProperty(int, x); I_PublicMemberProperty(int, y); I_PublicMemberProperty(int, width); @@ -514,6 +517,9 @@ BEGIN_OBJECT_REFLECTOR(osg::GraphicsContext::Traits) I_PublicMemberProperty(bool, vsync); I_PublicMemberProperty(bool, useMultiThreadedOpenGLEngine); I_PublicMemberProperty(bool, useCursor); + I_PublicMemberProperty(std::string, glContextVersion); + I_PublicMemberProperty(unsigned int, glContextFlags); + I_PublicMemberProperty(unsigned int, glContextProfileMask); I_PublicMemberProperty(osg::GraphicsContext *, sharedContext); I_PublicMemberProperty(osg::ref_ptr< osg::Referenced >, inheritedWindowData); I_PublicMemberProperty(bool, setInheritedWindowPixelFormat); diff --git a/src/osgWrappers/osg/Shader.cpp b/src/osgWrappers/osg/Shader.cpp index d3c6bc1cc..b7705e33d 100644 --- a/src/osgWrappers/osg/Shader.cpp +++ b/src/osgWrappers/osg/Shader.cpp @@ -43,6 +43,10 @@ BEGIN_OBJECT_REFLECTOR(osg::Shader) ____Shader__Type__C5_std_string_R1, "", ""); + I_Constructor2(IN, osg::Shader::Type, type, IN, osg::ShaderBinary *, shaderBinary, + ____Shader__Type__ShaderBinary_P1, + "", + ""); I_ConstructorWithDefaults2(IN, const osg::Shader &, rhs, , IN, const osg::CopyOp &, copyop, osg::CopyOp::SHALLOW_COPY, ____Shader__C5_Shader_R1__C5_osg_CopyOp_R1, "Copy constructor using CopyOp to manage deep vs shallow copy. ", @@ -80,22 +84,7 @@ BEGIN_OBJECT_REFLECTOR(osg::Shader) I_Method1(bool, setType, IN, osg::Shader::Type, t, Properties::NON_VIRTUAL, __bool__setType__Type, - "", - ""); - I_Method1(void, setShaderSource, IN, const std::string &, sourceText, - Properties::NON_VIRTUAL, - __void__setShaderSource__C5_std_string_R1, - "Load the Shader's source code text from a string. ", - ""); - I_Method1(bool, loadShaderSourceFromFile, IN, const std::string &, fileName, - Properties::NON_VIRTUAL, - __bool__loadShaderSourceFromFile__C5_std_string_R1, - "Load the Shader's source code text from a file. ", - ""); - I_Method0(const std::string &, getShaderSource, - Properties::NON_VIRTUAL, - __C5_std_string_R1__getShaderSource, - "Query the shader's source code text. ", + "Set the Shader type as an enum. ", ""); I_Method0(osg::Shader::Type, getType, Properties::NON_VIRTUAL, @@ -117,6 +106,36 @@ BEGIN_OBJECT_REFLECTOR(osg::Shader) __C5_std_string_R1__getFileName, "Get filename to which the shader source code belongs. ", ""); + I_Method1(void, setShaderSource, IN, const std::string &, sourceText, + Properties::NON_VIRTUAL, + __void__setShaderSource__C5_std_string_R1, + "Set the Shader's source code text from a string. ", + ""); + I_Method0(const std::string &, getShaderSource, + Properties::NON_VIRTUAL, + __C5_std_string_R1__getShaderSource, + "Query the shader's source code text. ", + ""); + I_Method1(void, setShaderBinary, IN, osg::ShaderBinary *, shaderBinary, + Properties::NON_VIRTUAL, + __void__setShaderBinary__ShaderBinary_P1, + "Set the Shader using a ShaderBinary. ", + ""); + I_Method0(osg::ShaderBinary *, getShaderBinary, + Properties::NON_VIRTUAL, + __ShaderBinary_P1__getShaderBinary, + "Get the Shader's ShaderBinary, return NULL if none is assigned. ", + ""); + I_Method0(const osg::ShaderBinary *, getShaderBinary, + Properties::NON_VIRTUAL, + __C5_ShaderBinary_P1__getShaderBinary, + "Get the const Shader's ShaderBinary, return NULL if none is assigned. ", + ""); + I_Method1(bool, loadShaderSourceFromFile, IN, const std::string &, fileName, + Properties::NON_VIRTUAL, + __bool__loadShaderSourceFromFile__C5_std_string_R1, + "Load the Shader's source code text from a file. ", + ""); I_Method1(void, resizeGLObjectBuffers, IN, unsigned int, maxSize, Properties::VIRTUAL, __void__resizeGLObjectBuffers__unsigned_int, @@ -155,7 +174,7 @@ BEGIN_OBJECT_REFLECTOR(osg::Shader) I_StaticMethod2(osg::Shader *, readShaderFile, IN, osg::Shader::Type, type, IN, const std::string &, fileName, __Shader_P1__readShaderFile__Type__C5_std_string_R1_S, "Read shader source from file and then constructor shader of specified type. ", - "Return the resulting Shader or 0 if no valid shader source code be read. "); + "Return the resulting Shader or 0 if no valid shader source could be read. "); I_StaticMethod2(void, deleteGlShader, IN, unsigned int, contextID, IN, GLuint, shader, __void__deleteGlShader__unsigned_int__GLuint_S, "Mark internal glShader for deletion. ", @@ -188,6 +207,9 @@ BEGIN_OBJECT_REFLECTOR(osg::Shader) I_SimpleProperty(const std::string &, FileName, __C5_std_string_R1__getFileName, __void__setFileName__C5_std_string_R1); + I_SimpleProperty(osg::ShaderBinary *, ShaderBinary, + __ShaderBinary_P1__getShaderBinary, + __void__setShaderBinary__ShaderBinary_P1); I_SimpleProperty(const std::string &, ShaderSource, __C5_std_string_R1__getShaderSource, __void__setShaderSource__C5_std_string_R1); @@ -199,3 +221,70 @@ BEGIN_OBJECT_REFLECTOR(osg::Shader) 0); END_REFLECTOR +BEGIN_OBJECT_REFLECTOR(osg::ShaderBinary) + I_DeclaringFile("osg/Shader"); + I_BaseType(osg::Object); + I_Constructor0(____ShaderBinary, + "", + ""); + I_ConstructorWithDefaults2(IN, const osg::ShaderBinary &, rhs, , IN, const osg::CopyOp &, copyop, osg::CopyOp::SHALLOW_COPY, + ____ShaderBinary__C5_ShaderBinary_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 &, x, + 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(void, assign, IN, unsigned int, size, IN, const unsigned char *, data, + Properties::NON_VIRTUAL, + __void__assign__unsigned_int__C5_unsigned_char_P1, + "Allocated a data buffer of specified size/*/ void allocate(unsigned int size);. ", + "/** Assign shader binary data, copying the specified data into locally stored data buffer, the original data can then be deleted. "); + I_Method0(unsigned int, getSize, + Properties::NON_VIRTUAL, + __unsigned_int__getSize, + "Get the size of the shader binary data. ", + ""); + I_Method0(unsigned char *, getData, + Properties::NON_VIRTUAL, + __unsigned_char_P1__getData, + "Get a ptr to the shader binary data. ", + ""); + I_Method0(const unsigned char *, getData, + Properties::NON_VIRTUAL, + __C5_unsigned_char_P1__getData, + "Get a const ptr to the shader binary data. ", + ""); + I_StaticMethod1(osg::ShaderBinary *, readShaderBinaryFile, IN, const std::string &, fileName, + __ShaderBinary_P1__readShaderBinaryFile__C5_std_string_R1_S, + "Read shader binary from file. ", + "Return the resulting Shader or 0 if no valid shader binary could be read. "); + I_SimpleProperty(unsigned char *, Data, + __unsigned_char_P1__getData, + 0); + I_SimpleProperty(unsigned int, Size, + __unsigned_int__getSize, + 0); +END_REFLECTOR + diff --git a/src/osgWrappers/osg/State.cpp b/src/osgWrappers/osg/State.cpp index 9a5d41d55..52d3fe682 100644 --- a/src/osgWrappers/osg/State.cpp +++ b/src/osgWrappers/osg/State.cpp @@ -45,6 +45,8 @@ TYPE_NAME_ALIAS(std::vector< const osg::StateSet * >, osg::State::StateSetStack) TYPE_NAME_ALIAS(std::vector< osg::VertexAttribAlias >, osg::State::VertexAttribAliasList) +TYPE_NAME_ALIAS(std::vector< GLushort >, osg::State::Indices) + TYPE_NAME_ALIAS(std::pair< const osg::StateAttribute * COMMA osg::StateAttribute::OverrideValue >, osg::State::AttributePair) TYPE_NAME_ALIAS(std::vector< osg::State::AttributePair >, osg::State::AttributeVec) @@ -486,6 +488,11 @@ BEGIN_OBJECT_REFLECTOR(osg::State) __void__unbindPixelBufferObject, "", ""); + I_MethodWithDefaults3(void, drawQuads, IN, GLint, first, , IN, GLsizei, count, , IN, GLsizei, primCount, 1, + Properties::NON_VIRTUAL, + __void__drawQuads__GLint__GLsizei__GLsizei, + "", + ""); I_Method4(void, glDrawArraysInstanced, IN, GLenum, mode, IN, GLint, first, IN, GLsizei, count, IN, GLsizei, primcount, Properties::NON_VIRTUAL, __void__glDrawArraysInstanced__GLenum__GLint__GLsizei__GLsizei, @@ -1128,6 +1135,8 @@ END_REFLECTOR STD_PAIR_REFLECTOR(std::pair< const osg::StateAttribute * COMMA osg::StateAttribute::OverrideValue >) +STD_VECTOR_REFLECTOR(std::vector< GLushort >) + STD_VECTOR_REFLECTOR(std::vector< const osg::StateSet * >) STD_VECTOR_REFLECTOR(std::vector< osg::State::AttributePair >) diff --git a/src/osgWrappers/osgAnimation/Action.cpp b/src/osgWrappers/osgAnimation/Action.cpp index 486a4baee..7f100ee44 100644 --- a/src/osgWrappers/osgAnimation/Action.cpp +++ b/src/osgWrappers/osgAnimation/Action.cpp @@ -14,7 +14,6 @@ #include #include #include -#include // Must undefine IN and OUT macros defined in Windows headers #ifdef IN @@ -81,6 +80,11 @@ BEGIN_OBJECT_REFLECTOR(osgAnimation::Action) __Callback_P1__getCallback__unsigned_int, "", ""); + I_Method1(void, removeCallback, IN, osgAnimation::Action::Callback *, x, + Properties::NON_VIRTUAL, + __void__removeCallback__Callback_P1, + "", + ""); I_Method1(osgAnimation::Action::Callback *, getFrameCallback, IN, unsigned int, frame, Properties::NON_VIRTUAL, __Callback_P1__getFrameCallback__unsigned_int, @@ -199,316 +203,16 @@ BEGIN_OBJECT_REFLECTOR(osgAnimation::Action::Callback) __void__addNestedCallback__Callback_P1, "", ""); + I_Method1(void, removeCallback, IN, osgAnimation::Action::Callback *, cb, + Properties::NON_VIRTUAL, + __void__removeCallback__Callback_P1, + "", + ""); I_SimpleProperty(osgAnimation::Action::Callback *, NestedCallback, __Callback_P1__getNestedCallback, 0); END_REFLECTOR -BEGIN_OBJECT_REFLECTOR(osgAnimation::ActionAnimation) - I_DeclaringFile("osgAnimation/Action"); - I_BaseType(osgAnimation::Action); - 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 &, x, - 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 *, className, - Properties::VIRTUAL, - __C5_char_P1__className, - "return the name of the object's class type. ", - "Must be defined by derived classes. "); - 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_Method1(void, accept, IN, osgAnimation::ActionVisitor &, nv, - Properties::VIRTUAL, - __void__accept__osgAnimation_ActionVisitor_R1, - "", - ""); - I_Constructor0(____ActionAnimation, - "", - ""); - I_Constructor2(IN, const osgAnimation::ActionAnimation &, a, IN, const osg::CopyOp &, c, - ____ActionAnimation__C5_ActionAnimation_R1__C5_osg_CopyOp_R1, - "", - ""); - I_Constructor1(IN, osgAnimation::Animation *, animation, - Properties::NON_EXPLICIT, - ____ActionAnimation__Animation_P1, - "", - ""); - I_Method2(void, updateAnimation, IN, unsigned int, frame, IN, int, priority, - Properties::NON_VIRTUAL, - __void__updateAnimation__unsigned_int__int, - "", - ""); - I_Method0(osgAnimation::Animation *, getAnimation, - Properties::NON_VIRTUAL, - __Animation_P1__getAnimation, - "", - ""); - I_SimpleProperty(osgAnimation::Animation *, Animation, - __Animation_P1__getAnimation, - 0); -END_REFLECTOR - -BEGIN_OBJECT_REFLECTOR(osgAnimation::BlendIn) - I_DeclaringFile("osgAnimation/Action"); - I_BaseType(osgAnimation::Action); - 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 &, x, - 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 *, className, - Properties::VIRTUAL, - __C5_char_P1__className, - "return the name of the object's class type. ", - "Must be defined by derived classes. "); - 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_Method1(void, accept, IN, osgAnimation::ActionVisitor &, nv, - Properties::VIRTUAL, - __void__accept__osgAnimation_ActionVisitor_R1, - "", - ""); - I_Constructor0(____BlendIn, - "", - ""); - I_Constructor2(IN, const osgAnimation::BlendIn &, a, IN, const osg::CopyOp &, c, - ____BlendIn__C5_BlendIn_R1__C5_osg_CopyOp_R1, - "", - ""); - I_Constructor3(IN, osgAnimation::Animation *, animation, IN, double, duration, IN, double, weight, - ____BlendIn__Animation_P1__double__double, - "", - ""); - I_Method0(double, getWeight, - Properties::NON_VIRTUAL, - __double__getWeight, - "", - ""); - I_Method0(osgAnimation::Animation *, getAnimation, - Properties::NON_VIRTUAL, - __Animation_P1__getAnimation, - "", - ""); - I_Method1(void, computeWeight, IN, unsigned int, frame, - Properties::NON_VIRTUAL, - __void__computeWeight__unsigned_int, - "", - ""); - I_SimpleProperty(osgAnimation::Animation *, Animation, - __Animation_P1__getAnimation, - 0); - I_SimpleProperty(double, Weight, - __double__getWeight, - 0); -END_REFLECTOR - -BEGIN_OBJECT_REFLECTOR(osgAnimation::BlendOut) - I_DeclaringFile("osgAnimation/Action"); - I_BaseType(osgAnimation::Action); - 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 &, x, - 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 *, className, - Properties::VIRTUAL, - __C5_char_P1__className, - "return the name of the object's class type. ", - "Must be defined by derived classes. "); - 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_Method1(void, accept, IN, osgAnimation::ActionVisitor &, nv, - Properties::VIRTUAL, - __void__accept__osgAnimation_ActionVisitor_R1, - "", - ""); - I_Constructor0(____BlendOut, - "", - ""); - I_Constructor2(IN, const osgAnimation::BlendOut &, a, IN, const osg::CopyOp &, c, - ____BlendOut__C5_BlendOut_R1__C5_osg_CopyOp_R1, - "", - ""); - I_Constructor2(IN, osgAnimation::Animation *, animation, IN, double, duration, - ____BlendOut__Animation_P1__double, - "", - ""); - I_Method0(osgAnimation::Animation *, getAnimation, - Properties::NON_VIRTUAL, - __Animation_P1__getAnimation, - "", - ""); - I_Method0(double, getWeight, - Properties::NON_VIRTUAL, - __double__getWeight, - "", - ""); - I_Method1(void, computeWeight, IN, unsigned int, frame, - Properties::NON_VIRTUAL, - __void__computeWeight__unsigned_int, - "", - ""); - I_SimpleProperty(osgAnimation::Animation *, Animation, - __Animation_P1__getAnimation, - 0); - I_SimpleProperty(double, Weight, - __double__getWeight, - 0); -END_REFLECTOR - -BEGIN_OBJECT_REFLECTOR(osgAnimation::StripAnimation) - I_DeclaringFile("osgAnimation/Action"); - I_BaseType(osgAnimation::Action); - 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 &, x, - 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 *, className, - Properties::VIRTUAL, - __C5_char_P1__className, - "return the name of the object's class type. ", - "Must be defined by derived classes. "); - 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_Method1(void, accept, IN, osgAnimation::ActionVisitor &, nv, - Properties::VIRTUAL, - __void__accept__osgAnimation_ActionVisitor_R1, - "", - ""); - I_Constructor0(____StripAnimation, - "", - ""); - I_Constructor2(IN, const osgAnimation::StripAnimation &, a, IN, const osg::CopyOp &, c, - ____StripAnimation__C5_StripAnimation_R1__C5_osg_CopyOp_R1, - "", - ""); - I_ConstructorWithDefaults4(IN, osgAnimation::Animation *, animation, , IN, double, blendInDuration, 0.0, IN, double, blendOutDuration, 0.0, IN, double, blendInWeightTarget, 1.0, - ____StripAnimation__Animation_P1__double__double__double, - "", - ""); - I_Method0(osgAnimation::ActionAnimation *, getActionAnimation, - Properties::NON_VIRTUAL, - __ActionAnimation_P1__getActionAnimation, - "", - ""); - I_Method0(osgAnimation::BlendIn *, getBlendIn, - Properties::NON_VIRTUAL, - __BlendIn_P1__getBlendIn, - "", - ""); - I_Method0(osgAnimation::BlendOut *, getBlendOut, - Properties::NON_VIRTUAL, - __BlendOut_P1__getBlendOut, - "", - ""); - I_Method0(const osgAnimation::ActionAnimation *, getActionAnimation, - Properties::NON_VIRTUAL, - __C5_ActionAnimation_P1__getActionAnimation, - "", - ""); - I_Method0(const osgAnimation::BlendIn *, getBlendIn, - Properties::NON_VIRTUAL, - __C5_BlendIn_P1__getBlendIn, - "", - ""); - I_Method0(const osgAnimation::BlendOut *, getBlendOut, - Properties::NON_VIRTUAL, - __C5_BlendOut_P1__getBlendOut, - "", - ""); - I_Method0(unsigned int, getBlendOutStartFrame, - Properties::NON_VIRTUAL, - __unsigned_int__getBlendOutStartFrame, - "", - ""); - I_Method0(unsigned int, getLoop, - Properties::VIRTUAL, - __unsigned_int__getLoop, - "", - ""); - I_Method1(void, setLoop, IN, unsigned int, loop, - Properties::NON_VIRTUAL, - __void__setLoop__unsigned_int, - "", - ""); - I_Method1(void, traverse, IN, osgAnimation::ActionVisitor &, visitor, - Properties::VIRTUAL, - __void__traverse__ActionVisitor_R1, - "", - ""); - I_SimpleProperty(osgAnimation::ActionAnimation *, ActionAnimation, - __ActionAnimation_P1__getActionAnimation, - 0); - I_SimpleProperty(osgAnimation::BlendIn *, BlendIn, - __BlendIn_P1__getBlendIn, - 0); - I_SimpleProperty(osgAnimation::BlendOut *, BlendOut, - __BlendOut_P1__getBlendOut, - 0); - I_SimpleProperty(unsigned int, BlendOutStartFrame, - __unsigned_int__getBlendOutStartFrame, - 0); - I_SimpleProperty(unsigned int, Loop, - __unsigned_int__getLoop, - __void__setLoop__unsigned_int); -END_REFLECTOR - BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osgAnimation::Action::Callback >) I_DeclaringFile("osg/ref_ptr"); I_Constructor0(____ref_ptr, diff --git a/src/osgWrappers/osgAnimation/ActionVisitor.cpp b/src/osgWrappers/osgAnimation/ActionVisitor.cpp index 2c160fb45..b1670a5fa 100644 --- a/src/osgWrappers/osgAnimation/ActionVisitor.cpp +++ b/src/osgWrappers/osgAnimation/ActionVisitor.cpp @@ -11,6 +11,10 @@ #include #include +#include +#include +#include +#include #include #include #include @@ -94,14 +98,14 @@ BEGIN_OBJECT_REFLECTOR(osgAnimation::ActionVisitor) __void__apply__Timeline_R1, "", ""); - I_Method1(void, apply, IN, osgAnimation::BlendIn &, action, + I_Method1(void, apply, IN, osgAnimation::ActionBlendIn &, action, Properties::VIRTUAL, - __void__apply__BlendIn_R1, + __void__apply__ActionBlendIn_R1, "", ""); - I_Method1(void, apply, IN, osgAnimation::BlendOut &, action, + I_Method1(void, apply, IN, osgAnimation::ActionBlendOut &, action, Properties::VIRTUAL, - __void__apply__BlendOut_R1, + __void__apply__ActionBlendOut_R1, "", ""); I_Method1(void, apply, IN, osgAnimation::ActionAnimation &, action, @@ -109,9 +113,9 @@ BEGIN_OBJECT_REFLECTOR(osgAnimation::ActionVisitor) __void__apply__ActionAnimation_R1, "", ""); - I_Method1(void, apply, IN, osgAnimation::StripAnimation &, action, + I_Method1(void, apply, IN, osgAnimation::ActionStripAnimation &, action, Properties::VIRTUAL, - __void__apply__StripAnimation_R1, + __void__apply__ActionStripAnimation_R1, "", ""); I_SimpleProperty(int, CurrentLayer, @@ -210,14 +214,14 @@ BEGIN_OBJECT_REFLECTOR(osgAnimation::UpdateActionVisitor) __void__apply__Action_R1, "", ""); - I_Method1(void, apply, IN, osgAnimation::BlendIn &, action, + I_Method1(void, apply, IN, osgAnimation::ActionBlendIn &, action, Properties::VIRTUAL, - __void__apply__BlendIn_R1, + __void__apply__ActionBlendIn_R1, "", ""); - I_Method1(void, apply, IN, osgAnimation::BlendOut &, action, + I_Method1(void, apply, IN, osgAnimation::ActionBlendOut &, action, Properties::VIRTUAL, - __void__apply__BlendOut_R1, + __void__apply__ActionBlendOut_R1, "", ""); I_Method1(void, apply, IN, osgAnimation::ActionAnimation &, action, @@ -225,9 +229,9 @@ BEGIN_OBJECT_REFLECTOR(osgAnimation::UpdateActionVisitor) __void__apply__ActionAnimation_R1, "", ""); - I_Method1(void, apply, IN, osgAnimation::StripAnimation &, action, + I_Method1(void, apply, IN, osgAnimation::ActionStripAnimation &, action, Properties::VIRTUAL, - __void__apply__StripAnimation_R1, + __void__apply__ActionStripAnimation_R1, "", ""); I_SimpleProperty(unsigned int, Frame, diff --git a/src/osgWrappers/osgAnimation/Bone.cpp b/src/osgWrappers/osgAnimation/Bone.cpp index 9b2c0ed65..db7e7feb7 100644 --- a/src/osgWrappers/osgAnimation/Bone.cpp +++ b/src/osgWrappers/osgAnimation/Bone.cpp @@ -279,7 +279,7 @@ BEGIN_OBJECT_REFLECTOR(osgAnimation::Bone::UpdateBone) "", ""); I_Method0(bool, needLink, - Properties::VIRTUAL, + Properties::NON_VIRTUAL, __bool__needLink, "", ""); diff --git a/src/osgWrappers/osgAnimation/MorphGeometry.cpp b/src/osgWrappers/osgAnimation/MorphGeometry.cpp index 4cac24e85..53376d3a2 100644 --- a/src/osgWrappers/osgAnimation/MorphGeometry.cpp +++ b/src/osgWrappers/osgAnimation/MorphGeometry.cpp @@ -235,7 +235,7 @@ BEGIN_OBJECT_REFLECTOR(osgAnimation::UpdateMorph) "", ""); I_Method0(bool, needLink, - Properties::VIRTUAL, + Properties::NON_VIRTUAL, __bool__needLink, "", ""); diff --git a/src/osgWrappers/osgAnimation/RigGeometry.cpp b/src/osgWrappers/osgAnimation/RigGeometry.cpp index a3e9ef201..92a33d312 100644 --- a/src/osgWrappers/osgAnimation/RigGeometry.cpp +++ b/src/osgWrappers/osgAnimation/RigGeometry.cpp @@ -12,9 +12,11 @@ #include #include +#include #include -#include +#include #include +#include #include #include @@ -68,17 +70,17 @@ BEGIN_OBJECT_REFLECTOR(osgAnimation::RigGeometry) "Must be defined by derived classes. "); I_Method1(void, setInfluenceMap, IN, osgAnimation::VertexInfluenceMap *, vertexInfluenceMap, Properties::NON_VIRTUAL, - __void__setInfluenceMap__osgAnimation_VertexInfluenceMap_P1, + __void__setInfluenceMap__VertexInfluenceMap_P1, "", ""); I_Method0(const osgAnimation::VertexInfluenceMap *, getInfluenceMap, Properties::NON_VIRTUAL, - __C5_osgAnimation_VertexInfluenceMap_P1__getInfluenceMap, + __C5_VertexInfluenceMap_P1__getInfluenceMap, "", ""); I_Method0(osgAnimation::VertexInfluenceMap *, getInfluenceMap, Properties::NON_VIRTUAL, - __osgAnimation_VertexInfluenceMap_P1__getInfluenceMap, + __VertexInfluenceMap_P1__getInfluenceMap, "", ""); I_Method0(const osgAnimation::Skeleton *, getSkeleton, @@ -91,6 +93,11 @@ BEGIN_OBJECT_REFLECTOR(osgAnimation::RigGeometry) __Skeleton_P1__getSkeleton, "", ""); + I_Method1(void, setSkeleton, IN, osgAnimation::Skeleton *, x, + Properties::NON_VIRTUAL, + __void__setSkeleton__Skeleton_P1, + "", + ""); I_Method1(void, setNeedToComputeMatrix, IN, bool, state, Properties::NON_VIRTUAL, __void__setNeedToComputeMatrix__bool, @@ -101,14 +108,14 @@ BEGIN_OBJECT_REFLECTOR(osgAnimation::RigGeometry) __bool__getNeedToComputeMatrix, "", ""); - I_Method0(void, buildVertexSet, + I_Method0(void, buildVertexInfluenceSet, Properties::NON_VIRTUAL, - __void__buildVertexSet, + __void__buildVertexInfluenceSet, "", ""); - I_Method1(void, buildTransformer, IN, osgAnimation::Skeleton *, root, + I_Method0(const osgAnimation::VertexInfluenceSet &, getVertexInfluenceSet, Properties::NON_VIRTUAL, - __void__buildTransformer__Skeleton_P1, + __C5_VertexInfluenceSet_R1__getVertexInfluenceSet, "", ""); I_Method0(void, computeMatrixFromRootSkeleton, @@ -116,43 +123,56 @@ BEGIN_OBJECT_REFLECTOR(osgAnimation::RigGeometry) __void__computeMatrixFromRootSkeleton, "", ""); - I_Method0(void, transformSoftwareMethod, + I_Method1(void, setRigTransformImplementation, IN, osgAnimation::RigTransform *, x, + Properties::NON_VIRTUAL, + __void__setRigTransformImplementation__RigTransform_P1, + "", + ""); + I_Method0(osgAnimation::RigTransform *, getRigTransformImplementation, + Properties::NON_VIRTUAL, + __RigTransform_P1__getRigTransformImplementation, + "", + ""); + I_Method1(void, drawImplementation, IN, osg::RenderInfo &, renderInfo, Properties::VIRTUAL, - __void__transformSoftwareMethod, + __void__drawImplementation__osg_RenderInfo_R1, + "Draw Geometry directly ignoring an OpenGL display list which could be attached. ", + "This is the internal draw method which does the drawing itself, and is the method to override when deriving from Geometry for user-drawn objects. "); + I_Method0(void, update, + Properties::NON_VIRTUAL, + __void__update, "", ""); - I_Method0(const osgAnimation::VertexInfluenceSet &, getVertexInfluenceSet, + I_Method0(const osg::Matrix &, getMatrixFromSkeletonToGeometry, Properties::NON_VIRTUAL, - __C5_osgAnimation_VertexInfluenceSet_R1__getVertexInfluenceSet, + __C5_osg_Matrix_R1__getMatrixFromSkeletonToGeometry, "", ""); - I_Method0(const std::vector< osg::Vec3 > &, getPositionSource, + I_Method0(const osg::Matrix &, getInvMatrixFromSkeletonToGeometry, Properties::NON_VIRTUAL, - __C5_std_vectorT1_osg_Vec3__R1__getPositionSource, - "", - ""); - I_Method0(const std::vector< osg::Vec3 > &, getNormalSource, - Properties::NON_VIRTUAL, - __C5_std_vectorT1_osg_Vec3__R1__getNormalSource, + __C5_osg_Matrix_R1__getInvMatrixFromSkeletonToGeometry, "", ""); I_SimpleProperty(osgAnimation::VertexInfluenceMap *, InfluenceMap, - __osgAnimation_VertexInfluenceMap_P1__getInfluenceMap, - __void__setInfluenceMap__osgAnimation_VertexInfluenceMap_P1); + __VertexInfluenceMap_P1__getInfluenceMap, + __void__setInfluenceMap__VertexInfluenceMap_P1); + I_SimpleProperty(const osg::Matrix &, InvMatrixFromSkeletonToGeometry, + __C5_osg_Matrix_R1__getInvMatrixFromSkeletonToGeometry, + 0); + I_SimpleProperty(const osg::Matrix &, MatrixFromSkeletonToGeometry, + __C5_osg_Matrix_R1__getMatrixFromSkeletonToGeometry, + 0); I_SimpleProperty(bool, NeedToComputeMatrix, __bool__getNeedToComputeMatrix, __void__setNeedToComputeMatrix__bool); - I_SimpleProperty(const std::vector< osg::Vec3 > &, NormalSource, - __C5_std_vectorT1_osg_Vec3__R1__getNormalSource, - 0); - I_SimpleProperty(const std::vector< osg::Vec3 > &, PositionSource, - __C5_std_vectorT1_osg_Vec3__R1__getPositionSource, - 0); + I_SimpleProperty(osgAnimation::RigTransform *, RigTransformImplementation, + __RigTransform_P1__getRigTransformImplementation, + __void__setRigTransformImplementation__RigTransform_P1); I_SimpleProperty(osgAnimation::Skeleton *, Skeleton, __Skeleton_P1__getSkeleton, - 0); + __void__setSkeleton__Skeleton_P1); I_SimpleProperty(const osgAnimation::VertexInfluenceSet &, VertexInfluenceSet, - __C5_osgAnimation_VertexInfluenceSet_R1__getVertexInfluenceSet, + __C5_VertexInfluenceSet_R1__getVertexInfluenceSet, 0); END_REFLECTOR diff --git a/src/osgWrappers/osgAnimation/Skeleton.cpp b/src/osgWrappers/osgAnimation/Skeleton.cpp index 6eceaec70..60ba276a1 100644 --- a/src/osgWrappers/osgAnimation/Skeleton.cpp +++ b/src/osgWrappers/osgAnimation/Skeleton.cpp @@ -57,13 +57,13 @@ BEGIN_OBJECT_REFLECTOR(osgAnimation::Skeleton) __void__accept__osg_NodeVisitor_R1, "Visitor Pattern : calls the apply method of a NodeVisitor with this node's type. ", ""); - I_ConstructorWithDefaults2(IN, const osgAnimation::Skeleton &, b, , IN, const osg::CopyOp &, copyop, osg::CopyOp::SHALLOW_COPY, - ____Skeleton__C5_Skeleton_R1__C5_osg_CopyOp_R1, - "", - ""); I_Constructor0(____Skeleton, "", ""); + I_Constructor2(IN, const osgAnimation::Skeleton &, x, IN, const osg::CopyOp &, x, + ____Skeleton__C5_Skeleton_R1__C5_osg_CopyOp_R1, + "", + ""); I_Method0(void, setDefaultUpdateCallback, Properties::NON_VIRTUAL, __void__setDefaultUpdateCallback, @@ -107,9 +107,14 @@ BEGIN_OBJECT_REFLECTOR(osgAnimation::Skeleton::UpdateSkeleton) I_Constructor0(____UpdateSkeleton, "", ""); - I_ConstructorWithDefaults2(IN, const osgAnimation::Skeleton::UpdateSkeleton &, us, , IN, const osg::CopyOp &, copyop, osg::CopyOp::SHALLOW_COPY, - ____UpdateSkeleton__C5_UpdateSkeleton_R1__C5_osg_CopyOp_R1, - "", - ""); + I_Constructor2(IN, const osgAnimation::Skeleton::UpdateSkeleton &, x, IN, const osg::CopyOp &, x, + ____UpdateSkeleton__C5_UpdateSkeleton_R1__C5_osg_CopyOp_R1, + "", + ""); + I_Method0(bool, needToValidate, + Properties::NON_VIRTUAL, + __bool__needToValidate, + "", + ""); END_REFLECTOR diff --git a/src/osgWrappers/osgAnimation/Skinning.cpp b/src/osgWrappers/osgAnimation/Skinning.cpp index 9f8088e7c..d855ec889 100644 --- a/src/osgWrappers/osgAnimation/Skinning.cpp +++ b/src/osgWrappers/osgAnimation/Skinning.cpp @@ -119,7 +119,5 @@ BEGIN_VALUE_REFLECTOR(osgAnimation::TransformVertexFunctor::UniqBoneSetVertexSet 0); END_REFLECTOR -STD_VECTOR_REFLECTOR(std::vector< int >) - STD_VECTOR_REFLECTOR(std::vector< osgAnimation::TransformVertexFunctor::BoneWeight >) diff --git a/src/osgWrappers/osgAnimation/StatsVisitor.cpp b/src/osgWrappers/osgAnimation/StatsVisitor.cpp index d023ceb93..72e0129df 100644 --- a/src/osgWrappers/osgAnimation/StatsVisitor.cpp +++ b/src/osgWrappers/osgAnimation/StatsVisitor.cpp @@ -12,6 +12,10 @@ #include #include +#include +#include +#include +#include #include #include @@ -78,14 +82,14 @@ BEGIN_OBJECT_REFLECTOR(osgAnimation::StatsActionVisitor) __void__apply__Action_R1, "", ""); - I_Method1(void, apply, IN, osgAnimation::BlendIn &, action, + I_Method1(void, apply, IN, osgAnimation::ActionBlendIn &, action, Properties::VIRTUAL, - __void__apply__BlendIn_R1, + __void__apply__ActionBlendIn_R1, "", ""); - I_Method1(void, apply, IN, osgAnimation::BlendOut &, action, + I_Method1(void, apply, IN, osgAnimation::ActionBlendOut &, action, Properties::VIRTUAL, - __void__apply__BlendOut_R1, + __void__apply__ActionBlendOut_R1, "", ""); I_Method1(void, apply, IN, osgAnimation::ActionAnimation &, action, @@ -93,9 +97,9 @@ BEGIN_OBJECT_REFLECTOR(osgAnimation::StatsActionVisitor) __void__apply__ActionAnimation_R1, "", ""); - I_Method1(void, apply, IN, osgAnimation::StripAnimation &, action, + I_Method1(void, apply, IN, osgAnimation::ActionStripAnimation &, action, Properties::VIRTUAL, - __void__apply__StripAnimation_R1, + __void__apply__ActionStripAnimation_R1, "", ""); I_SimpleProperty(const std::vector< std::string > &, Channels, diff --git a/src/osgWrappers/osgAnimation/UpdateCallback.cpp b/src/osgWrappers/osgAnimation/UpdateCallback.cpp index 4c300f1f9..00beaa629 100644 --- a/src/osgWrappers/osgAnimation/UpdateCallback.cpp +++ b/src/osgWrappers/osgAnimation/UpdateCallback.cpp @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -34,24 +33,10 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgAnimation::AnimationUpdateCallbackBase) I_DeclaringFile("osgAnimation/UpdateCallback"); + I_VirtualBaseType(osg::Object); I_Constructor0(____AnimationUpdateCallbackBase, "", ""); - I_Method1(osg::Object *, clone, IN, const osg::CopyOp &, copyop, - Properties::PURE_VIRTUAL, - __osg_Object_P1__clone__C5_osg_CopyOp_R1, - "", - ""); - I_Method0(osgAnimation::AnimationManagerBase *, getAnimationManager, - Properties::PURE_VIRTUAL, - __AnimationManagerBase_P1__getAnimationManager, - "", - ""); - I_Method0(bool, needLink, - Properties::PURE_VIRTUAL, - __bool__needLink, - "", - ""); I_Method1(bool, link, IN, osgAnimation::Channel *, channel, Properties::PURE_VIRTUAL, __bool__link__osgAnimation_Channel_P1, @@ -62,22 +47,6 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgAnimation::AnimationUpdateCallbackBase) __int__link__osgAnimation_Animation_P1, "", ""); - I_Method0(void, updateLink, - Properties::PURE_VIRTUAL, - __void__updateLink, - "", - ""); - I_Method0(const std::string &, getName, - Properties::PURE_VIRTUAL, - __C5_std_string_R1__getName, - "", - ""); - I_SimpleProperty(osgAnimation::AnimationManagerBase *, AnimationManager, - __AnimationManagerBase_P1__getAnimationManager, - 0); - I_SimpleProperty(const std::string &, Name, - __C5_std_string_R1__getName, - 0); END_REFLECTOR BEGIN_OBJECT_REFLECTOR(osgAnimation::UpdateMaterial) @@ -121,11 +90,6 @@ BEGIN_OBJECT_REFLECTOR(osgAnimation::UpdateMaterial) __void__update__osg_Material_R1, "", ""); - I_Method0(bool, needLink, - Properties::VIRTUAL, - __bool__needLink, - "", - ""); I_Method1(bool, link, IN, osgAnimation::Channel *, channel, Properties::VIRTUAL, __bool__link__osgAnimation_Channel_P1, @@ -187,11 +151,6 @@ BEGIN_OBJECT_REFLECTOR(osgAnimation::UpdateTransform) __void__update__osg_PositionAttitudeTransform_R1, "", ""); - I_Method0(bool, needLink, - Properties::VIRTUAL, - __bool__needLink, - "", - ""); I_Method1(bool, link, IN, osgAnimation::Channel *, channel, Properties::VIRTUAL, __bool__link__osgAnimation_Channel_P1, diff --git a/src/osgWrappers/osgText/Font.cpp b/src/osgWrappers/osgText/Font.cpp index 704d63329..a7c6a65f5 100644 --- a/src/osgWrappers/osgText/Font.cpp +++ b/src/osgWrappers/osgText/Font.cpp @@ -383,11 +383,6 @@ BEGIN_OBJECT_REFLECTOR(osgText::Font::Glyph) __void__subload, "", ""); - I_Method1(void, draw, IN, osg::State &, state, - Properties::NON_VIRTUAL, - __void__draw__osg_State_R1, - "", - ""); I_SimpleProperty(unsigned int, GlyphCode, __unsigned_int__getGlyphCode, 0);