From: Jacques-Andre B. <jac...@po...> - 2005-05-26 18:29:34
|
Hi, I'm trying to build simple code that looks like an example from OpenSG tutorial: it traverses all nodes under a main node and print their names. With .Net 2003, I'm getting the following building error: c:\Ja\Cvrs3_hsv_0.43\Cvrs3\spine.cpp(37): error C2664: 'osg::osgTypedFunctionFunctor1CPtrRef' : cannot convert parameter 1 from 'osg::Action::ResultE (osg::NodePtr &)' to 'osg::Action::ResultE (__cdecl *)(osg::NodePtr &)' Here is my code: osg::Action::ResultE Spine::enter(osg::NodePtr& node) { if (osg::getName(node)) cout << osg::getName(node) << "\n"; else cout << "No name was set!" << "\n"; return osg::Action::Continue; } void Spine::traverseName(osg::NodePtr& node) { cout << "\n\n"; cout << "Printing all node names"; cout << "---------------------------------------"; cout << "\n\n"; // now we invoke the traversal osg::traverse(node, osg::osgTypedFunctionFunctor1CPtrRef <osg::Action::ResultE, osg::NodePtr>(enter)); } Somebody knows what I'm doing wrong? Thanks in advance JA |