[vtkusers] How to change the size of arrow in vtkArrowSource..??

David Doria daviddoria+vtk at gmail.com
Thu Jan 21 07:43:58 EST 2010


On Thu, Jan 21, 2010 at 6:16 AM, Rakesh Patil <rakeshthp at in.com> wrote:

> Hello,
>
> I have implemented vector plot for unstructured grid.. Now i want to
> display a legend showing the min arrow size and max arrow size along with
> the min and max vector magnitude..
>
> To put a legend i made use of vtkLegendBoxActor as shown in the following
> example
>
> http://www.vtk.org/Wiki/VTK/Examples/Legend
>
> But am failing to display an arrow with two different sizes. i.e. a small
> arrow and a big arrow. Following
> is the code i used
>
> vtkSmartPointer<vtkArrowSource> bigArrow =
> vtkSmartPointer<vtkArrowSource>::New();
>
> vtkSmartPointer<vtkPolyData> bigArrowPoly = bigArrow->GetOutput();
>
> similarly one more set of arrow source and polydata I have declared and
> added to the renderer..
>
> I am getting two arrows, but how do i change the size of these arrows..??
>
> Thanks in Advance
> Rakesh Patil
>
>
>
I would change the size of an arrow using a scaling transform and
vtkTransformPolyDataFilter :
http://www.vtk.org/doc/nightly/html/classvtkTransformPolyDataFilter.html

However, at around line 600 of vtkLegendBoxActor.cxx, everything seems to be
resized anyway, so I don't think what you're trying to do is possible using
the current legend code.

Anyone disagree?

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100121/1ddebe0c/attachment.htm>


More information about the vtkusers mailing list