Picking

Hi everybody,
I’m studying xith3d picking. Now I’m looking at the “Xith3DPickRenderTest.java”. I was wondering about the meaning of the two methods getZMin() and getZMax() of the PickRenderResult class.
What do they return?

Thank you in advance,
Fausto.

Hi,

getZMin() and getZMax() of PickRenderResult return closest and farest depth values for appropriate shape. These values allow you to decide which object is closer if picking render pass returned multiple results.

According OpenGL documentation,

[quote]The hit record consists of… [skipped] …minimum and maximum depth values of all vertices that hit selection region.

Returned depth values are mapped such that the largest unsigned integer value corresponds to window coordinate depth 1.0, and zero corresponds to window coordinate depth 0.0.
[/quote]
Yuri

thank you very much

Fausto.