Shayne,

In my application, a global buffer is used to input data to osg thread from
other thread.

I used the method as same as Todd told you. "setMatrix()" is used to update
the matrix of that MatrixTransform node.


...

osg::ref_ptr<osg::group> root;
osg::ref_ptr<osg::MatrixTransform> MotionMatrix;
osg::ref_ptr<osg::node> MotionModelFile;                   //your motion
model

...
root->addchild(MotionMatrix);

MotionMatrix->addchild(MotionModelFile);

...

 while((!Viewer.done)
 {
...

if(Update is
Needed)                                                          //position
is changed or other
     MotionMatrix->->setMatrix(osg::Matrix::translate(Pos));  //your
position data

...
   Viewer.frame();

...
}




su hu


2008/8/2, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC <
[EMAIL PROTECTED]>:
>
>  This is probably a silly and simple question, but does anyone have an
> example of how to move a model explicitly without using a canned animation?
> Most of the examples I've seen, update the position in an animation using
> UpdateCallback.
>
>
>
> I have a position update coming from another process outside the scenegraph
> that I need to feed into the model to update its position. Do I need to use
> an UpdateCallback or a NodeVisitor approach?
>
>
>
> Any help would be most appreciated…
>
>
>
> Thanks,
>
> -Shayne
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to