cluRead functions
[Standard functions]

Standard functions to read CLU structs from a file in binary. More...

Functions

GLboolean cluReadQuaternion (CLUquaternion *dest, FILE *file)
GLboolean cluReadPlane (CLUplane *dest, FILE *file)
GLboolean cluReadSphere (CLUsphere *dest, FILE *file)
GLboolean cluReadCone (CLUcone *dest, FILE *file)
GLboolean cluReadRay (CLUray *dest, FILE *file)
GLboolean cluReadAlignedBox (CLUalignedbox *dest, FILE *file)

Detailed Description

Functions of the form:

  GLboolean cluRead[Name](const CLU[name]* src, FILE* file)
  

reads CLU structs from files. These functions are similar to the standard "fread" function. However, there are a few important differences. The fread function returns a size_t indicating the number of elements read. This makes sense for fixed size structs, but many CLU structs may contain variable length arrays. Thus, a size_t return value would have little meaning since the size of the CLU struct instance may be unknown. Therefore, these methods check the size_t values for each read and return a GLboolean at the end; a GL_TRUE if all attempts where successful, or a GL_FALSE otherwise. The user then can use the "feof" and "ferror" functions to determine the problem. NULL pointers cannot be read; GL_FALSE is returned.


Generated on Thu Dec 27 13:53:42 2007 for CLU by  doxygen 1.4.6