![]() |
Public API Reference |
![]() |
Representation of a convertor from COLLADA files to Crystal Space files. More...
#include <ivaria/collada.h>
Public Member Functions | |
virtual const char * | Convert ()=0 |
Converts the loaded COLLADA file into the loaded Crystal Space file. | |
virtual bool | ConvertEffects ()=0 |
Converts the effects (COLLADA FX) section of the COLLADA file. | |
virtual bool | ConvertGeometry (iDocumentNode *geometrySection)=0 |
Converts the geometry section of the COLLADA file. | |
virtual bool | ConvertPhysics (iDocumentNode *physicsSection)=0 |
Converts the physics section of the COLLADA file. | |
virtual bool | ConvertRiggingAnimation (iDocumentNode *riggingSection)=0 |
Converts the rigging and animation sections of the COLLADA file. | |
virtual bool | ConvertScene (iDocumentNode *camerasSection, iDocumentNode *lightsSection, iDocumentNode *visualScenesSection)=0 |
Converts the scene section of the COLLADA file. | |
virtual csRef< iDocument > | GetColladaDocument ()=0 |
Returns the Collada Document. | |
virtual csRef< iDocument > | GetCrystalDocument ()=0 |
Returns the Crystal Space Document. | |
virtual const char * | Load (const char *str)=0 |
Load a COLLADA file from a null-terminated C-string into the COLLADA Conversion System. | |
virtual const char * | Load (iString *str)=0 |
Load a COLLADA file from an iString object into the COLLADA Conversion System. | |
virtual const char * | Load (iFile *file)=0 |
Load a COLLADA file from an iFile object into the COLLADA Conversion System. | |
virtual const char * | Load (iDataBuffer *db)=0 |
Load a COLLADA file from an iDataBuffer object into the COLLADA Conversion System. | |
virtual const char * | SetOutputFiletype (csColladaFileType filetype)=0 |
Sets the Crystal Space output file type. | |
virtual void | SetSectorScene (bool toggle)=0 |
Set if each scene is an entire sector. | |
virtual void | SetWarnings (bool toggle=false)=0 |
Turn debugging warnings on or off. | |
virtual const char * | Write (const char *filepath)=0 |
Writes the converted Crystal Space file out to disk. |
Representation of a convertor from COLLADA files to Crystal Space files.
Main creators of instances implementing this interface:
Main ways to get pointers to this interface:
virtual const char* iColladaConvertor::Convert | ( | ) | [pure virtual] |
Converts the loaded COLLADA file into the loaded Crystal Space file.
This function will completely convert a loaded COLLADA file into Crystal Space format. It is required that both a COLLADA file must be loaded, and that a Crystal Space document must be ready. It will convert to the document type specified when the Crystal Space document was loaded.
This function essentially calls all of the other convert functions and then finalizes the iDocument so it can be completely written out to a file.
virtual bool iColladaConvertor::ConvertEffects | ( | ) | [pure virtual] |
Converts the effects (COLLADA FX) section of the COLLADA file.
This converts the COLLADA FX portion of the COLLADA file to Crystal Space format. Specifically, it converts the <library_images> elements to textures and all <effect> elements to Crystal Space materials and shaders. Currently, only <profile_COMMON> is supported, but support for <profile_GLSL> and <profile_CG> are coming.
virtual bool iColladaConvertor::ConvertGeometry | ( | iDocumentNode * | geometrySection | ) | [pure virtual] |
Converts the geometry section of the COLLADA file.
This converts the <mesh> elements of a COLLADA file to Crystal Space format. The function will update the internal Crystal Space document, which can then be used to write out to a file.
geometrySection | A pointer to the <library_geometries> element, in the COLLADA document. |
virtual bool iColladaConvertor::ConvertPhysics | ( | iDocumentNode * | physicsSection | ) | [pure virtual] |
Converts the physics section of the COLLADA file.
virtual bool iColladaConvertor::ConvertRiggingAnimation | ( | iDocumentNode * | riggingSection | ) | [pure virtual] |
Converts the rigging and animation sections of the COLLADA file.
virtual bool iColladaConvertor::ConvertScene | ( | iDocumentNode * | camerasSection, |
iDocumentNode * | lightsSection, | ||
iDocumentNode * | visualScenesSection | ||
) | [pure virtual] |
Converts the scene section of the COLLADA file.
This function converts the <library_cameras>, <library_lights>, <library_nodes>, and <library_visual_scenes> sections of the COLLADA document. Note that unlike the other conversion functions, this function requires multiple arguments to be passed for conversion - one for each of these library elements.
camerasSection | A pointer to the iDocumentNode representing the <library_cameras> element of the COLLADA document. |
lightsSection | A pointer to the iDocumentNode representing the <library_lights> element of the COLLADA document. |
nodesSection | A pointer to the iDocumentNode representing the <library_nodes> element of the COLLADA document. |
visualScenesSection | A pointer to the iDocumentNode representing the <library_visual_scenes> element of the COLLADA document. |
virtual csRef<iDocument> iColladaConvertor::GetColladaDocument | ( | ) | [pure virtual] |
Returns the Collada Document.
virtual csRef<iDocument> iColladaConvertor::GetCrystalDocument | ( | ) | [pure virtual] |
Returns the Crystal Space Document.
virtual const char* iColladaConvertor::Load | ( | const char * | str | ) | [pure virtual] |
Load a COLLADA file from a null-terminated C-string into the COLLADA Conversion System.
str | A string containing the location of the file to be loaded in VFS |
virtual const char* iColladaConvertor::Load | ( | iString * | str | ) | [pure virtual] |
virtual const char* iColladaConvertor::Load | ( | iFile * | file | ) | [pure virtual] |
Load a COLLADA file from an iFile object into the COLLADA Conversion System.
file | An iFile object which points to the document to be loaded |
virtual const char* iColladaConvertor::Load | ( | iDataBuffer * | db | ) | [pure virtual] |
Load a COLLADA file from an iDataBuffer object into the COLLADA Conversion System.
db | An iDataBuffer object which contains a document to be loaded |
virtual const char* iColladaConvertor::SetOutputFiletype | ( | csColladaFileType | filetype | ) | [pure virtual] |
Sets the Crystal Space output file type.
This function is designed to tell the COLLADA Conversion System what type of file will be written to.
filetype | The type of file to be written out. Will be one of:
|
virtual void iColladaConvertor::SetSectorScene | ( | bool | toggle | ) | [pure virtual] |
Set if each scene is an entire sector.
Else the top level objects in each scene are considered a sector.
toggle | If true, each scene is considered a sector. |
virtual void iColladaConvertor::SetWarnings | ( | bool | toggle = false | ) | [pure virtual] |
Turn debugging warnings on or off.
This will turn on all possible debug information for the plugin. It also will check to verify that files and data structures conform to specified standards.
toggle | If true, turns on debug warnings. |
Debug warnings are off by default. There is a lot of information given by turning debugging warnings on. It is suggested that it it remains off unless there appears to be a problem with the plugin.
virtual const char* iColladaConvertor::Write | ( | const char * | filepath | ) | [pure virtual] |
Writes the converted Crystal Space file out to disk.
This is used to write the Crystal Space file out to disk, once a conversion process has been completed.
filepath | The path in VFS where the file should be written to |