Hello all,
maybe the subject isn't very significant, but I would like explane my
idea. I would like visualize a vector field. I have a gird and every
grid cell have a velocity value in x and in y. Also I have the array _x
and _y. Now I create a geometry and a vertex array:
osg::ref_ptr<osg::Geometry> geom = new osg::Geometry;
osg::ref_ptr<osg::Vec3Array> vertices = new osg::Vec3Array;
[...]
vertices->push_back( osg::Vec3(0,0,0.0) );
vertices->push_back( osg::Vec3(_x[i], _y[j], 0.0) );
Now I change the values of _x and _y during the runtime, but the
geometry isn't changing. I would like pass a pointer to the osg::Vec3
and use the function "dirtyDisplayList".
vertices->push_back( osg::Vec3(&_x[i], &_y[j], 0.0) );
[...]
geom->dirtyDisplayList();
Have everybody a idea how I can visualize my vector field?
Cheers,
Martin
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org