I would use a vtkTransform. It has the api you describe.<br><br><a href="http://www.vtk.org/doc/nightly/html/classvtkTransform.html">http://www.vtk.org/doc/nightly/html/classvtkTransform.html</a><br><br><br>Pat<br><br><div class="gmail_quote">
On Sun, Feb 17, 2013 at 9:47 AM, shamsudheen <span dir="ltr"><<a href="mailto:shamsutk87@gmail.com" target="_blank">shamsutk87@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><br></div><div>Hi All,<div><br></div><div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:arial,sans-serif;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:arial,sans-serif;word-spacing:0px">Im using </span><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;float:none;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:arial,sans-serif;word-spacing:0px"><b>vesKiwiViewerApp</b></span><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:arial,sans-serif;word-spacing:0px"> in my iOS application.</span></span></div>
</div><div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:arial,sans-serif;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:arial,sans-serif;word-spacing:0px"><br>
</span></span></div><div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:arial,sans-serif;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:arial,sans-serif;word-spacing:0px">In my code, Im trying to rotate my 3D model manually using the below code</span></span></div>
<div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:arial,sans-serif;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:arial,sans-serif;word-spacing:0px"><br>
</span></span></div><div><font color="#2c1974"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:arial,sans-serif;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:arial,sans-serif;word-spacing:0px"> </span></span><span style="font-family:Menlo;font-size:11px"> vesVector4f rot ;</span></font></div>
<div><span style="font-family:Menlo;font-size:11px"><font color="#2c1974"> </font></span></div><div><font color="#2c1974"><span style="font-family:Menlo;font-size:11px"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo">
<span style="white-space:pre-wrap"> </span>rot[0] = 1;</div></span><span style="font-family:Menlo;font-size:11px"><span style="white-space:pre-wrap"> </span>rot[0] = 0;</span></font></div><div><font color="#2c1974"><span style="font-family:Menlo;font-size:11px"><span style="white-space:pre-wrap"> </span>rot[0] = 0;</span><span style="font-family:Menlo;font-size:11px"> </span><span style="font-family:Menlo;font-size:11px"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo">
</div></span><span style="font-family:Menlo;font-size:11px"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo"> rot[3] = 90 * (M_PI/180.0);</div>
<div><br></div></span></font></div><div><span style="font-family:Menlo;font-size:11px"><font color="#2c1974"> </font></span></div><div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:arial,sans-serif;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:arial,sans-serif;word-spacing:0px"><font color="#2c1974"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo">
vesKiwiPolyDataRepresentation* polyDataRepresentation = self->renderer.app->getKiwiPolyDataRepresentation(0);</div><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;min-height:13.0px"> <br>
</p>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo"> vesSharedPtr<vesActor> vesActor = polyDataRepresentation->actor();</div><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;min-height:13.0px">
<br></p><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo"> vesVector3f center = vesActor->center();</div><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;min-height:13.0px">
<br></p><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo"> vesActor->setRotation(vector);</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo">
<br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo">
[self scheduleRender];</div></div></font></span></span></div><div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:arial,sans-serif;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:arial,sans-serif;word-spacing:0px"><br>
</span></span></div><div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:arial,sans-serif;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:arial,sans-serif;word-spacing:0px"><br>
</span></span></div><div><font face="arial, sans-serif"><span style="font-size:13px">This would rotate my model on a particular direction.However when I change the axis ,the old rotated position is lost . Example code is given below </span></font></div>
<div><font face="arial, sans-serif"><span style="font-size:13px"><br></span></font></div><div><div><font color="#2c1974"><span style="font-family:Menlo;font-size:11px"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo">
<span style="white-space:pre-wrap"> </span>rot[0] = 0;</div></span><span style="font-family:Menlo;font-size:11px"><span style="white-space:pre-wrap"> </span>rot[0] = 1;</span></font></div><div><font color="#2c1974"><span style="font-family:Menlo;font-size:11px"><span style="white-space:pre-wrap"> </span>rot[0] = 0;</span><span style="font-family:Menlo;font-size:11px"> </span><span style="font-family:Menlo;font-size:11px"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo">
</div></span><span style="font-family:Menlo;font-size:11px"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo"> rot[3] = 90 * (M_PI/180.0);</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo"><br></div></span></font></div></div><div><font face="arial, sans-serif"><span style="font-size:13px">I cannot find any methods which I can use to rotate the object on a single </span></font><span style="font-family:arial,sans-serif;font-size:13px">axis</span><font face="arial, sans-serif"><span style="font-size:13px"> alone like </span></font><span style="line-height:normal;text-indent:0px;letter-spacing:normal;text-align:-webkit-auto;font-variant:normal;text-transform:none;font-style:normal;white-space:normal;display:inline!important;word-spacing:0px"><span style="line-height:normal;text-indent:0px;letter-spacing:normal;text-align:-webkit-auto;font-variant:normal;text-transform:none;font-style:normal;white-space:normal;display:inline!important;font-weight:normal;word-spacing:0px"><font color="#2c1974"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo;display:inline!important">
<font face="arial, sans-serif"><span style="font-size:13px">vesActor->rotateX(90); or </span></font></div></font></span></span><span style="line-height:normal;text-indent:0px;letter-spacing:normal;text-align:-webkit-auto;font-variant:normal;text-transform:none;font-style:normal;white-space:normal;display:inline!important;word-spacing:0px"><span style="line-height:normal;text-indent:0px;letter-spacing:normal;text-align:-webkit-auto;font-variant:normal;text-transform:none;font-style:normal;white-space:normal;display:inline!important;font-weight:normal;word-spacing:0px"><font color="#2c1974"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo;display:inline!important">
<font face="arial, sans-serif"><span style="font-size:13px">vesActor->rotateY(90) or </span></font></div></font></span></span><span style="line-height:normal;text-indent:0px;letter-spacing:normal;text-align:-webkit-auto;font-variant:normal;text-transform:none;font-style:normal;white-space:normal;display:inline!important;word-spacing:0px"><span style="line-height:normal;text-indent:0px;letter-spacing:normal;text-align:-webkit-auto;font-variant:normal;text-transform:none;font-style:normal;white-space:normal;display:inline!important;font-weight:normal;word-spacing:0px"><font color="#2c1974"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo;display:inline!important">
<font face="arial, sans-serif"><span style="font-size:13px">vesActor->rotateZ(90)</span></font></div></font></span></span></div><div><font face="arial, sans-serif"><span style="font-size:13px"><br></span></font></div>
<div>
<font face="arial, sans-serif"><span style="font-size:13px">Are there any similar methods available in VES/Kiwi ?</span></font></div><div><font face="arial, sans-serif"><span style="font-size:13px"><br></span></font></div>
<div><font face="arial, sans-serif"><span style="font-size:13px"> Any help on this is appreciated</span></font></div><div><font face="arial, sans-serif"><span style="font-size:13px"><br></span></font></div><div><font face="arial, sans-serif"><span style="font-size:13px">Thanks .</span></font></div>
<div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:arial,sans-serif;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:arial,sans-serif;word-spacing:0px"><br>
</span></span></div></div></blockquote></div><br>