[vtkusers] Contents of vtk-developers Digest, Vol 146, Issue 15
Luis Vieira
luis.vieira at vektore.com
Tue Jun 14 11:16:52 EDT 2016
Hi David,
Also, I have tried, unsuccessfully, as well as following:
renderer->ComputeVisiblePropBounds(bounds);
vtkCamera* cam = renderer->GetActiveCamera();
cam->SetFocalPoint((bounds[0] + bounds[1]) / 2.0, (bounds[2] + bounds[3]) /
2.0, (bounds[4] + bounds[5]) / 2.0);
cam->SetPosition((bounds[0] + bounds[1]) / 2.0, (bounds[2] + bounds[3]) /
2.0, bounds[4] + bounds[5]);
cam->SetViewUp(0, 1, 0);
Luis Vieira, Toronto - ON
Consultant, Software Engineer
Vektore Exploration Consulting Corporation
luis.vieira at vektore.com
www.vektore.com
-----Original Message-----
From: David Thompson [mailto:david.thompson at kitware.com]
Sent: June 14, 2016 10:37 AM
To: Luis Vieira <luis.vieira at vektore.com>
Cc: vtk-developers at vtk.org
Subject: Re: [vtk-developers] Rendering Image and Picking Points
Hi Luis,
> ...I am struggling to rendering an Image and set up the camera focal point
to placed that image within the center of the camera.
>
> 1- I want this because the point is when I am rotating the object and
picking point in its surface I got the X, Y and Z world coordinates that
doesn't match the real coordinates of the camera;
>
> 2- When I am trying to use those coordinates once I had picked to
calculate the center of mass between them , the results are not accurately
rights. And everything that I have to derivate/build also are not, as well
as when I make a Plane and the its origin goes away into the camera out of
my cylinder(image). ...
It looks like you are positioning the camera using image parameters... but
you are not mapping the image directly. Instead, you are mapping geometry
from a VRML file and texturing it with the image. The pick coordinates will
be points on the VRML geometry, not image-space coordinates. There is an
additional transform from texture coordinates to image coordinates that is
being ignored.
David
More information about the vtkusers
mailing list