glut/lib/gle/segment.c
/* ============================================================ */
/* 
 * This routine draws a piece of the round segment with psuedo-facet
 * normals.  I say "psuedo-facet" because the resulting object looks 
 * much, much better than real facet normals, and is what the  round
 * join style was meant to accomplish for face normals.   
 */
This routine draws a piece of the round segment with psuedo-facet
normals.  I say "psuedo-facet" because the resulting object looks
much, much better than real facet normals, and is what the  round
join style was meant to accomplish for face normals.
This routine draws a piece of the round segment with psuedo - facet normals . I say " psuedo - facet " because the resulting object looks much much better than real facet normals and is what the round join style was meant to accomplish for face normals .
void draw_binorm_segment_facet_n (int ncp,      
                           double front_contour[][3],
                           double back_contour[][3],
                           double front_norm[][3],
                           double back_norm[][3],
                           int inext, double len)
{
   int j;
   BGNTMESH (inext, len);
   for (j=0; j<ncp-1; j++) {
      N3F_D (front_norm[j]);
      V3F_D (front_contour[j], j, FRONT);
      N3F_D (back_norm[j]);
      V3F_D (back_contour[j], j, BACK);
      N3F_D (front_norm[j]);
      V3F_D (front_contour[j+1], j+1, FRONT);
      N3F_D (back_norm[j]);
      V3F_D (back_contour[j+1], j+1, BACK);
   }
   if (__TUBE_CLOSE_CONTOUR) {
      N3F_D (front_norm[ncp-1]);
      V3F_D (front_contour[ncp-1], ncp-1, FRONT);
      N3F_D (back_norm[ncp-1]);
      V3F_D (back_contour[ncp-1], ncp-1, BACK);
      N3F_D (front_norm[ncp-1]);
      V3F_D (front_contour[0], 0, FRONT);
      N3F_D (back_norm[ncp-1]);
      V3F_D (back_contour[0], 0, BACK);
   }
   ENDTMESH ();
}
void draw_binorm_segment_facet_n ( int ncp , double front_contour [ ] [ 3 ] , double back_contour [ ] [ 3 ] , double front_norm [ ] [ 3 ] , double back_norm [ ] [ 3 ] , int inext , double len ) { int j ; BGNTMESH ( inext , len ) ; for ( j = 0 ; j < ncp - 1 ; j ++ ) { N3F_D ( front_norm [ j ] ) ; V3F_D ( front_contour [ j ] , j , FRONT ) ; N3F_D ( back_norm [ j ] ) ; V3F_D ( back_contour [ j ] , j , BACK ) ; N3F_D ( front_norm [ j ] ) ; V3F_D ( front_contour [ j + 1 ] , j + 1 , FRONT ) ; N3F_D ( back_norm [ j ] ) ; V3F_D ( back_contour [ j + 1 ] , j + 1 , BACK ) ; } if ( __TUBE_CLOSE_CONTOUR ) { N3F_D ( front_norm [ ncp - 1 ] ) ; V3F_D ( front_contour [ ncp - 1 ] , ncp - 1 , FRONT ) ; N3F_D ( back_norm [ ncp - 1 ] ) ; V3F_D ( back_contour [ ncp - 1 ] , ncp - 1 , BACK ) ; N3F_D ( front_norm [ ncp - 1 ] ) ; V3F_D ( front_contour [ 0 ] , 0 , FRONT ) ; N3F_D ( back_norm [ ncp - 1 ] ) ; V3F_D ( back_contour [ 0 ] , 0 , BACK ) ; } ENDTMESH ( ) ; }
This routine draws a piece of the round segment with psuedo-facet
 normals.
This routine draws a piece of the round segment with psuedo - facet normals .
/* number of contour points */ /* draw the tube segment */ /* connect back up to first point of contour */