Re: Performer Questions

New Message Reply Date view Thread view Subject view Author view

Fischler (src++at++rose)
Thu, 2 Mar 1995 02:50:00 -0800


+>---- On Mar 2, 5:51pm, Hideo MIKI wrote:
> Subject: Re: Performer Questions
->From miki++at++msys0.ihimsys.ihi.co.jp Thu Mar 2 02:17:07 1995
->Date: Thu, 2 Mar 95 17:51:50 JST
->From: miki++at++msys0.ihimsys.ihi.co.jp (Hideo MIKI)
->To: info-performer++at++sgi.sgi.com, miki++at++msys0.ihimsys.ihi.co.jp, src
->Subject: Re: Performer Questions
->
->>>->I have the following questions related to Performer application ( based
->>>->on perfly ) I am developping.
->>>->
->>>->1. How can I get the value above a terrain ?
->>>
->>>You want to intersect your terrain geometry with a downward
->>>segment. With the pfSegsIsectNode() routine, you can get the
->>>primitive, and even point, of intersection.
->>>Look at the pfSegsIsectNode and pfMQueryHit man pages.
->
-> I want to get the value from viewpoint to terrain.In my application,
-> I tried to use pfuCollideGrnd(&(ViewState->xformer->coord),
-> &(ViewState->xformer->grndNode,zpr)
-> But I can't compile this code.

Right - the pfXformer definition is not in pfutil.h.
I think you just want:
    {
        pfNode *grndNode = myTerrainNode; /* or just use your entire scene */
        pfCoord coord;
        pfVec3 zpr;
        /* this is assuming you are using xformer - otherwise, set coord
         * to your current position and HPR.
         */
        pfuGetXformerCoord(ViewState->xformer, coord);
        pfuCollideGrnd(&coord, grndNode, zpr);
    }
And, as you obviously realize, if you hit, zpr will be the point of
intersection with a downward (in Z) ray and pfuCollideGrnd will
return PFUCOLLIDE_GROUND. Otherwise, pfuCollideGrnd will return FALSE.

src.

-- 
-----{-----{---++at++   -----{----{---++at++   -----{----{---++at++   -----{----{---++at++
Sharon Rose Clay (Fischler) - Silicon Graphics, Advanced Graphics Dev.
src++at++sgi.com  (415) 390 - 1002  FAX: (415) 965 - 2658  MS 8U-590
-----{-----{---++at++   -----{----{---++at++   -----{----{---++at++   -----{----{---++at++

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:02 PDT

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