<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>

<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal>Hi.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>In the search for a solution to my problem rotating a sphere
using vtkRenderWindowInteractor I&#8217;ve now come to posting on this list. <o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>The problem is the following: In my rendered scene I have an
interactor with which I transform a sphere. However, I am only able to rotate
the sphere around its center. If I set the origin of rotation using
vtkProp3D::SetOrigin(double*) the interactor still rotates my sphere around its
center. <o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Somewhat more in depth in my pipeline I define a sphere
(using vtkSphereSource piping to vtkPolyDataMapper piping to vtkActor). I have
a transformation matrix M defined already that I want to apply to my sphere.
The matrix contains translation, rotation, scaling and an origin (vertex) for
the rotation and scaling. Thus the only difference between my matrix and the
intrinsic matrix of the actor is that my order of rotation is not necessarily
R(Z) * R(X) * R(Y). After I use the interactor of my scene to rotate, translate
or scale my sphere I want to retrieve the transformation parameters from the
sphere and use it elsewhere.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Now, after I define my sphere I would like to position the
sphere according to my (external) transformation matrix M. One way to do this
is to convert my (non-VTK) matrix to vtkMatrix4x4 and &nbsp;call my actor&#8217;s
SetUserMatrix(vtkMatrix4x4*). Another way is to extract transformation
parameters from M and apply these using vtkProp3D&#8217;s SetPosition(double*),
SetOrientation(double*), SetScale(double*) and SetOrigin(double*). However,
even though the vtkProp3D.h reads &#8220;Set/Get the origin of the Prop3D. This is
the point about which all rotations take place.&#8221; the interactor in my scene
only rotates around the sphere center. <o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Thus my question amounts to the following: How can I have
the interactor rotate the sphere around the origin specified using
vtkProp3D::SetOrigin(double*)?<o:p></o:p></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal>Kind regards<o:p></o:p></p>

<p class=MsoNormal>Jens Ivar Jørdre<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>(This mail was recent as in my first attempt my &#8220;From:&#8221; e-mail
address was not the one registered with the vtkusers list. Sorry if you got it
more than once.)<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>--</span><span
style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Jens
Ivar Jørdre, Ph.D.</span><o:p></o:p></p>

<p class=MsoNormal><span lang=EN-GB style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Software
Developer @ NordicImagingLab AS</span><span lang=EN-GB><o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Møllendalsveien
61A, N-5009 Bergen, Norway<br>
Phone: +47 55 70 70 95 / +47 90 12 19 74<br>
Fax:&nbsp;+47 55 70 70 96<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>