Collision with polytopes.

New Message Reply Date view Thread view Subject view Author view

Francesc Blanes Kirchner (cesc++at++matrust.es)
Mon, 18 Oct 1999 17:45:25 +0100


Hello,

I'm new in this list (in Permormer to...). Sorry if this is a basic
question but I'm trying to detect intersections between a Polytope
and a sphere.

My problem is that I have a polytope formed by 6 planes (a cube of size
2 centered
a 0,0,0) and a bounding spheres (radius of 10 units) that moves around
the scene.

My code is something like:

        pfGetNodeBSphere (dcs, &bsphere);
        coli=pfPtopeContainsSphere(ptope,&bsphere);

coli = PFIS_MAYBE when the bbox of bsphere intersects ptope . It looks
like
computes the intersection of two cubes.

coli = PFIS_FALSE otherwise.

coli is never equal to PFIS_MAYBE | PFIS_TRUE.

It seems that I can only compute intersections between boxes but not
between
a box and a sphere.

And finally, why coli is never equal to (PFIS_MAYBE | PFIS_TRUE)? How
can I be sure
about collisions if coli is never PFIS_TRUE?

Where I can find source code about collisons between objects, polytopes
etc.?

Thank you !!!

--
+----------------------------------------------------------------------+
|   Francesc Blanes Kirchner          Email:   mailto:cesc++at++matrust.es  |
|   Matrust, S.L.                     Phone:   (34) 934.090.115        |
|   Barcelona - Spain                 Fax  :   (34) 934.090.116        |
+----------------------------------------------------------------------+

Hello,

I'm new in this list (in Permormer to...). Sorry if this is a basic
question but I'm trying to detect intersections between a Polytope
and a sphere.

My problem is that I have a polytope formed by 6 planes (a cube of size 2 centered
a 0,0,0) and a bounding spheres (radius of 10 units) that moves around the scene.

My code is something like:

        pfGetNodeBSphere (dcs, &bsphere);
        coli=pfPtopeContainsSphere(ptope,&bsphere);

coli = PFIS_MAYBE when the bbox of bsphere intersects ptope . It looks like
computes the intersection of two cubes.

coli = PFIS_FALSE otherwise.

coli is never equal to PFIS_MAYBE | PFIS_TRUE.

It seems that I can only compute intersections between boxes but not between
a box and a sphere.

And finally, why coli is never equal to (PFIS_MAYBE | PFIS_TRUE)? How can I be sure
about collisions if coli is never PFIS_TRUE?

Where I can find source code about collisons between objects, polytopes etc.?

Thank you !!!
 

-- 
+----------------------------------------------------------------------+
|   Francesc Blanes Kirchner          Email:   mailto:cesc++at++matrust.es  |
|   Matrust, S.L.                     Phone:   (34) 934.090.115        |
|   Barcelona - Spain                 Fax  :   (34) 934.090.116        |
+----------------------------------------------------------------------+
 

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Oct 18 1999 - 08:45:46 PDT

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