Steve Baker (sbaker++at++link.com)
Fri, 5 Dec 1997 06:41:58 -0600 (CST)
> Hello pfUsers,
>
> I have found a small misfunctioning for the pfNode::isect() method.
> If I create a simple database consisting of 4 quads at z=0.
> The databse is a Multigen Flight file.
>
> Y=
> 40------------------- Z=0
> | | |
> | | |
> | | |
> | | |
> 0|--------|--------|
> | | |
> | | |
> | | |
> | | |
> -40-------------------
> 0 40 80 X=
>
> I want to try to intersect with the following segment
> origin = (40,0,-100)
> direction = (0,0,-1)
> length = 200
OK, so the segment starts at Z=-100 and ends at Z=-100+200*(-1)=-300.
> I get no intersection with the database.
Which is what I'd expect since the vector runs from Z=-100 to Z=-300 and
the quadrilateral is at Z=0
> I use PFTRAV_IS_CULL_FRONT in the mode specifier.
> The actual intersection is done for a couple of segments that have
> a bounding cylinder set as part of the pfSegSet.
...whatever...
> But when I model an extra triangle in the database with coordinates
> (36,0,5) (40,0,5) (40,4,5)
> I get an intersection hit at location (40,0,5).
That's a suprise! The entire triangle is at Z=5 which is still not
between Z=-100 and Z=-300.
> Also if I put a quad at z=5 at the same location as the triangle I get
> an intersection with this quad.
Same deal.
> If I try to intersect along the edge of the (ground) quads
> it gives the right result.
> I also tried it at location (0,0) and there I got an intersection back.
> My question:
> Is there a possibility that intersection at an xy coordinate that matches a
> vertex coordinate is missed for some of the vertices in a quad or
> triangle? (It does not happen along the edge of a primitive)
I suppose a teeny-tiny roundoff error could result in a miss - it's not
totally unreasonable.
Steve Baker 817-619-8776 (Vox/Vox-Mail)
Hughes Training Inc. 817-619-4028 (Fax)
2200 Arlington Downs Road SBaker++at++link.com (eMail)
Arlington, Texas. TX 76005-6171 SJBaker1++at++airmail.net (Personal eMail)
http://www.hti.com http://web2.airmail.net/sjbaker1 (personal)
** Beware of Geeks bearing GIF's. **
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:56:20 PDT