Upload
This commit is contained in:
commit
43352ff262
1291 changed files with 220976 additions and 0 deletions
26
DOTS/FACE.C
Normal file
26
DOTS/FACE.C
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#include <stdio.h>
|
||||
|
||||
char buf[1024];
|
||||
|
||||
main()
|
||||
{
|
||||
FILE *f1;
|
||||
int a,b,c=0;
|
||||
float x,y,z;
|
||||
f1=fopen("face.asc","rt");
|
||||
while(!feof(f1))
|
||||
{
|
||||
fgets(buf,1024,f1);
|
||||
fgets(buf,1024,f1);
|
||||
if(!memcmp(buf,"Vertex ",7))
|
||||
{
|
||||
if(c)
|
||||
{
|
||||
sscanf(buf,"Vertex %i: X: %f Y: %f Z: %f",&a,&x,&y,&z);
|
||||
printf("dw %i,%i,%i\n",(int)(x*1000),-(int)(z*1000),(int)(y*1000));
|
||||
}
|
||||
else c=1;
|
||||
}
|
||||
}
|
||||
fclose(f1);
|
||||
}
|
||||
Loading…
Reference in a new issue