[vtkusers] how to set the color of a triangle?
Szabolcs Berecz
szabolcs.berecz at gmail.com
Mon Feb 13 18:26:44 EST 2006
Hi!
I would like to frequently change the color and/or the transparency of
several triangles,
but I don't know what is the best practice. Actually I don't have any
idea how to change
the color of a triangle.
To create the surface, first I put the vertices into a vtkPoints, then
put the index of the
vertices into a vtkCellArray. At the end I pass it to a vtkActor through a
vtkPolyDataMapper.
Is it supposed to be done like this?
How can I change the color of one of the triangles?
Do I have to create a separate vtkActor for each triangle?
If I use a separate vtkActor for each triangle, can I somehow share
the vertices between
the triangles?
So in brief: What is the best practice to render a bunch of connected
triangles with
frequently and independently changing colors? (the position of the
vertices will also
change, but I think I can solve that)
Thanks for your help!
Bye,
Szabi
More information about the vtkusers
mailing list