[vtkusers] Color of triangle?

David Doria daviddoria at gmail.com
Wed Feb 26 11:18:07 EST 2014


On Wed, Feb 26, 2014 at 8:48 AM, Slavko Kocjancic <eslavko at gmail.com> wrote:
> Hello...
>
> I like to change "the default" gray color of loaded triangles. The example
> on
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/TriangleSolidColor
>
> works nice.
> But as there are milions of triangles and I want all to be in same color How
> to do that? In example each triangle has own color attribute stored in
> array. I like to avoid that waste in memory.
>
> so is there some alternative to set color for entire image?
>
> Slavko.


You can set the color of an object like this:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ColorAnActor

But note that this color is for visualization only - it will not get
exported if you write the object a file, etc.

David


More information about the vtkusers mailing list