Hello Georg,

Georg Stevenson wrote:
> still couldn't solve the problem with the functor  :(

hm, the below sounds like you have it working now, do you still run into 
problems with it?

>>> Traversal of SceneGraph:
>>> In 1.8 the following worked perfectly:
>>> OSG::traverse(modelTransNode, 
>>> osgTypedMethodFunctor1ObjPtrCPtrRef<Action::ResultE, OpenSGModel,
> 
> 
>>>             NodePtr> (this, &OpenSGModel::traversalEnter));
>>>            
>>> As i've seen the signature of traverse stays the same, but i didn't find 
>>> how the TraverseEnterFunctor is passed in OpenSG 2.0 :)
> 
> 
>>
>>we removed our own functors in favour of boost::function<>; the 
>>OSG::traverse function now takes a boost::function<> object as argument 
>>and you usually create those with boost::bind, for the above it would 
> 
> 
>>look like this:
>>
>>OSG::traverse(
>>     modelTransNode,
>>     boost::bind(&OpenSGModel::traversalEnter, this, _1));
> 
> also had to change the functor :
> 
> OSG::Action::ResultE traversalEnter(OSG::NodePtr& node);   
> i replaced NodePtr& Node with Node*
> , otherwise i would have got the following:
> 
> Error    1    error C2664: 'R boost::_mfi::mf1<R,T,A1>::operator 
> ()<OpenSGModel>(const U &,A1) const' : cannot convert parameter 2 from 
> 'OSG::Node *' to 'OSG::RefCountPtr<ObjectT,RefCountPolicyT> '    
> C:\boost\include\boost\bind.hpp    282  
> 
> hope that's alright from an OpenSG internal point of view.

yes, that change is also necessary, sorry, forgot about it. Most 
functions simply pass around raw C pointers (usually because there is a 
member smart pointer that makes sure the pointed to object remains alive 
and it is more efficient - no need to touch the ref count).

>>> ============================
>>> Are there equivalents to OpenSG/OSGDrawAction.h or 
>>> OpenSG/OSGDynamicVolume.h in OpenSG 2.0  ?
> 
>>
>>no, they are both gone. Bounding volumes are always BoxVolume now.
> 
> actually there are more headers missing, but the compiler just stops the 
> preprocessing if he can't find an include,

hm, ok. Just to be clear: not only the headers are gone, but both types 
do not exist in 2.0.

> here i still have to think 
> about how to replace them. Maybe i still will have some questions here, 
> if you're OK with it.

of course.

> actually i already got some important modules to compile and link (so i 
> finally got some dlls), but wasn't able to test yet.

glad to hear you are making progress.

        Cheers,
                Carsten

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to