Functions | |
GLboolean | cluWriteQuaternion (const CLUquaternion *src, FILE *file) |
GLboolean | cluWritePlane (const CLUplane *src, FILE *file) |
GLboolean | cluWriteSphere (const CLUsphere *src, FILE *file) |
GLboolean | cluWriteCone (const CLUcone *src, FILE *file) |
GLboolean | cluWriteRay (const CLUray *src, FILE *file) |
GLboolean | cluWriteAlignedBox (const CLUalignedbox *src, FILE *file) |
GLboolean cluWrite[Name](const CLU[name]* src, FILE* file)
write CLU structs to files. These functions are similar to the standard "fwrite" function. However, there are a few important differences. The fwrite function returns a size_t indicating the number of elements written. 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 write 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 written; GL_FALSE is returned.