Mario Veraart (rioj7++at++fel.tno.nl)
Wed, 22 Apr 1998 12:45:21 +0200 (MET DST)
segset.mode = PFTRAV_IS_PRIM | PFTRAV_IS_CULL_BACK;
segset.isectMask = ~0; // intersect with everything
segset.activeMask = 0x01; // one segment specified
segset.segs[0].pos.set(x,y,2500.0f);
segset.segs[0].dir.set(0,0,-1.0f);
segset.segs[0].length = 10000.0f;
> view.xyz.set(x,y,2500.0f);
> view.hpr.set(0.0f, -90.0f, 0.0f);
> chan->setView(view.xyz,view.hpr);
There is no need for these three lines.
Mario
>
> // do an intersection test against the scene graph
> isect = root->isect(&segset,hits);
> // if successful, set our height to that of the point of contact
> // plus a small offset
> if (isect)
> {
> pfVec3 pnt, xpnt;
> pfMatrix xmat, xmat2;
> (*hits[0])->query(PFQHIT_POINT, &pnt);
>
> // transform object point into scene coordinates
> (*hits[0]->query(PFQHIT_XFORM, &xmat);
> xpnt.xformPt(pnt, xmat);
>
> return (xpnt[PF_Z] - altOffset_);
> }
> }
>
> Thanks in advance for any assistance.
>
> Suzie
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:17 PDT