Hi everyone,
As I'm new to OSG and the community i'm not sure if this is an appropriate
place for a newbie's questions, but i'm having much difficulty to learn some
specifics... :-*
In particular, I'm stucked with callback functions and keyboard handling.
Callbacks
My problem is : I can get back the nodes of a geode if it's a loaded model
(like the tank), but I can't do the same for my own objects, such as simple
osg::Sphere loaded in an osg::Geode. What I do is I set the Geode's name to
"earth" and I call :
Code:
_earthNode = dynamic_cast \< osgSim::DOFTransform* \> (findEarth.getFirst());
... which results in a NULL value in _earthNode. I've found out that the
dynamic_cast fails when the returned named object is a geode, but I don't know
what object should be named in my hierarchy to be handled sucessfully by a
DOFTransform? Or should I use something else than a DOFTransform??
Keyboard Events Handling
Here's the kind of code I'm writing :
Code:
_KEH->addFunction(' ', buildGraph);
buildGraph() beeing declared in the .h and beeing defined just below in the .cpp
Code:
void buildGraph();
Im doing exactly what is in the tutorial, except that everything is in a
class, but it fails to build with the following error :
> 1>.\CGraph.cpp(49) : error C3867: 'graphs::CGraph::buildGraph': function call
> missing argument list; use '&graphs::CGraph::buildGraph' to create a pointer
> to member
Is anyone familiar with this compilation error?... I don't see what "argument
list" is missing, since my function doesn't take any...
Any help on any of these topics would be greatly appreciated!
Thanks in advance! :)
Cheers,
Ku
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=26347#26347
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org