Re: Intersection mask

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (dorbie++at++sgi.com)
Fri, 23 Oct 1998 12:13:40 -0700


Joaquin Casillas Melendez wrote:
>
> Hello all.
>
> I am doing collision detection of an aircraft with the scene, and of
> course don't want the isects intersecting with the aircraft model, so I
> changed the aircraft node mask to 0:
>
> aircraft->setTravMask(PFTRAV_ISECT, 0x0, PFTRAV_SELF, PF_SET);

Try:

aircraft->setTravMask(PFTRAV_ISECT, 0x0, PFTRAV_SELF | TRAV_DESCEND,
PF_SET);

Your prune to terminate the traversal is probably marginally faster
depending on the complexity of your aircraft model because the
traversal will touch fewer nodes.

Cheers,Angus.

>
> The problem is that this is not working and the aircraft is detecting
> collisions with itself.
>
> I have solved the problem by adding a node callback to the aircraft:
> aircraft->setTravFuncs(PFTRAV_ISECT, preIsect, NULL) and the preIsect
> function returning PFTRAV_PRUNE.
>
> I think the right way to do this is the former one, so I would
> appreciate any comments about solving the problem by setting the
> aircraft mask correctly.
>
> Thanks.
>
> -----------------------------------------------
> Joaquin Casillas Melendez mailto:jcasilla++at++glup.irobot.uv.es
> LISITT (ARTEC) Phone: +34 6 364 2253
> Dept. Electr. & Informatics Addr: Poligono de la Coma s/n
> University of Valencia Valencia (SPAIN)
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com

-- 
"Only the mediocre are always at their best." -- Jean Giraudoux 

For advanced 3D graphics Performer + OpenGL based examples and tutors: http://www.dorbie.com/


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Fri Oct 23 1998 - 12:13:46 PDT

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