face.c
Go to the documentation of this file.
1 /* make the pointers among new edges on the new hyperplane */
2 
3 #include "arith.h"
4 
5 face(linetab,mi,m,r,n)
6 LINE linetab[MAXEDGE];
7 int mi,m,r,n;
8 {
9  register int i,j,k,l,count;
10  register unsigned int planework;
11 
12  /* check all combination of two new edges on hyperplane(i) */
13  for(i=mi; i<m; i++){
14  l=1;
15  for(j=mi; j<m; j++){
16  if(i != j){
17  planework= linetab[i].plane & linetab[j].plane;
18  count=0;
19  for(k=0; k<n; k++){
20  if((planework & (1<<k)) != 0)
21  count += 1;
22  }
23  /* when (r-2) hyperplanes are common, make face pointer */
24  if(count == (r-2)){
25  linetab[i].face[l]=j;
26  l += 1;
27  }
28  }
29  }
30  /* make a mark indicating there is no futher face pointer */
31  linetab[i].face[l]=EMPTY;
32  }
33 }
34 
#define EMPTY
Definition: arith.h:21
GLfloat n[6][3]
Definition: cube.c:15
#define MAXEDGE
Definition: arith.h:14
Definition: arith.h:33
long l
Definition: structsize.c:3
face(linetab, int mi, int m, int r, int n)
Definition: face.c:5
int count
Definition: thrtest.c:11


euslisp
Author(s): Toshihiro Matsui
autogenerated on Fri Feb 21 2020 03:20:54