[vtkusers] Move arrow in the direction of point normal

Alex Malyushytskyy alexmalvtk at gmail.com
Mon Apr 29 19:35:10 EDT 2013


Please reply to mailing list.
It will help first of all you,

"Tbe object can be any thing like vtkpolydata or vtkarrowsorce or
vtkcylindersource"

All sources you mention produce vtkPolydata, so
have you looked at
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Filters/TransformPolyData
I've suggested you to check?

I believe it covers all technical questions how to apply transformation in
vtk,
Everything else is trivial math. It is easy to determine how to find
distance between 2 points and angle between 2 vectors, which you would need
to do to define transformation for the polydata to orient it in normal
direction and place at point location.

Alex



On Thu, Apr 25, 2013 at 9:41 PM, Arindam <arindam at triassicsolutions.com>wrote:

>  Thanks for your reply. Tbe object can be any thing like vtkpolydata or
> vtkarrowsorce or vtkcylindersource.For reference i am attaching 3 image
> with this email.
>
>
> On 4/26/2013 6:17 AM, Alex Malyushytskyy wrote:
>
>   Correctly asked question is 50% of the answer.
>  Your question does not provide details on which data types your are
> working with.
>  There is no such class in vtk as ArrowObject.
>
>  If you work with vtkPolyData which represent your arrow, you need to
> define transformation which will  adjust orientation of your polydata and
> translate it to desired location.
>
>  Useful example might be:
>
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Filters/TransformPolyData
>
>
>
>  On Tue, Apr 23, 2013 at 10:17 PM, Arindam <arindam at triassicsolutions.com>wrote:
>
>>
>> Hi,
>>
>> I have point and a ArrowObject.I need to move the object to the point on
>> a 3D surface  and with the direction of the point normal.Means the arrow
>> should point to the point at the direction of the normal of the given
>> point.How can i achieve that?Any help will be appreciated.
>>
>>
>> --
>> Thanks.
>> Arindam
>>
>>
>>
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>
>
> --
>
>    Regards,
> *ARINDAM SAHA
> Software Engineer*
> Triassic Solutions Pvt. Ltd.
> (+91) 471 2700050 (Office)
> 9746145220 (Mobile)  <http://www.triassicsolutions.com>
> Disclaimer: This e-mail contains confidential information intended solely
> for the intended recipient. If you are not the intended recipient, please
> notify the sender by e-mail and delete this email permanently from your
> records. Do not copy or distribute this e-mail and any such actions are
> unlawful. Except where this email is sent in the usual course of business,
> the views expressed in this email are those of the sender. Triassic
> Solutions Pvt. Ltd. accepts no responsibility for any indirect damage or
> loss suffered by reason of inaccuracy or incorrectness of the information
> in this email.
> + Please consider our environment before printing this e-mail.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130429/3e2550f6/attachment.htm>


More information about the vtkusers mailing list