![]() |
Plasma Engine
2.0
|
Worker long ops are executed by the editor engine process. More...
#include <LongOps.h>
Public Member Functions | |
virtual plResult | InitializeExecution (plStreamReader &ref_config, const plUuid &documentGuid) |
Called within the engine processes main thread. The function may lock the plWorld from the given scene document and extract vital information. It should try to be as quick as possible and leave the heavy lifting to Execute(), which will run on a background thread. If this function return failure, the long op is canceled right away. | |
virtual plResult | Execute (plProgress &ref_progress, plStreamWriter &ref_proxydata)=0 |
Executed in a separete thread after InitializeExecution(). This should do the work that takes a while. | |
![]() | |
virtual const plRTTI * | GetDynamicRTTI () const |
bool | IsInstanceOf (const plRTTI *pType) const |
Returns whether the type of this instance is of the given type or derived from it. | |
template<typename T > | |
PL_ALWAYS_INLINE bool | IsInstanceOf () const |
Returns whether the type of this instance is of the given type or derived from it. | |
Additional Inherited Members | |
![]() | |
static const plRTTI * | GetStaticRTTI () |
Worker long ops are executed by the editor engine process.
They typically do the actual long processing. Since they run in the engine process, they have access to the runtime scene graph and resources but not the editor representation of the scene.
plLongOpWorker instances are automatically instantiated by plLongOpWorkerManager when they have been named by a plLongOpProxy's GetReplicationInfo() function.
|
pure virtual |
Executed in a separete thread after InitializeExecution(). This should do the work that takes a while.
This function may write the result data directly to disk. Everything that is written to proxydata will be transmitted back to the proxy long op and given to plLongOpProxy::Finalize(). Since this requires IPC bandwidth the amount of data should be kept very small (a few KB at most).
All updates to progress will be automatically synchronized back to the editor process and become visible through the plLongOpControllerManager via the plLongOpControllerEvent. Use plProgressRange for convenient progress updates.
Implemented in plLongOpWorker_BakeScene, and plLongOpWorker_BuildNavMesh.
|
inlinevirtual |
Called within the engine processes main thread. The function may lock the plWorld from the given scene document and extract vital information. It should try to be as quick as possible and leave the heavy lifting to Execute(), which will run on a background thread. If this function return failure, the long op is canceled right away.
Reimplemented in plLongOpWorker_BakeScene, and plLongOpWorker_BuildNavMesh.