[vtkusers] Color of triangle?

Slavko Kocjancic eslavko at gmail.com
Wed Feb 26 12:55:43 EST 2014


On 02/26/2014 05:18 PM, David Doria wrote:
> 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
>
Thanks.
I miss that. And it does exactly what I need.
Slavko


More information about the vtkusers mailing list