Changed the implementation of osg::Quat::makeRotate(heading,pitch,roll) so that
it conforms to the OpenFlight convention of euler angles. Added documentation into Matrix and Quat to reflect this. Added so test code to osgcube for stress testing memory allocation and deallocation. Commented out the registering of app and cull callbacks in osghud.
This commit is contained in:
@@ -18,6 +18,13 @@
|
||||
// Global variables - this is basically the stuff which will be animated
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
|
||||
osg::Geode* createCube(); //Forward Declaration added by SMW
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class MyTransformCallback : public osg::NodeCallback{
|
||||
|
||||
public:
|
||||
@@ -52,6 +59,23 @@ class MyTransformCallback : public osg::NodeCallback{
|
||||
_nodeToOperateOn->setMatrix(matrix);
|
||||
|
||||
_previousTraversalNumber = nv->getTraversalNumber();
|
||||
|
||||
// Some memory stress testing added by Steve to reveal crashes under Windows.
|
||||
// // Start Added by SMW
|
||||
// osg::Transform* Tnode = (osg::Transform *)node;
|
||||
// int i;
|
||||
// osg::Node *n;
|
||||
// while (Tnode->getNumChildren() > 0)
|
||||
// {
|
||||
// n = Tnode->getChild(0);
|
||||
// Tnode->removeChild(n);
|
||||
// }
|
||||
// for (i = 0;i < 500;i++)
|
||||
// {
|
||||
// Tnode->addChild( createCube() );
|
||||
// }
|
||||
// // End Added by SMW
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,8 +340,8 @@ int main( int argc, char **argv )
|
||||
set2dScene(modelview_abs);
|
||||
|
||||
projection->addChild(modelview_abs);
|
||||
projection->setAppCallback(osgNew MyCallback("App callback"));
|
||||
projection->setCullCallback(osgNew MyCallback("Cull callback"));
|
||||
// projection->setAppCallback(osgNew MyCallback("App callback"));
|
||||
// projection->setCullCallback(osgNew MyCallback("Cull callback"));
|
||||
|
||||
group->addChild(projection);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user