Hi Negru,
To add child u have to pass the pointer to the node but you are not
doing that and that is why u r getting the error. Just try this and your
code will compile.
" Tank1Matrix->addChild(TankNode1.get());"
best regards
RJ
On Sun, 2007-03-11 at 23:34 -0700, Calin Negru wrote:
> I have a problem moving objects:
>
> I use this method to load the objects:
>
> Producer::ref_ptr<osg::Node> TankNode1 =
> osgDB::readNodeFile("T72-tank_des.flt");
>
> I try then to add TankNode1 to a MatrixTransform object so I can move
> it but the compiler wouldn't let me.
>
> osg::MatrixTransform* Tank1Matrix = new osg::MatrixTransform;
> Tank1Matrix->addChild(TankNode1);
>
> Error 1 error C2664: 'osg::Group::addChild' : cannot convert
> parameter 1 from 'Producer::ref_ptr<T>' to 'osg::Node
>
> --
> Calin Negru
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/