Hi Kevin, There are wide range of ways to do what you are after, how best to tackle it will depend upon the form or your source data.
You could go the route you have taken and assign a colour to each vertex, and just create mesh for it. Creating a mesh should be pretty straight forward for a disk, just some basic trig and creation of vertices, colours and the PrimitiveSets. The the osggeometry example for inspiration. I certainly wouldn't resort to using Delaunary triangulation or any other meshing tool, creating a disk should be so easy that just creating yourself will lead to best vertex and mesh creation. Another route you could take is to create the geometry as above but in place of the per vertex colours you add a static texture coordinate to each vertex and then assign a texture map to the geometry. This texture would have an osg::Image assigned to it which would contain your source data, and when you update your data you simple call image->dirty() and the next time the scene is rendered the texture will automatically be updated. The osggeometry example also illustrates assigning a texture and texture coordinates to data. Robert. On 12 January 2012 16:38, Kevin Williams <[email protected]> wrote: > Hi, > > This may seem like overkill: using OSG for rendering a 2D polar surface plot, > but I have plans for other things, so please bear with me! > > Basically, what I need to do is mesh a disk, and quite rapidly update the > color along the radials (rho, constant theta's) in proportion to incoming > instrument measurement data - basically a radar display. > > Because I don't see a way to collect a set of node indices along each of my > defined radials on which I can set the color if I use the Delaunay mesher, I > wrote a quick triangle mesher today. (It generates triangle vertex indices > and coordinates, and eliminates shared vertices, but I can keep track of all > the vertices along each radial.) > > I plan to create a TriangleMesh using this routine. > > My question is, is there an elegant way of handling this problem in OSG? As a > new user there is a good chance I'm missing the obvious. :) > > Kind regards > > Kevin > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=44779#44779 > > > > > > _______________________________________________ > 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

