CSLScene Class Reference
#include <Scene.h>
Inheritance diagram for CSLScene:
List of all members.
|
|
Public Member Functions
|
| SI_Error |
Open (SI_Char *in_szFileName) |
| SI_Error |
Open (SI_Char *in_szFileName, SI_READ_CALLBACK_FNC in_pFunc) |
| SI_Error |
Create (SI_Char *in_szFileName, SI_Int in_nVersionMajor, SI_Int in_nVersionMinor, SI_Int in_nFormat=FORMAT_TEXT) |
| SI_Error |
Create (SI_Int in_nVersionMajor, SI_Int in_nVersionMinor, SI_Int in_nFormat=FORMAT_TEXT) |
| SI_Error |
Open (CXSIParser *in_parser) |
| SI_Error |
Read () |
| virtual SI_Error |
Write () |
| virtual SI_Error |
Write (SI_Char *in_szFileName) |
| SI_Error |
Close () |
| CSLModel * |
FindModel (SI_Char *in_szModelName) |
| CSLModel * |
FindModelRecursively (SI_Char *in_szModelName, CSLModel *in_pModel) |
| CSLAnimatableType * |
FindParameter (SI_Char *in_szParameterName) |
| SI_Error |
GetValue (SI_Char *in_szParameterName, SI_Float *out_pfValue) |
| SI_Error |
SetValue (SI_Char *in_szParameterName, SI_Float in_fValue) |
| CSLAmbience * |
Ambience () |
| CSLAmbience * |
CreateAmbience () |
| SI_Error |
DestroyAmbience () |
| CSLCoordinateSystem * |
CoordinateSystem () |
| CSLEnvelopeList * |
EnvelopeList () |
| CSLFog * |
Fog () |
| CSLMaterialLibrary * |
GetMaterialLibrary () |
| CSLModel * |
Root () |
| CXSIParser * |
Parser () |
| CSLAngle * |
Angle () |
| CSLFileInfo * |
FileInfo () |
| CSLSceneInfo * |
SceneInfo () |
| CSLLogger * |
Logger () |
| CSIBCString & |
FileName () |
| CSLImageLibrary * |
GetImageLibrary () |
| SI_Error |
DestroyFog () |
| CSLFog * |
CreateFog () |
| SI_Error |
DestroyEnvelopeList () |
| virtual CSLEnvelopeList * |
CreateEnvelopeList () |
| virtual CSLImageLibrary * |
CreateImageLibrary () |
| SI_Error |
DestroyImageLibrary () |
| virtual CSLMaterialLibrary * |
ConnectMaterialLibrary (CSLMaterialLibrary *in_pNewMaterialLibrary) |
| CSLAngle * |
ConnectAngle (CSLAngle *in_pNewAngle) |
| CSLFileInfo * |
ConnectFileInfo (CSLFileInfo *in_pNewFileInfo) |
| CSLSceneInfo * |
ConnectSceneInfo (CSLSceneInfo *in_pToConnect) |
| CSLFog * |
ConnectFog (CSLFog *in_pNewFog) |
| CSLAmbience * |
ConnectAmbience (CSLAmbience *in_pNewAmbience) |
| CSLCoordinateSystem * |
ConnectCoordinateSystem (CSLCoordinateSystem *in_pNewCoordSystem) |
| CSLEnvelopeList * |
ConnectEnvelopeList (CSLEnvelopeList *in_pNewEnvList) |
| CSLImageLibrary * |
ConnectImageLibrary (CSLImageLibrary *in_pImageLibrary) |
| SI_Error |
RegisterCallback (SI_Char *in_pName, SLTemplateCallback *in_pTemplateCallback) |
| SI_Error |
UnregisterCallback (SI_Char *in_pName) |
| SI_Error |
UnregisterAllCallbacks () |
| SLTemplateCallback * |
Callback (SI_Char *in_pName) |
| SI_Bool |
SupportsTemplates (SI_Int in_nMajor, SI_Int in_nMinor) |
| SI_Void |
SetWarningCallback (SI_WARNING_CALLBACK_FNC in_pfncCallback) |
| SI_Void |
SetReadCallback (SI_READ_CALLBACK_FNC in_pfncCallback) |
| SI_Error |
GetRefCount (CSLTemplate **in_ppObjects, SI_Int **out_ppRefCounts, SI_Int in_iObjectCount, CSLTemplate::ETemplateType in_eType) |
Detailed Description
CSLScene Class
This is the top level object for a dotXSI abstraction using the SemanticLayer. From this class, you can access all the models, primitives, material etc. contained in the dotXSI.
Member Function Documentation
| SI_Error Open |
( |
SI_Char * |
in_szFileName |
) |
|
Open a dotXSI file for reading and writing. The file must exist for the function to succeed.
- Parameters:
-
- Returns:
- SI_Error Error code.
| SI_Error Open |
( |
SI_Char * |
in_szFileName, |
|
|
|
SI_READ_CALLBACK_FNC |
in_pFunc |
|
|
|
) |
|
|
|
Open a dotXSI file for reading and writing. The file must exist for the function to succeed.
- Parameters:
-
|
|
SI_Char* |
File to open. |
|
|
SI_READ_CALLBACK_FNC |
read callback |
- Returns:
- SI_Error Error code.
| SI_Error Create |
( |
SI_Char * |
in_szFileName, |
|
|
|
SI_Int |
in_nVersionMajor, |
|
|
|
SI_Int |
in_nVersionMinor, |
|
|
|
SI_Int |
in_nFormat = FORMAT_TEXT |
|
|
|
) |
|
|
|
Create a new dotXSI file.
- Parameters:
-
|
|
SI_Char* |
File to create. |
|
|
SI_Int |
Major version of the file. |
|
|
SI_Int |
Minor version of the file. |
|
|
SI_Int |
Format of the file (text or binary) for dotXSI |
- Returns:
- SI_Error Error code.
| SI_Error Create |
( |
SI_Int |
in_nVersionMajor, |
|
|
|
SI_Int |
in_nVersionMinor, |
|
|
|
SI_Int |
in_nFormat = FORMAT_TEXT |
|
|
|
) |
|
|
|
Create a new dotXSI file.
- Parameters:
-
|
|
SI_Int |
Major version of the file. |
|
|
SI_Int |
Minor version of the file. |
|
|
SI_Int |
Format of the file (text or binary) for dotXSI |
- Returns:
- SI_Error Error code.
Create a new dotXSI file.
- Parameters:
-
- Returns:
- SI_Error Error code.
Populate the semantic layer with data present in the file.
- Returns:
- SI_Error Error code.
Write a dotXSI file containing the data present in the semantic layer.
- Returns:
- SI_Error Error code.
Reimplemented in CSLCOLLADAScene.
| virtual SI_Error Write |
( |
SI_Char * |
in_szFileName |
) |
[virtual] |
Write a dotXSI file containing the data present in the semantic layer.
- Parameters:
-
- Returns:
- SI_Error Error code.
Reimplemented in CSLCOLLADAScene.
Close the opened/created file.
- Returns:
- SI_Error Error code.
| CSLModel* FindModel |
( |
SI_Char * |
in_szModelName |
) |
|
Find a SI_Model by name
- Parameters:
-
|
|
SI_Char* |
The model's name |
- Returns:
- CSLModel* The model, or NULL if not found.
| CSLModel* FindModelRecursively |
( |
SI_Char * |
in_szModelName, |
|
|
|
CSLModel * |
in_pModel |
|
|
|
) |
|
|
|
Find a SI_Model, recursively.
- Parameters:
-
|
|
SI_Char* |
The model's name |
|
|
CSLModel* |
A Pointer to a CSLModel |
- Returns:
- CSLModel* The model, or NULL if not found.
Find a parameter by name.
- Parameters:
-
|
|
SI_Char* |
The XSI path to the parameter (see below) |
- Returns:
- CSLAnimatableParameter* The parameter.
- Note:
- When we say "the XSI path to a parameter", we mean the scripting name for the parameter. For example "MyModel.kine.local.posx" would refer to the X component of the position in the model "MyModel" transformation matrix.
| SI_Error GetValue |
( |
SI_Char * |
in_szParameterName, |
|
|
|
SI_Float * |
out_pfValue |
|
|
|
) |
|
|
|
Gets a parameter value.
- Parameters:
-
|
|
SI_Char* |
The XSI path to the parameter (see below) |
|
|
SI_Float* |
The parameter's value |
- Returns:
- SI_Error Error code
| SI_Error SetValue |
( |
SI_Char * |
in_szParameterName, |
|
|
|
SI_Float |
in_fValue |
|
|
|
) |
|
|
|
Sets a parameter value.
- Parameters:
-
|
|
SI_Char* |
The XSI path to the parameter (see below) |
|
|
SI_Float |
The parameter's new value |
- Returns:
- SI_Error Error code
Gets the ambience object.
- Returns:
- CSLAmbience* The ambience object
Creation of Ambience
- Returns:
- CSLAmbience*
Removes the Ambience object
- Returns:
- SI_Error Error code
Gets the coordinatesystem object
- Returns:
- CSLCoordinateSystem* The CoordinateSystem object
Gets the EnvelopeList object
- Returns:
- CSLEnvelopeList* The EnvelopeList object
Gets the Fog object
- Returns:
- CSLFog* The Fog object
Gets the MaterialLibrary object
- Returns:
- CSLMaterialLibrary* The MaterialLibrary object
Gets the Root Model
- Returns:
- CSLModel* The Root Model
Gets the CXSIParser object
- Returns:
- CXSIParser* the CXSIParser object
Gets the Angle object
- Returns:
- CSLAngle* The Angle object
Gets the FileInfo object
- Returns:
- CSLFileInfo* The FileInfo object
Gets the SceneInfo object
- Returns:
- CSLSceneInfo* The SceneInfo object
Gets the Logger object
- Returns:
- CSLLogger* The Logger object
Gets the filename for the current scene
- Returns:
- CSIBCString& The filename
Get the image library
- Returns:
- CSLImageLibrary Pointer to the image library or null if there's none
Removes the Fog object
- Returns:
- SI_Error Error code
Creation of Fog
- Returns:
- CSLFog*
Removes the EnvelopeList object
- Returns:
- SI_Error Error code
Creation of envelope list
- Returns:
- CSLEnvelopeList*
Reimplemented in CSLCOLLADAScene.
Creation of an Image Library
- Returns:
- CSLImageLibrary*
- Note:
- Introduced in 3.6
Reimplemented in CSLCOLLADAScene.
Removal of the Image Library
- Returns:
- Error code
- Note:
- Introduced in 3.6
Connect an existing CSLMaterialLibrary object to the scene
- Parameters:
-
- Returns:
- CSLMaterialLibrary* The old CSLMaterialLibrary
Connect an existing CSLAngle object to the scene
- Parameters:
-
- Returns:
- CSLAngle* The old CSLAngle
Connect an existing CSLFileInfo object to the scene
- Parameters:
-
- Returns:
- CSLFileInfo* The old CSLFileInfo
Connect an existing CSLSceneInfo object to the scene
- Parameters:
-
- Returns:
- CSLSceneInfo* The old CSLSceneInfo
Connect an existing CSLFog object to the scene
- Parameters:
-
- Returns:
- CSLFog* The old CSLFog
Connect an existing CSLAmbience object to the scene
- Parameters:
-
- Returns:
- CSLAmbience* The old CSLAmbience
Connect an existing CSLCoordinateSystem object to the scene
- Parameters:
-
- Returns:
- CSLCoordinateSystem* The old CSLCoordinateSystem
Connect an existing CSLEnvelopeList object to the scene
- Parameters:
-
- Returns:
- CSLEnvelopeList* The old CSLEnvelopeList
Connect Image library
- Parameters:
-
|
|
in_pImageLibrary |
Pointer to the pre-allocated image library to connect |
- Returns:
- Pointer to the newly connected image library or null if there's already an image library or if the parser does not support 3.6 templates
- Note:
- The parser must support 3.6 templates in order to connect an image library
Register a new template callback
- Parameters:
-
- Returns:
- SI_Error Error code
Example - Adding a new template callback
| SI_Error UnregisterCallback |
( |
SI_Char * |
in_pName |
) |
|
Unregister a template callback
- Parameters:
-
|
|
SI_Char* |
The template name |
- Returns:
- SI_Error Error code
Unregister all template callback
- Returns:
- SI_Error Error code
Get a callback by name
- Parameters:
-
- Returns:
- SLTemplateCallback* Pointer to a callback struct
| SI_Bool SupportsTemplates |
( |
SI_Int |
in_nMajor, |
|
|
|
SI_Int |
in_nMinor |
|
|
|
) |
|
|
|
Checks if the parser of the scene supports templates of a specific version of the dotXSI format
- Parameters:
-
|
|
in_nMajor |
Major version of the parser |
|
|
in_nMinor |
Minor version of the parser |
- Returns:
- SI_Bool True if the version is supported, false otherwise
Sets the callback that receives warning messages
- Parameters:
-
|
|
in_pfncCallback |
Callback function |
| SI_Void SetReadCallback |
( |
SI_READ_CALLBACK_FNC |
in_pfncCallback |
) |
[inline] |
Sets the callback that gets call for reading every template
- Parameters:
-
|
|
in_pfncCallback |
Callback function |
Gets the refcount (how many others uses the specified template)
- Parameters:
-
The documentation for this class was generated from the following file: