Re: intersection at polygon vertices

New Message Reply Date view Thread view Subject view Author view

Mario Veraart (rioj7++at++fel.tno.nl)
Fri, 5 Dec 1997 17:47:38 +0100 (MET)


Steve Baker wrote:
>
> On Thu, 4 Dec 1997, Mario Veraart wrote:
>
> > 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.

Sorry a small typo from my side.
In the code the direction was set to (0,0,1)

>
> > 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.
>
> > 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.

If this is the case than I have to try and find a way round this
problem. That is because I have to intersect at vertex coordinates of
some primitives that are part of the database.

Mario
=======================================================================
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:56:20 PDT

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