[info-performer] Intersection testing and transformation

Date view Thread view Subject view Author view

Harri.Mahonen++at++seamk.fi
Date: 09/20/2005 00:59:32


Hi,

I have been scratching my head for a while with this problem:

I cannot get correct intersection coordinates in the coordinate space defined with *. Current scenegraph structure follows:

pfScene -> pfSCS -> pfDCS* -> pfSwitch -> pfDCS -> pfGeode

What I am doing is that I'm running an intersection test and getting coordinates in pfGeode's local coordinate space. I wish to convert this point to the coordinate space defined with *. Or in other words, I'm intersecting with a terrain and wish to position an object in the pfDCS* coordinate space.

So far, what I'm doing is:

1. Get the PFQHIT_POINT and PFQHIT_XFORM from the intersection test.
2. Transform the given intersection point with the given matrix (from local to world coordinates)
3. Transform the point in world coordinates by pfSCS and then pfDCS.

Yet, the coordinates are not correct. Seems that I'm missing something crucial here, but I'm not able to identify what.
 

-- 
Harri Mähönen


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Sep 20 2005 - 00:59:36 PDT