Useful Triangle Model Loading, Storing, and
Displaying routines
for use with OpenGL and triangle-based models
Kenny Hoff
last updated 2/12/97
now supports three versions and conversions between them
triangle "soups", shared-vertex, and shared-vertex w/ vertex
normals
Supporting 3D Vector class
Trimodel Class Definition and Implementation
File Formats
# of triangles
list of triangles (sets of 9 floats - 3 3D points - and a hex rgb color
value)
# of verts
list of verts (sets of 3 floats - 3D point)
# of tris
list of tris (sets of 3 ints - indices into vert array)
# of verts
list of verts (sets of 6 floats - 3D point and normal)
# of tris
list of tris (sets of 3 ints - indices into vert array)
Useful Endian Detection Routine