So, now I am able to access the Drawable in my imported Node (thank you for
the help. The Node was a Group instead of a Geode - good call Per!) Now I am
faced with another problem: how to scale the vertices of the Drawable
(Geometry.) My Drawable is currently scaled using the MatrixTransform it is
parented to, but my application does not support scaling in transformation
matrices (it breaks.) My solution is to apply the scaling directly to the
vertices, permanently altering the vertices (this only happens once, at the
beginning of the program.)

It looks like the easiest thing to do would be to make the change in my
custom TriangleFunctor (since I am have to use the altered vertex data there
anyway), but this has proven difficult (because they are const?). Another
option I can see would be to make the change to the VertexArray data, but I
can't see how to easily make changes to it in code. I can see the data in
the VertexArray in the .osg file, and it works when I alter the data by hand
(in a text editor), but I would really like to find a way to do it in code.

My question: is there any way to make changes to the triangle vertices in a
TriangleFunctor? If not, how can I access and make changes to a Geometry's
VertexArray? Are there any examples of these that I could look at?

Thank you for the help!!!

Jake
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to