[Ves] Rotating 3D Model On a Single Axis Alone
Pat Marion
pat.marion at kitware.com
Sun Feb 17 01:29:15 EST 2013
I would use a vtkTransform. It has the api you describe.
http://www.vtk.org/doc/nightly/html/classvtkTransform.html
Pat
On Sun, Feb 17, 2013 at 9:47 AM, shamsudheen <shamsutk87 at gmail.com> wrote:
>
> Hi All,
>
> Im using *vesKiwiViewerApp* in my iOS application.
>
> In my code, Im trying to rotate my 3D model manually using the below code
>
> vesVector4f rot ;
>
> rot[0] = 1;
> rot[0] = 0;
> rot[0] = 0;
>
> rot[3] = 90 * (M_PI/180.0);
>
>
> vesKiwiPolyDataRepresentation* polyDataRepresentation =
> self->renderer.app->getKiwiPolyDataRepresentation(0);
>
>
> vesSharedPtr<vesActor> vesActor = polyDataRepresentation->actor();
>
>
> vesVector3f center = vesActor->center();
>
>
> vesActor->setRotation(vector);
>
> [self scheduleRender];
>
>
> 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
>
> rot[0] = 0;
> rot[0] = 1;
> rot[0] = 0;
>
> rot[3] = 90 * (M_PI/180.0);
>
> I cannot find any methods which I can use to rotate the object on a single
> axis alone like
> vesActor->rotateX(90); or
> vesActor->rotateY(90) or
> vesActor->rotateZ(90)
>
> Are there any similar methods available in VES/Kiwi ?
>
> Any help on this is appreciated
>
> Thanks .
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20130217/780bd63b/attachment-0001.html>
More information about the Ves
mailing list