Hi,
On 1/04/10 20:47 , Ku Krapox wrote:
> 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??
If the node you found isn't derived from DOFTransform then the dynamic_cast
will fail.
Since you mention osg::Geode maybe you should cast to that instead, if that is
what it is?
> Code: _KEH->addFunction(' ', 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 'addFunction' an osg function or is it from your framework? I can't find
any reference
to that in the soruce.
Cheers,
/ulrich
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org