Re: spheres and boxes

New Message Reply Date view Thread view Subject view Author view

Steve Baker (steve++at++mred.bgm.link.com)
Thu, 11 Jul 96 16:04:52 -0500


It sounds to me like we are confusing three tests and their results

Sphere-completely-surrounds-box -- Test all eight vertices, if
                                     they are all contained inside
                                     the sphere - then so is the box.

surface-of-Sphere-intersects-surface-of-box -- Nasty test - helped out somewhat
                                     by the fact that the box is axially
                                     aligned.

solid-Sphere-intersects-solid-box -- More than just the OR
                                     of the previous two tests because the
                                     entire sphere could be totally inside
                                     the box and hence fail both of the earlier
                                     tests - yet still need to pass this one.

Look at the man page for pfBoxContainsBox - it have to return three separate
flags to describe what happened (and one of those is a 'PFIS_MAYBE')

First define your requirements, then document them - and only then start to
write code. (Oh yea - right - I do that *all* the time....NOT!)

  Steve Baker 817-323-1361 (Vox-Lab)
  Hughes Training Inc. 817-695-8776 (Vox-Office/vMail)
  2200 Arlington Downs Road 817-695-4028 (Fax)
  Arlington, Texas. TX 76005-6171 steve++at++mred.bgm.link.com (eMail)

=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


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:53:10 PDT

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