contrib
contact
clib
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
face
face(linetab, int mi, int m, int r, int n)
Definition:
face.c:5
l
long l
Definition:
structsize.c:3
arith.h
line::face
int face[MAXRANK]
Definition:
arith.h:37
line::plane
unsigned int plane
Definition:
arith.h:38
MAXEDGE
#define MAXEDGE
Definition:
arith.h:14
line
Definition:
arith.h:33
count
int count
Definition:
thrtest.c:11
EMPTY
#define EMPTY
Definition:
arith.h:21
n
GLfloat n[6][3]
Definition:
cube.c:15
euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Jun 15 2023 02:06:43