Looks like its clipping regular quads as two triangles.   Regular quads are
ordered:

1------3
 |         |
0------2

So (021) and (123) are triangles.

Greg


                                                                                
                                               
                      Rob Lahaye                                                
                                               
                      <[EMAIL PROTECTED]        To:       
opendx2-dev@lists.berlios.de                            
                      et>                                cc:                    
                                               
                      Sent by:                           Subject:  [opendx-dev] 
odd thing in zclipQ.c ?                        
                      [EMAIL PROTECTED]                                         
                                     
                      son.ibm.com                                               
                                               
                                                                                
                                               
                                                                                
                                               
                      06/28/2003 09:56 AM                                       
                                               
                      Please respond to                                         
                                               
                      opendx-dev                                                
                                               
                                                                                
                                               
                                                                                
                                               





David Thompson wrote:

 > I don't have time to work on a fix for a compiler bug at this moment. If
 > you can find a way around it, I'll include it--otherwise we'll just have
 > to make the comment that gcc 3.1 or better will take a long time to
 > compile this file.


I've been trying a lot to bypass the compiler bug with my gcc 2.95.2
compiler.
To no avail. In zclipQ.c, the problem is with TRYCLIP(), and more specific
with ADDTRI() in zclip.h.

Anyway, when scrutinizing the file zclipQ.c, I found the following quite
odd:

from line 82 onwards
             v1 = elements[0];
             v2 = elements[2];
             v3 = elements[1];

and then line 95 onwards
             v1 = elements[1];
             v2 = elements[2];
             v3 = elements[3];


Notice that the first three indices are 0,2,1 ; whereas the next is 1,2,3.
Is the first order correct, or should that be 0,1,2 (reverse 2 and 1)?
I.e:
             v1 = elements[0];
             v2 = elements[1];
             v3 = elements[2];

I have no idea what is happening in this file; can a knowlegeable person
check whether the index sequence is alright here.

Regards,
Rob.




Reply via email to