Implements support for files. More...
Files | |
file | CFileAudioWAV.h |
Implements WAV audio file support. | |
file | CFileImageBMP.h |
Implements BMP image file support. | |
file | CFileImageGIF.h |
Implements GIF image file support. | |
file | CFileImageJPG.h |
Implements JPG image file support. | |
file | CFileImagePNG.h |
Implements PNG image file support. | |
file | CFileImagePPM.h |
Implements PPM image file support. | |
file | CFileImageRAW.h |
Implements RAW image file support. | |
file | CFileModel3DS.h |
Implements 3DS model file support. | |
file | CFileModelOBJ.h |
Implements OBJ model file support. | |
file | CFileModelSTL.h |
Implements STL model file support. | |
file | CFileXML.h |
Implements XML file support. | |
Classes | |
class | chai3d::cFileXML |
Functions | |
bool | chai3d::cLoadFileWAV (const std::string &a_filename, unsigned char *&a_data, int *a_size, int *a_frequency, bool *a_stereo, unsigned short *a_bitsPerSample) |
This function loads a WAV audio file. More... | |
bool | chai3d::cLoadFileBMP (cImage *a_image, const std::string &a_filename) |
This function loads a BMP image file. More... | |
bool | chai3d::cSaveFileBMP (cImage *a_image, const std::string &a_filename) |
This function saves a BMP image file. More... | |
bool | chai3d::cLoadFileGIF (cImage *a_image, const std::string &a_filename) |
This function loads a GIF image file. More... | |
bool | chai3d::cSaveFileGIF (cImage *a_image, const std::string &a_filename) |
This function saves a GIF image file. More... | |
bool | chai3d::cLoadFileJPG (cImage *a_image, const std::string &a_filename) |
This function loads a JPG image file. More... | |
bool | chai3d::cLoadJPG (cImage *a_image, const unsigned char *a_buffer, unsigned int a_len) |
This function loads a PNG image buffer. More... | |
bool | chai3d::cSaveFileJPG (cImage *a_image, const std::string &a_filename) |
This function saves a JPG image file. More... | |
bool | chai3d::cSaveJPG (cImage *a_image, unsigned char **a_buffer, unsigned int *a_len) |
This function saves a JPG image buffer. More... | |
bool | chai3d::cLoadFilePNG (cImage *a_image, const std::string &a_filename) |
This function loads a PNG image file. More... | |
bool | chai3d::cLoadPNG (cImage *a_image, const unsigned char *a_buffer, unsigned int a_len) |
This function loads a PNG image buffer. More... | |
bool | chai3d::cSaveFilePNG (cImage *a_image, const std::string &a_filename) |
This function saves a PNG image file. More... | |
bool | chai3d::cSavePNG (cImage *a_image, unsigned char **a_buffer, unsigned int *a_len) |
This function saves a PNG image buffer. More... | |
bool | chai3d::cLoadFilePPM (cImage *a_image, const std::string &a_filename) |
This function loads a PPM image file. More... | |
bool | chai3d::cSaveFilePPM (cImage *a_image, const std::string &a_filename) |
This function saves a PPM image file. More... | |
bool | chai3d::cLoadFileRAW (cImage *a_image, const std::string &a_filename) |
This function loads a RAW image file. More... | |
bool | chai3d::cSaveFileRAW (cImage *a_image, const std::string &a_filename) |
This function saves a RAW image file. More... | |
bool | chai3d::cLoadFile3DS (cMultiMesh *a_object, const std::string &a_filename) |
This function loads a 3DS model file. More... | |
bool | chai3d::cSaveFile3DS (cMultiMesh *a_object, const std::string &a_filename) |
This function saves a 3DS model file. More... | |
bool | chai3d::cLoadFileOBJ (cMultiMesh *a_object, const std::string &a_filename) |
This function loads an OBJ model file. More... | |
bool | chai3d::cSaveFileOBJ (cMultiMesh *a_object, const std::string &a_filename) |
This function saves an OBJ model file. More... | |
bool | chai3d::cLoadFileSTL (cMultiMesh *a_object, const std::string &a_filename) |
This function loads an STL model file. More... | |
bool | chai3d::cSaveFileSTL (cMultiMesh *a_object, const std::string &a_filename) |
This function saves an STL model file. More... | |
bool chai3d::cLoadFileWAV | ( | const std::string & | a_filename, |
unsigned char *& | a_data, | ||
int * | a_size, | ||
int * | a_frequency, | ||
bool * | a_stereo, | ||
unsigned short * | a_bitsPerSample | ||
) |
This function loads an audio WAV file into memory.
If the operation succeeds, then the functions returns true and the audio data is loaded into memory. The audio data, size, frequency and format are returned by argument.
If the operation fails, then the function returns false.
a_filename | Filename. |
a_data | Returned pointer to audio data. |
a_size | Returned number of samples contained in WAV file. |
a_frequency | Returned sample frequency of WAV file. |
a_stereo | Returns true if stereo, false otherwise. |
a_bitsPerSample | Returned number of bits per sample (8 or 16). |
bool chai3d::cLoadFileBMP | ( | cImage * | a_image, |
const std::string & | a_filename | ||
) |
This function loads a BMP image from a file into a cImage structure. If the operation succeeds, then the functions returns true and the image data is loaded into the image structure a_image. If the operation fails, then the function returns false.. In both cases, previous image information stored in a_image is erased.
a_image | Image structure. |
a_filename | Filename. |
bool chai3d::cSaveFileBMP | ( | cImage * | a_image, |
const std::string & | a_filename | ||
) |
This function saves a BMP image from a cImage structure to a file.
If the operation succeeds, then the functions returns true and the image data is saved to a file.
If the operation fails, then the function returns false.
a_image | Image structure. |
a_filename | Filename. |
bool chai3d::cLoadFileGIF | ( | cImage * | a_image, |
const std::string & | a_filename | ||
) |
This function loads a GIF image from a file into a cImage structure.
If the operation succeeds, then the functions returns true and the image data is loaded into image structure a_image.
If the operation fails, then the function returns false.
In both cases, previous image information stored in a_image is erased.
a_image | Image structure. |
a_filename | Filename. |
bool chai3d::cSaveFileGIF | ( | cImage * | a_image, |
const std::string & | a_filename | ||
) |
This function saves a GIF image from a cImage structure to a file.
If the operation succeeds, then the functions returns true and the image data is saved to a file.
If the operation fails, then the function returns false.
a_image | Image structure. |
a_filename | Filename. |
bool chai3d::cLoadFileJPG | ( | cImage * | a_image, |
const std::string & | a_filename | ||
) |
This function loads a JPG image from a file into a cImage structure.
If the operation succeeds, then the functions returns true and the image data is loaded into image structure a_image.n If the operation fails, then the function returns false.
In both cases, previous image information stored in a_image is erased.
a_image | Image structure. |
a_filename | Filename. |
bool chai3d::cLoadJPG | ( | cImage * | a_image, |
const unsigned char * | a_buffer, | ||
unsigned int | a_len | ||
) |
This function loads a JPG image from a memory buffer into a cImage structure.
If the operation succeeds, then the functions returns true and the image data is loaded into image structure a_image.
If the operation fails, then the function returns false.
In both cases, previous image information stored in a_image is erased.
a_image | Image structure. |
a_buffer | Memory buffer containing JPG data. |
a_len | Buffer size in bytes. |
bool chai3d::cSaveFileJPG | ( | cImage * | a_image, |
const std::string & | a_filename | ||
) |
This function saves a JPG image from a cImage structure to a file.
If the operation succeeds, then the functions returns true and the image data is saved to a file.
If the operation fails, then the function returns false.
a_image | Image structure. |
a_filename | Filename. |
bool chai3d::cSaveJPG | ( | cImage * | a_image, |
unsigned char ** | a_buffer, | ||
unsigned int * | a_len | ||
) |
This function saves a JPG image from a cImage structure to a memory buffer.
If the operation succeeds, then the functions returns true and the image data is saved to a file.
If the operation fails, then the function returns false.
a_image | Image structure. |
a_buffer | Returned memory buffer where JPG data is stored. |
a_len | Returned buffer size in bytes. |
bool chai3d::cLoadFilePNG | ( | cImage * | a_image, |
const std::string & | a_filename | ||
) |
This function loads a PNG image from a file into a cImage structure. If the operation succeeds, then the functions returns true and the image data is loaded into image structure a_image. If the operation fails, then the function returns false. In both cases, previous image information stored in a_image is erased.
a_image | Image structure. |
a_filename | Filename. |
bool chai3d::cLoadPNG | ( | cImage * | a_image, |
const unsigned char * | a_buffer, | ||
unsigned int | a_len | ||
) |
This function loads a PNG image from a memory buffer into a cImage structure.
If the operation succeeds, then the functions returns true and the image data is loaded into image structure a_image.
If the operation fails, then the function returns false. In both cases, previous image information stored in a_image is erased.
a_image | Image structure. |
a_buffer | Memory buffer containing PNG data. |
a_len | Buffer size in bytes. |
bool chai3d::cSaveFilePNG | ( | cImage * | a_image, |
const std::string & | a_filename | ||
) |
This function saves a PNG image from a cImage structure to a file.
If the operation succeeds, then the functions returns true and the image data is saved to a file.
If the operation fails, then the function returns false.
a_image | Image structure. |
a_filename | Filename. |
bool chai3d::cSavePNG | ( | cImage * | a_image, |
unsigned char ** | a_buffer, | ||
unsigned int * | a_len | ||
) |
This function saves a PNG image from a cImage structure to a memory buffer.
If the operation succeeds, then the functions returns true and the image data is saved to a file.
If the operation fails, then the function returns false.
a_image | Image structure. |
a_buffer | Returned memory buffer where PNG data is stored. |
a_len | Returned buffer size in bytes. |
bool chai3d::cLoadFilePPM | ( | cImage * | a_image, |
const std::string & | a_filename | ||
) |
This function loads a PPM image from a file into a cImage structure. If the operation succeeds, then the functions returns true and the image data is loaded into image structure a_image. If the operation fails, then the function returns false. In both cases, previous image information stored in a_image is erased.
a_image | Image structure. |
a_filename | Filename. |
bool chai3d::cSaveFilePPM | ( | cImage * | a_image, |
const std::string & | a_filename | ||
) |
This function saves a BMP image from a cImage structure to a file. If the operation succeeds, then the functions returns true and the image data is saved to a file. If the operation fails, then the function returns false.
a_image | Image structure. |
a_filename | Filename. |
bool chai3d::cLoadFileRAW | ( | cImage * | a_image, |
const std::string & | a_filename | ||
) |
This function loads a RAW image from a file into a cImage structure. If the operation succeeds, then the functions returns true and the image data is loaded into image structure a_image. If the operation fails, then the function returns false. In both cases, previous image information stored in a_image is erased.
a_image | Image structure. |
a_filename | Filename. |
bool chai3d::cSaveFileRAW | ( | cImage * | a_image, |
const std::string & | a_filename | ||
) |
This function saves a RAW image from a cImage structure to a file. If the operation succeeds, then the functions returns true and the image data is saved to a file. If the operation fails, then the function returns false.
a_image | Image structure. |
a_filename | Filename. |
bool chai3d::cLoadFile3DS | ( | cMultiMesh * | a_object, |
const std::string & | a_filename | ||
) |
This function loads a 3DS 3D model from a file into a cMultiMesh structure. If the operation succeeds, then the functions returns true and the 3D model is loaded into cMultiMesh. If the operation fails, then the function returns false.
a_object | Multimesh object. |
a_filename | Filename. |
bool chai3d::cSaveFile3DS | ( | cMultiMesh * | a_object, |
const std::string & | a_filename | ||
) |
This function saves a 3DS 3D model from a cMultiMesh object to a file. If the operation succeeds, then the functions returns true and the model data is saved to a file. If the operation fails, then the function returns false.
a_object | Multimesh object. |
a_filename | Filename. |
bool chai3d::cLoadFileOBJ | ( | cMultiMesh * | a_object, |
const std::string & | a_filename | ||
) |
This function loads an OBJ 3D model from a file into a cMultiMesh structure. If the operation succeeds, then the functions returns true and the 3D model is loaded into cMultiMesh. If the operation fails, then the function returns false.
a_object | Multimesh object. |
a_filename | Filename. |
bool chai3d::cSaveFileOBJ | ( | cMultiMesh * | a_object, |
const std::string & | a_filename | ||
) |
This function saves an OBJ 3D model from a cMultiMesh object to a file. If the operation succeeds, then the functions returns true and the model data is saved to a file. If the operation fails, then the function returns false.
a_object | Multimesh object. |
a_filename | Filename. |
bool chai3d::cLoadFileSTL | ( | cMultiMesh * | a_object, |
const std::string & | a_filename | ||
) |
This function loads an STL (binary format) 3D model from a file into a cMultiMesh structure. If the operation succeeds, then the functions returns true and the 3D model is loaded into cMultiMesh as a single mesh. If the operation fails, then the function returns false.
a_object | Multimesh object. |
a_filename | Filename. |
bool chai3d::cSaveFileSTL | ( | cMultiMesh * | a_object, |
const std::string & | a_filename | ||
) |
This function saves an STL (binary format) 3D model from a cMultiMesh object to a file. If the operation succeeds, then the functions returns true and the model data is saved to a file. If the operation fails, then the function returns false.
a_object | Multimesh object. |
a_filename | Filename. |