[vtkusers] SetLineWidth problem

Weiguang Guan guanw at rhpcs.mcmaster.ca
Wed Sep 12 15:21:03 EDT 2007


Hi Sam,

Did you create an actor in the subclass? vtkPolyDataAlgorithm and its 
subclasses produce polydata only. Controlling displaying properties, such 
as color, line width, etc, should be done outside vtkPolyDataAlgorithm.

Weiguang

On Tue, 11 Sep 2007, Sam Preston wrote:

> Hi all,
>
> I have a subclass of vtkPolyDataAlgorithm that draws some lines in 3D
> for me, and I would like to have them drawn with a different line
> width.  I was trying to change the line witdth using:
>
>    this->actor->GetProperty()->SetLineWidth(width);
>
> I'm using a vtkPolyDataMapper and vtkActor in the rendering process.
>
> But it hasn't been working for me.  I'm pretty sure I'm using OpenGL
> rendering in all my VTK code (I even changed all my classes to
> vtkOpenGLWhatever to make sure), but setting the line width doesn't
> seem to have any effect.
>
> I tried grep-ing the vtk source for glLineWidth, and only found it in
> the vtkOpenGLPolyDataMapper2D class -- is the line width property
> ignored for lines rendered in the 3D scene?
>
> Thanks for any help,
> -Sam
>
>



More information about the vtkusers mailing list