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 (bool in_bSynchronize=true) |
| virtual SI_Error |
Write (SI_Char *in_szFileName, bool in_bSynchronize=true) |
| 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
This class manages a scene (reading/writing scene data, etc.).
This is the top level object for a dotXSI abstraction using the SemanticLayer. From this class, you can access all the models, primitives, materials etc.
Member Function Documentation
| SI_Error Open |
( |
SI_Char * |
in_szFileName |
) |
|
Opens a dotXSI file for reading and writing. The file must exist for the function to succeed.
- Parameters:
-
| [in] |
in_szFileName |
File to open. |
- Returns:
- Error code.
| SI_Error Open |
( |
SI_Char * |
in_szFileName, |
|
|
|
SI_READ_CALLBACK_FNC |
in_pFunc |
|
|
|
) |
|
|
|
Opens a dotXSI file for reading and writing. The file must exist for the function to succeed.
- Parameters:
-
| [in] |
in_szFileName |
File to open. |
| [in] |
in_pFunc |
read callback |
- Returns:
- Error code.
| SI_Error Create |
( |
SI_Char * |
in_szFileName, |
|
|
|
SI_Int |
in_nVersionMajor, |
|
|
|
SI_Int |
in_nVersionMinor, |
|
|
|
SI_Int |
in_nFormat = FORMAT_TEXT |
|
|
|
) |
|
|
|
Creates a new dotXSI file.
- Parameters:
-
| [in] |
in_szFileName |
File to create. |
| [in] |
in_nVersionMajor |
Major version of the file. |
| [in] |
in_nVersionMinor |
Minor version of the file. |
| [in] |
in_nFormat |
Format of the file (text or binary) for dotXSI |
- Returns:
- Error code.
| SI_Error Create |
( |
SI_Int |
in_nVersionMajor, |
|
|
|
SI_Int |
in_nVersionMinor, |
|
|
|
SI_Int |
in_nFormat = FORMAT_TEXT |
|
|
|
) |
|
|
|
Creates a new dotXSI file.
- Parameters:
-
| [in] |
in_nVersionMajor |
Major version of the file. |
| [in] |
in_nVersionMinor |
Minor version of the file. |
| [in] |
in_nFormat |
Format of the file (text or binary) for dotXSI |
- Returns:
- Error code.
Creates a new dotXSI file.
- Parameters:
-
| [in] |
in_parser |
Parser to use |
- Returns:
- Error code.
Populates the semantic layer with data present in the file.
- Returns:
- Error code.
| virtual SI_Error Write |
( |
bool |
in_bSynchronize = true |
) |
[virtual] |
Writes a dotXSI file containing the data present in the semantic layer.
- Parameters:
-
| [in] |
in_bSynchronize |
True to synchronize |
- Returns:
- Error code.
| virtual SI_Error Write |
( |
SI_Char * |
in_szFileName, |
|
|
|
bool |
in_bSynchronize = true |
|
|
|
) |
|
|
[virtual] |
Writes a dotXSI file containing the data present in the semantic layer.
- Parameters:
-
| [in] |
in_szFileName |
File to create. |
| [in] |
in_bSynchronize |
True to synchronize |
- Returns:
- Error code.
Reimplemented in CSLCOLLADAScene.
Closes the opened/created file.
- Returns:
- Error code.
| CSLModel* FindModel |
( |
SI_Char * |
in_szModelName |
) |
|
Finds a SI_Model by name
- Parameters:
-
| [in] |
in_szModelName |
The model's name |
- Returns:
- The model, or NULL if not found.
| CSLModel* FindModelRecursively |
( |
SI_Char * |
in_szModelName, |
|
|
|
CSLModel * |
in_pModel |
|
|
|
) |
|
|
|
Finds a SI_Model, recursively.
- Parameters:
-
| [in] |
in_szModelName |
The model's name |
| [in] |
in_pModel |
A Pointer to a CSLModel |
- Returns:
- The model, or NULL if not found.
Finds a parameter by name.
- Parameters:
-
| [in] |
in_szParameterName |
The Softimage path to the parameter; that is, 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. |
- Returns:
- The parameter.
| SI_Error GetValue |
( |
SI_Char * |
in_szParameterName, |
|
|
|
SI_Float * |
out_pfValue |
|
|
|
) |
|
|
|
Returns a parameter value.
- Parameters:
-
| [in] |
in_szParameterName |
The Softimage path to the parameter; that is, 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. |
| [out] |
out_pfValue |
The parameter's value |
- Returns:
- Error code
| SI_Error SetValue |
( |
SI_Char * |
in_szParameterName, |
|
|
|
SI_Float |
in_fValue |
|
|
|
) |
|
|
|
Sets a parameter value.
- Parameters:
-
| [in] |
in_szParameterName |
The Softimage path to the parameter; that is, 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. |
| [in] |
in_fValue |
The parameter's new value |
- Returns:
- Error code
Returns the ambience object.
- Returns:
- The ambience object
Creates an Ambience object
- Returns:
- Pointer to the ambience object
Removes the Ambience object
- Returns:
- Error code
Returns the coordinatesystem object
- Returns:
- Pointer to the CoordinateSystem object
Returns the EnvelopeList object
- Returns:
- Pointer to the EnvelopeList object
Returns the Fog object
- Returns:
- Pointer to the Fog object
Returns the MaterialLibrary object
- Returns:
- Pointer to the MaterialLibrary object
Returns the Root Model
- Returns:
- Pointer to the Root Model
Returns the CXSIParser object
- Returns:
- Pointer to the CXSIParser object
Returns the Angle object
- Returns:
- Pointer to the Angle object
Returns the FileInfo object
- Returns:
- Pointer to the FileInfo object
Returns the SceneInfo object
- Returns:
- Pointer to the object containing the scene information (SI_Scene template)
Returns the Logger object
- Returns:
- Pointer to the Logger object
Returns the filename for the current scene
- Returns:
- The filename
Returns the image library
- Returns:
- Pointer to the image library or null if there's none
Removes the Fog object
- Returns:
- Error code
Creates Fog
- Returns:
- Pointer to the Fog
Removes the EnvelopeList object
- Returns:
- Error code
Creates an envelope list
- Returns:
- Pointer to the envelope list
Reimplemented in CSLCOLLADAScene.
Creates an Image Library
- Returns:
- Pointer to the image library
- Since:
- dotXSI 3.6
Reimplemented in CSLCOLLADAScene.
Removes of the Image Library
- Returns:
- Error code
- Since:
- dotXSI 3.6
Connects an existing CSLMaterialLibrary object to the scene
- Parameters:
-
- Returns:
- Pointer to the old CSLMaterialLibrary
Connects an existing CSLAngle object to the scene
- Parameters:
-
- Returns:
- Pointer to the old CSLAngle object
Connects an existing CSLFileInfo object to the scene
- Parameters:
-
- Returns:
- Pointer to the old CSLFileInfo object
Connects an existing CSLSceneInfo object to the scene
- Parameters:
-
- Returns:
- Pointer to the old CSLSceneInfo object
Connects an existing CSLFog object to the scene
- Parameters:
-
| [in] |
in_pNewFog |
The new CSLFog |
- Returns:
- Pointer to the old CSLFog object
Connects an existing CSLAmbience object to the scene
- Parameters:
-
- Returns:
- Pointer to the old CSLAmbience object
Connects an existing CSLCoordinateSystem object to the scene
- Parameters:
-
- Returns:
- Pointer to the old CSLCoordinateSystem object
Connects an existing CSLEnvelopeList object to the scene
- Parameters:
-
- Returns:
- Pointer to the old CSLEnvelopeList object
Connects Image library
- Note:
- The parser must support 3.6 templates in order to connect an image library
- Parameters:
-
| [in] |
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
Registers a new template callback
- Parameters:
-
| [in] |
in_pName |
The template name |
| [in] |
in_pTemplateCallback |
The template callback structure |
- Returns:
- Error code
- Example:
- Adding a new template callback
| SI_Error UnregisterCallback |
( |
SI_Char * |
in_pName |
) |
|
Unregisters a template callback
- Parameters:
-
| [in] |
in_pName |
The template name |
- Returns:
- Error code
Unregisters all template callback
- Returns:
- Error code
Returns a callback by name
- Parameters:
-
| [in] |
in_pName |
Template name |
- Returns:
- 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] |
in_nMajor |
Major version of the parser |
| [in] |
in_nMinor |
Minor version of the parser |
- Return values:
-
|
|
true |
if the version is supported |
|
|
false |
otherwise |
| SI_Void SetWarningCallback |
( |
SI_WARNING_CALLBACK_FNC |
in_pfncCallback |
) |
[inline] |
Sets the callback that receives warning messages
- Parameters:
-
| [in] |
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] |
in_pfncCallback |
Callback function |
Returns the refcount (how many others uses the specified template)
- Parameters:
-
The documentation for this class was generated from the following file: