ok, ive been playing around a little bit here and i seem to have hit a wall. i was wondering how OSG goes about representing unique trajectories (conceptually i would guess a collection of line segments). here is what i am doing now (mix of pseudocode and c++):
Code: //appropriate variables assumed to be declared here for each T in trajectoryList{ osg::ref_ptr<osg::Geometry> geom = new osg::Geometry; geom->addPrimitiveSet(drawArrayLines); geom->setVertexArray(vertexData); //line width, color, etc set here for each point in T{ vertexData->push_back(osg::Vec3d(point.X,point.Y,point.Z)); } drawArrayLines->setFirst(0); drawArrayLines->setCount(vertexData->size()); geode->addDrawable( geom.get() ); } I was expecting this to create a new "trajectory" each time and insert each one into geode but it looks like it is just appending points into geom and extending the trajectory instead of putting a new one in. I know the memory situation is a little bit different with OSG vs. ANSI C++, am I botching it there or how would I approach this? ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=40549#40549 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org