From: GAUVIN Yves (yves.gauvin++at++sncf.fr)
Date: 08/10/2000 23:29:51
I think you can do something like :
pfNodeTravMask( (pfLookupNode("ground",pfGetNodeClassType())),
PFTRAV_ISECT , 0x1, PFTRAV_DESCEND| PFTRAV_IS_CACHE, PF_SET);
pfNodeTravMask( (pfLookupNode("sea",pfGetNodeClassType())), PFTRAV_ISECT
, 0x3, PFTRAV_DESCEND| PFTRAV_IS_CACHE, PF_SET);
Then in the isectFunc
isect = pfNodeIsectSegs (l_root_isect, & segset, hits)
if (isect > 0)
{
pfMQueryHit (hits[0][0], query, &result);
if (result.flags & PFHIT_ISECT)
{
/*intersection*/
isect --;
if (pfGetNodeTravMask(result.node, PFTRAV_ISECT) == 0x1)
{
/*it's the ground*/
crash_ground(...) ;
}
if (pfGetNodeTravMask(result.node, PFTRAV_ISECT) == 0x3)
{
/*it's the sea*/
crash_sea(...) ;
}
}
}
Hope it helps,
Yves GAUVIN
FRENCH RAILROADS
Soo Leng a écrit :
>
> I am currently trying to detect the terrain whether it is land or sea. how
> should go about doing it using performer and Multigen. hit query has already
> been done. But I am do not know how to query my hit pt is a land or sea , so
> that I can create the appropriate explosion . thanks
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2b29 : Thu Aug 10 2000 - 23:32:01 PDT