[osg-users] Ref_ptr question : argument and return

Vincent Bourdier vincent.bourdier at gmail.com
Mon Sep 22 23:56:51 PDT 2008


Up,

Ok with the rules :
http://andesengineering.com/OSG_ProducerArticles/RefPointers/RefPointers.html

But there is nothing about ref_ptr<>s in argument...

any idea ?

thanks.

Regards,
     Vincent

2008/9/22 Vincent Bourdier <vincent.bourdier at gmail.com>

> Hi all,
>
> I read that all the objects that inherit from Referenced need to be in a
> ref_ptr.
> Ok that sounds good , but :
>
> In this case I don't know if I need to put the ref_prt in argument or if
> only the ptr is needed.
>
> bool VisualEffects::setTransparency(string name, float alpha){
>     osg::ref_ptr<osg::Node> node = getNode(name);
>     return VisualEffects::setTransparency(node.get(), alpha); //node ? or
> node.get() ?
> }
>
> If call the second function without ref_prt,
> I just need to understand if it can make an error, and if it depends on the
> code on setTransparency(node, alpha), based on a ref_prt or not... (imagine
> I don't know)
>
> thanks a lot,
>
> Regards,
>
> Vincent
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080923/01de2db5/attachment-0003.htm>


More information about the osg-users mailing list