glut/lib/gle/segment.c
/* ============================================================ */
/* ============================================================ */
/* 
 * This routine draws a segment with normals specified at each end.
 */
This routine draws a segment with normals specified at each end.
This routine draws a segment with normals specified at each end .
void draw_binorm_segment_edge_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; 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);
   }
   if (__TUBE_CLOSE_CONTOUR) {
      N3F_D (front_norm[0]);
      V3F_D (front_contour[0], 0, FRONT);
      N3F_D (back_norm[0]);
      V3F_D (back_contour[0], 0, BACK);
   }
   ENDTMESH ();
}
void draw_binorm_segment_edge_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 ; 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 ) ; } if ( __TUBE_CLOSE_CONTOUR ) { N3F_D ( front_norm [ 0 ] ) ; V3F_D ( front_contour [ 0 ] , 0 , FRONT ) ; N3F_D ( back_norm [ 0 ] ) ; V3F_D ( back_contour [ 0 ] , 0 , BACK ) ; } ENDTMESH ( ) ; }
/* number of contour points */ /* draw the tube segment */ /* connect back up to first point of contour */