[vtkusers] Rotate the vector along the X, Y, Z axes.
Andrew Maclean
andrew.amaclean at gmail.com
Sat Nov 4 18:00:05 EDT 2017
This example:
https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/OrientedArrow/
may be useful.
On Sun, Nov 5, 2017 at 8:49 AM, Andrew Maclean <andrew.amaclean at gmail.com>
wrote:
> If you look at https://www.vtk.org/doc/nightly/html/classvtkActor.html
> you will see that vtkActor inherits from the abstract class vtkProp3d:
> https://www.vtk.org/doc/nightly/html/classvtkProp3D.html so all the
> public member functions defined here are available.
>
> This should get you going:
> //---------------------------------------------------------------
> #include <vtkActor.h>
> #include <vtkMatrix4x4.h>
>
>
>
> // Set up your actor
> vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();
> // ...
>
> // Here's how to set the orientation of the actor.
> actor->RotateX(12);
> actor->RotateY(2);
> actor->RotateZ(-13);
> // Here's how to get the rotation matrix etc.
> vtkSmartPointer<vtkMatrix4x4> m = vtkSmartPointer<vtkMatrix4x4>::New();
> actor->GetMatrix(m);
> double * orient;
> orient = actor->GetOrientationWXYZ();
> //---------------------------------------------------------------
>
> I'll add an example to VTK Examples https://lorensen.
> github.io/VTKExamples/site/
>
> Andrew
>
>
> ---------- Forwarded message ----------
>> From: "Met at ll" <simakov.w at gmail.com>
>> To: vtkusers at vtk.org
>> Cc:
>> Bcc:
>> Date: Sat, 4 Nov 2017 04:35:18 -0700 (MST)
>> Subject:
>>
>> [vtkusers] Rotate the vector along the X, Y, Z axes.
>> Rotate the vector along the X, Y, Z axes.
>> Hello.
>> For what day I can not turn the actor on the axes X, Y, Z.
>> There are angles, but it is not possible to calculate the rotation matrix?
>> How can I do that? Someone faced such a problem?
>>
>>
>>
>> --
>> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
>>
>>
>> _______________________________________________
>> 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
>>
>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers
>>
>
>
>
> --
> ___________________________________________
> Andrew J. P. Maclean
>
> ___________________________________________
>
--
___________________________________________
Andrew J. P. Maclean
___________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171105/3218f66b/attachment.html>
More information about the vtkusers
mailing list