Query on Intersections

New Message Reply Date view Thread view Subject view Author view

From: Vidya Vaidyanathan (vidya++at++cair.res.in)
Date: 06/30/2000 08:33:08


Hello,
        I have a problem with determining point of Intersections. I find
that the usage of the function isect, I am successfully able to determine
an intersection, but on querying the point of intersection (using pfHit) I
seem to obtain very minute values for the same. The transformation matrix
obtained always seems to be an unity matrix. And on using the function
xformPt also, i don't seem to get anything substantial.
        Putting in the part of code

        seg1 is a segment formed by using the function MakePts.

        isect = root->isect(&seg1,(pfHit ***)hits);
        if(isect!=0) cout<<"Encountered Collision"<<endl;
        unsigned int hit_flags;
        pfVec3 pnt,xpnt;
        pfMatrix xmat;
        if(isect)
        {
                (*hits[i])->query(PFQHIT_FLAGS, &hit_flags);
                if((hit_flags & PFHIT_POINT ))
                {
                        (*(hits[i]))->query(PFQHIT_POINT, pnt.vec);
                        (*(hits[i]))->query(PFQHIT_XFORM, xmat.mat[0]);
                        xpnt.xformPt(pnt,xmat);
                      cout<<"Changed co
ordinates:"<<xpnt[PF_X]<<","<<xpnt[PF_Y]<<","<<xpnt[PF_Z]<<endl;
                }
        }

        The co ordinates seem to be of very small order and mostly zero
and don't seem to change with different points of intersection.
        I hope to get some help on this.
        thanks in advance
        regards,
vidya


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Jun 29 2000 - 22:07:34 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.