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

Pat Marion pat.marion at kitware.com
Sun Jan 20 06:41:07 EST 2013


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20130120/9cac5c25/attachment-0001.html>


More information about the Ves mailing list