From: Soo Leng (SooLeng++at++stts.com.sg)
Date: 08/11/2000 01:16:03
-----Original Message-----
From: Soo Leng
Sent: Friday, August 11, 2000 3:16 PM
To: 'GAUVIN Yves'
Subject: RE: land or sea
thanks again. Currently my hit point is generated by a database that is only
one pt and with that pt i need to know what nature is the terrain(setting
bestdone in multigen) using performer. or with this pt can i tell which
polygon( or texture )it is in. i can't change the pfNodeTravMask since it is
prewritten in an API which i do not have the source code that do not detect
sea or land .
-----Original Message-----
From: GAUVIN Yves [mailto:yves.gauvin++at++sncf.fr]
Sent: Friday, August 11, 2000 2:30 PM
To: Soo Leng
Cc: info-performer++at++sgi.com<info-performer++at++sgi.com>
Subject: Re: land or sea
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 : Fri Aug 11 2000 - 01:15:42 PDT