[Ves] Rotate 3D object to the specifeid angles [iOS]

Pat Marion pat.marion at kitware.com
Wed Feb 6 04:19:39 EST 2013


Instead of adjusting the camera, you should set a transform on the vesActor
object associated with your model.

You can access the vesActor from the vesKiwiPolyDataRepresentation for your
model, if you are using that class in your app.

For example code, please see the implementation of
vesKiwiDataRepresentation::setTransformOnActor().

Pat

On Wed, Feb 6, 2013 at 7:10 PM, shamsudheen <shamsutk87 at gmail.com> wrote:

> Hi All,
>
> I have successfully built the *VES/Kiwi* and have rendered one 3D obj  in
> to my* iPad* application from a *.obj* file.
>
> Im using *vesKiwiViewerApp* in my application.The Gestures are working
> and the 3D model is rotating well.
>
> *Now I would like to rotate my 3D modal/object through programmatically.*
>
> I have  to rotate my 3D object to the following angles,, *
> 30º,60º,90º,120º,150º,180º,210º,240º,270º,300º,330º,360º*
>
> So I have wrote the code as below to rotate the  3D object in to 30º
>
>      vesVector3f cameraPosition (30, 0, 1);
>     self->renderer.app->setCameraPosition(cameraPosition);
>
> Its rotated.However not exactly to the 30º and the 3D model is zoomed out.
>
> My screen size is *(400, 400).*So the console window displayed the
> following when 3D model renderes
> *
> *
> *resize(400, 399)*
> *x:0.000000 y:0.000000 z:-1.000000*
> *x:0.000000 y:0.000000 z:-439.917145*
> *
> *
> So I have set the camera position as
> *
>
> *
>     vesVector3f cameraPosition (30, 0,-439.917145);
>     self->renderer.app->setCameraPosition(cameraPosition);
>
> Now the zoom is correct and the 3D model is rotated.However not exactly to
> 30.
> **
>
> *My target is to rotate the object in different angles.how can achieve
> this?*
>
> Is it possible to access the rendered 3D object and set the positions
> instead of using the camera ?
>
> Any help on this is appreciated.
>
> Thanks
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20130206/9f9d8295/attachment-0001.html>


More information about the Ves mailing list