From f977d7c60653f91e6cba210a4ac050b854e0c178 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 28 Jul 2006 13:48:08 +0000 Subject: [PATCH] Updated osgunittests with a matrix invert unit test, and added a conditional calling of invert_4x4 or invert_4x3 depending on the the right hand column of the matrix. Updated wrappers --- examples/osgunittests/osgunittests.cpp | 28 +++++++++++++++ include/osg/Matrixd | 18 ++++++---- include/osg/Matrixf | 18 ++++++---- src/osg/Matrix_implementation.cpp | 47 +++----------------------- src/osgWrappers/osg/Matrixd.cpp | 4 +-- src/osgWrappers/osg/Matrixf.cpp | 4 +-- src/osgWrappers/osg/Texture.cpp | 14 ++++++-- src/osgWrappers/osgGA/EventQueue.cpp | 1 + 8 files changed, 72 insertions(+), 62 deletions(-) diff --git a/examples/osgunittests/osgunittests.cpp b/examples/osgunittests/osgunittests.cpp index 7172c0092..8aae0c04e 100644 --- a/examples/osgunittests/osgunittests.cpp +++ b/examples/osgunittests/osgunittests.cpp @@ -98,6 +98,24 @@ void testLookAt(const osg::Vec3& eye,const osg::Vec3& center,const osg::Vec3& up } + +void testMatrixInvert(const osg::Matrix& matrix) +{ + //Invert it twice using the two inversion functions and view the results + osg::notify(osg::NOTICE)<<"testMatrixInvert("< >, osg::Texture::TextureObjectList); -TYPE_NAME_ALIAS(std::map< unsigned int COMMA osg::Texture::TextureObjectList >, osg::Texture::TextureObjectListMap); +TYPE_NAME_ALIAS(osg::buffered_object< osg::Texture::TextureObjectList >, osg::Texture::TextureObjectListMap); BEGIN_ENUM_REFLECTOR(osg::Texture::WrapParameter) I_EnumLabel(osg::Texture::WRAP_S); @@ -235,6 +235,16 @@ BEGIN_OBJECT_REFLECTOR(osg::Texture::TextureObject) I_WriteOnlyProperty(bool, Allocated); END_REFLECTOR +BEGIN_VALUE_REFLECTOR(osg::buffered_object< osg::Texture::TextureObjectList >) + I_Constructor0(); + I_Constructor1(IN, unsigned int, size); + I_Method1(void, setAllElementsTo, IN, const osg::Texture::TextureObjectList &, t); + I_Method0(void, clear); + I_Method0(bool, empty); + I_Method0(unsigned int, size); + I_WriteOnlyProperty(const osg::Texture::TextureObjectList &, AllElementsTo); +END_REFLECTOR + BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osg::Texture::TextureObject >) I_Constructor0(); I_Constructor1(IN, osg::Texture::TextureObject *, ptr); @@ -248,5 +258,3 @@ END_REFLECTOR STD_LIST_REFLECTOR(std::list< osg::ref_ptr< osg::Texture::TextureObject > >); -STD_MAP_REFLECTOR(std::map< unsigned int COMMA osg::Texture::TextureObjectList >); - diff --git a/src/osgWrappers/osgGA/EventQueue.cpp b/src/osgWrappers/osgGA/EventQueue.cpp index f406b4a8b..6773898d2 100644 --- a/src/osgWrappers/osgGA/EventQueue.cpp +++ b/src/osgWrappers/osgGA/EventQueue.cpp @@ -39,6 +39,7 @@ BEGIN_OBJECT_REFLECTOR(osgGA::EventQueue) I_Method2(void, mouseWarp, IN, float, x, IN, float, y); I_Method2(void, mouseMotion, IN, float, x, IN, float, y); I_Method3(void, mouseButtonPress, IN, float, x, IN, float, y, IN, unsigned int, button); + I_Method3(void, mouseDoubleButtonPress, IN, float, x, IN, float, y, IN, unsigned int, button); I_Method3(void, mouseButtonRelease, IN, float, x, IN, float, y, IN, unsigned int, button); I_Method1(void, keyPress, IN, osgGA::GUIEventAdapter::KeySymbol, key); I_Method1(void, keyRelease, IN, osgGA::GUIEventAdapter::KeySymbol, key);