[osg-users] Assign Vec3d to Node

OpenSceneGraph Users osg-users at lists.openscenegraph.org
Fri May 15 13:05:44 PDT 2020


Hi Rodrigo,

You can use the OSG's meta object system i,e

   osg::Vec3d direction(...);
   node->setUseValue("direction", direction);


   if (node->getUseValue("direction", direction))
   {
       // do something with direction
   }

On Fri, 15 May 2020 at 18:16, OpenSceneGraph Users <
osg-users at lists.openscenegraph.org> wrote:

> Hi,
>
> I'm creating objects that must fall by gravity. So I need to assign a
> Vec3d, representing speed, to each Node. Is there a proper way to do it?
> Maybe some variable inside the Node, Geode, ShapeDrawable, etc, or some
> function for this kind of variable assignment? Or must I create an array
> outside the OSG variables?
>
> Thanks,
> Rodrigo.
>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenSceneGraph Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to osg-users+unsubscribe at googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osg-users/2a51f5b0-9f51-45b5-acf5-17adc57f6b34%40googlegroups.com
> <https://groups.google.com/d/msgid/osg-users/2a51f5b0-9f51-45b5-acf5-17adc57f6b34%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200515/0e36c122/attachment.html>


More information about the osg-users mailing list