User Tools

Site Tools


DzSimulationMgr

Manager that is responsible for simulation engines and simulation.

More...

Inherits :

Methods

Signals

Detailed Description

Responsible for the management of simulation engines, and more generally the process of performing a simulation.

There is only one instance of this manager in an application. This instance is created and owned by DzApp. Request the instance via DzApp::getSimulationMgr().

See Also:

Since:

  • 4.9.4.1

Methods


DzError : clearSimulation()

Clears all simulation data in the scene for the active simulation engine.

Return Value:

  • DZ_NO_ERROR if the operation is successful, otherwise an appropriate error code.

See Also:


DzSimulationEngine : findSimulationEngine( String className )

Return Value:

  • The simulation engine with the given class name (if any), otherwise null.

DzSimulationEngine : getActiveSimulationEngine()

Return Value:

  • The active simulation engine for the application. This will be NULL if no simulation engines are available.

Number : getNumSimulationEngines()

Return Value:

  • The number of simulation engines available to the application.

DzSimulationEngine : getSimulationEngine( Number which )

Return Value:

  • If which is within the range [0, getNumSimulationEngines() - 1], the simulation engine at the given index, otherwise null.

Array : getSimulationEngineList()

Return Value:

  • A list of simulation engines available in the application.

Boolean : isSimulating()

Return Value:

  • true if the application is currently simulating, otherwise false.

void : setActiveSimulationEngine( DzSimulationEngine engine )

Sets the active simulation engine for the application.

Parameter(s):

  • engine - The simulation engine to make active.

DzError : simulate()

Performs a simulation on the scene with the given simulation settings. If no simulation settings are specified, then the current application simulation settings are used.

Return Value:

  • DZ_NO_ERROR if the operation is successful, otherwise an appropriate error code.

See Also:

Signals


void : activeSimulationEngineChanged( DzSimulationEngine engine )

Signature:“activeSimulationEngineChanged(DzSimulationEngine*)”

Emitted when the active simulation engine has changed.

Parameter(s):

  • engine - The newly active simulation engine.

void : simulationEngineAdded( DzSimulationEngine engine )

Signature:“simulationEngineAdded(DzSimulationEngine*)”

Emitted when a new simulation engine is added to the manager. This only occurs at startup as plug-ins are being loaded.

Parameter(s):

  • engine - The new simulation engine that was added to the manager.

void : simulationError( String errorMsg )

Signature:“simulationError(const QString&)”

Emitted when an error occurs while the active simulation engine is simulating.

Parameter(s):

  • errorMsg - The error message.

void : simulationFinished( Boolean succeeded )

Signature:“simulationFinished(bool)”

Emitted just after a simulation operation is finished. This is only emitted when a simulation operation is performed by calling simulate() - this includes all simulation operations that are started by the user from the interface. This may not include simulation operations performed by plug-ins, scripts, etc which do not call simulate().

Parameter(s):

  • succeeded - true if the simulation was successful, false if the simulation failed or was cancelled by the user.

See Also:


void : simulationOptionDefaultsRestored()

Signature:“simulationOptionDefaultsRestored()”

Emitted when the default options for the active simulation engine have been restored.


void : simulationStarting()

Signature:“simulationStarting()”

Emitted just before a simulation operation begins. This is only emitted when a simulation operation is performed by calling simulate() - this includes all simulation operations that are started by the user from the interface. This may not include simulation operations performed by plug-ins, scripts, etc which do not call simulate().

See Also: