I am writing a 3D graphics program to read and display *.stl files. These are stereo lithography files generated by 3DMax. Any idea how to do that?
This file format consists of data as in following format:
*********************************************
solid Object01
facet normal -9.999635e-001 -7.604078e-008 -8.545205e-003
outer loop
vertex 1.033284e+001 2.616666e+002 1.262733e+002
vertex 1.018371e+001 3.096116e+002 1.437232e+002
vertex 1.033283e+001 3.126886e+002 1.262733e+002
endloop
endfacet
facet normal -9.999635e-001 -9.204930e-008 -8.545161e-003
outer loop
vertex 1.03328....
**********************************************
1>What data type do i read the coordinate values into?
I have tried the floating point data type but it gives a floating point format not linked error. (I tried to read the values into a structure POINT with 3 floating point variables to store x,y and z values.)
2>How do i convert the coordinate values to those that could be outputted by the