Hi Sergey,

You need to add your new vertices to the geometry vertex data and update the first and size of your primitive set which is drawing the line.

For example
========

osg::Geometry* geom // is your geometry
osg::DrawArrays* drawArrayLines = new osg::DrawArrays(osg::PrimitiveSet::LINE_STRIP); // Is your line strip Primitive set

geom ->addPrimitiveSet(_drawArrayLines);  // Add primitive set

Whenever you have new vertex add the new vertex to the vertex array of your geometry and call

 drawArrayLines->setFirst(0);
 drawArrayLines->setCount( Num of vertex in your vertex array);


I Hope this will help you

cheers
RJ


Sergey wrote:
Hi, ALL
 How can I draw line , and append to this line new vertices (nodes) time after 
time? For example I need to draw a trajectory of moving object.
In examples I have seen only static lines with  determined count of vertices.

Thank you.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=9969#9969





_______________________________________________
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