Output more digits after the decimal place.
This commit is contained in:
parent
f0a9195cec
commit
e49deb790e
2 changed files with 15 additions and 9 deletions
15
FixObj/obj.c
15
FixObj/obj.c
|
@ -159,7 +159,7 @@ void dump_global_bounds( void ) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(out, "gb %.4f %.4f %.4f %.2f\n", refx, refy, refz, radius);
|
fprintf(out, "gb %.5f %.5f %.5f %.2f\n", refx, refy, refz, radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ void dump_nodes( void ) {
|
||||||
|
|
||||||
fprintf(out, "\n");
|
fprintf(out, "\n");
|
||||||
for ( i = 1; i < ncount; i++ ) {
|
for ( i = 1; i < ncount; i++ ) {
|
||||||
fprintf(out, "v %.4f %.4f %.4f\n",
|
fprintf(out, "v %.5f %.5f %.5f\n",
|
||||||
nodes[i][0] - refx, nodes[i][1] - refy, nodes[i][2] - refz);
|
nodes[i][0] - refx, nodes[i][1] - refy, nodes[i][2] - refz);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -181,7 +181,7 @@ void dump_normals( void ) {
|
||||||
|
|
||||||
fprintf(out, "\n");
|
fprintf(out, "\n");
|
||||||
for ( i = 1; i < vncount; i++ ) {
|
for ( i = 1; i < vncount; i++ ) {
|
||||||
fprintf(out, "vn %.4f %.4f %.4f\n",
|
fprintf(out, "vn %.5f %.5f %.5f\n",
|
||||||
normals[i][0], normals[i][1], normals[i][2]);
|
normals[i][0], normals[i][1], normals[i][2]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -477,10 +477,13 @@ void obj_fix(char *infile, char *outfile) {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.13 1998/05/20 20:55:19 curt
|
/* Revision 1.14 1998/05/23 15:19:49 curt
|
||||||
/* Fixed arbitrary polygon winding problem here so all tristrips are passed
|
/* Output more digits after the decimal place.
|
||||||
/* to runtime simulator with a consistant counter clockwise winding.
|
|
||||||
/*
|
/*
|
||||||
|
* Revision 1.13 1998/05/20 20:55:19 curt
|
||||||
|
* Fixed arbitrary polygon winding problem here so all tristrips are passed
|
||||||
|
* to runtime simulator with a consistant counter clockwise winding.
|
||||||
|
*
|
||||||
* Revision 1.12 1998/05/16 13:11:26 curt
|
* Revision 1.12 1998/05/16 13:11:26 curt
|
||||||
* Fixed an off by one error in node, normal, and face counters.
|
* Fixed an off by one error in node, normal, and face counters.
|
||||||
*
|
*
|
||||||
|
|
|
@ -517,7 +517,7 @@ void dump_obj(char *basename) {
|
||||||
/* dump vertices */
|
/* dump vertices */
|
||||||
printf(" writing vertices\n");
|
printf(" writing vertices\n");
|
||||||
for ( i = 1; i <= nodecount; i++ ) {
|
for ( i = 1; i <= nodecount; i++ ) {
|
||||||
fprintf(obj, "v %.2f %.2f %.2f\n",
|
fprintf(obj, "v %.6f %.6f %.6f\n",
|
||||||
nodes[i].x, nodes[i].y, nodes[i].z);
|
nodes[i].x, nodes[i].y, nodes[i].z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -644,9 +644,12 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.15 1998/05/02 01:54:39 curt
|
/* Revision 1.16 1998/05/23 15:20:41 curt
|
||||||
/* Converting to polar3d.h routines.
|
/* Output more digits after the decimal place.
|
||||||
/*
|
/*
|
||||||
|
* Revision 1.15 1998/05/02 01:54:39 curt
|
||||||
|
* Converting to polar3d.h routines.
|
||||||
|
*
|
||||||
* Revision 1.14 1998/04/18 04:01:32 curt
|
* Revision 1.14 1998/04/18 04:01:32 curt
|
||||||
* Now use libMath rather than having local copies of math routines.
|
* Now use libMath rather than having local copies of math routines.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue