[Ves] Getting Angle or XYZ Points of a Rendered 3D Object

SHAMSUDHEEN TK shamsutk87 at gmail.com
Sun Jan 20 16:09:05 EST 2013


oh.. okay thank you very much for the answer.

Let me clarify my question in detail.

Let take an example, I have a TeaPort.. Each portions of the TeaPort
representing separate views.. let say front-view , bottom-view, side-view ,
front -right-view, front-left-view etc...

My aim is to display the corresponding views name in a Label while user
rotating the 3D TeaPort object.

So my logic should be like this, first i will identify all the angles or
xyz points which is corresponding to the each separate views. example:
30-40 angle will be  front-view, 60-70 will be front -right-view such on.

When the current 3D object angles meet 30-40  degree while rotating , we
can easily know the TeaPort view is front-view.When angles meet 60-70 ,it
should be front -right-view.

I hope you cleared my concept,

Any good suggestions from your side to help me..

Thanks again for your answer.



On Sun, Jan 20, 2013 at 5:41 AM, Pat Marion <pat.marion at kitware.com> wrote:

> Hi Shamsudheen,
>
> I'm not sure exactly what you're trying to get with angle, do you mean the
> camera angle?  When you use gestures to rotate, you are actually moving the
> camera, not the object.  I assume you are using vesKiwiViewerApp in your
> application?  This class, in the VES master branch, makes access to the
> renderer and camera protected function calls, so you can derive a new class
> and do your work there.  So to get the view direction, for example, you
> would call:
>
> vesCamera::Ptr camera = app->camera();
> vesVector3f viewDirection = camera->focalPoint() - camera->position();
>
> To get the XYZ points, again that depends on how your application is using
> VES.  You can get the XYZ points from a vtkPolyData object after you read
> data, or you can get the points from the vesGeometryData object which holds
> the rendering vertex arrays.
>
> You might try following some introductory VTK tutorials to become more
> familiar with using the VTK library:
>
> http://www.vtk.org/Wiki/VTK/Examples/Cxx
>
> Pat
>
> On Sun, Jan 20, 2013 at 5:17 PM, SHAMSUDHEEN TK <shamsutk87 at gmail.com>wrote:
>
>> Shamsudheen
>
>
>
> I'm really newbie with *VTK* and *VES*.

I have successfully built the *VES/Kiwi* and have rendered one 3D obj file
in my iPad application.

Great, I can rotate and zoom the object now using Gestures.

*Now I would like to get the Angle or XYZ Points of a Rendered 3D Object to
identify the object position.*

Is it possible? if yes, please share the details.

Thanks,

Shamsudheen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20130120/eac5ca50/attachment-0001.html>


More information about the Ves mailing list