[vtkusers] Distance between camera and visible pixel (depth information/map)

David Kornmüller david.kornmueller at gmx.at
Mon Nov 25 15:32:48 EST 2002


hello,

I have a problem and I couldn't find an answer. I want to compute the
distance between a camera and a visible object (like a depth map). Is this
possible and how?

In my case I want to simulate a rangefinder, which computes the distance to
the next visible object. Then the best would be, if I get the range-data in
the coordinate system I put the actors in the scene (e.g. I have a cylinder
with a radius 8. I put the camera in the middle of the cylinder and then I
want
to get the distance information 8).

I found a method in the vtkRenderer class called "GetZ(int x, int y)". I
thought that could be the solution. But I only get Z values between 0 and 1
(mainly something like 0.9.....). Maybe is it possible to convert this data
into
values I put the actors in the scene? (like in the example above that I get
values between 0 and 8 - depending if there is maybe another object in this
cylinder)

I hope someone can help me because I really need this range information.
cheers,
david

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!




More information about the vtkusers mailing list