ezEngine  Release 25.03
ezLayerContext Class Reference

Layers that are loaded as sub-documents of a scene share the ezWorld with their main document scene. Thus, this context attaches itself to its parent ezSceneContext. More...

#include <LayerContext.h>

Inheritance diagram for ezLayerContext:

Public Member Functions

virtual void HandleMessage (const ezEditorEngineDocumentMsg *pMsg) override
 
void SceneDeinitialized ()
 
const ezTagGetLayerTag () const
 
- Public Member Functions inherited from ezEngineProcessDocumentContext
 ezEngineProcessDocumentContext (ezBitflags< ezEngineProcessDocumentContextFlags > flags)
 
virtual void Initialize (const ezUuid &documentGuid, const ezVariant &metaData, ezEngineProcessCommunicationChannel *pIPC, ezStringView sDocumentType)
 
void Deinitialize ()
 
ezStringView GetDocumentType () const
 Returns the document type for which this context was created. Useful in case a context may be used for multiple document types.
 
void SendProcessMessage (ezProcessMessage *pMsg=nullptr)
 
ezBoundingBoxSphere GetWorldBounds (ezWorld *pWorld)
 
void ProcessEditorEngineSyncObjectMsg (const ezEditorEngineSyncObjectMsg &msg)
 
const ezUuidGetDocumentGuid () const
 
virtual void Reset ()
 
void ClearExistingObjects ()
 
virtual ezWorldRttiConverterContextGetContext ()
 
virtual const ezWorldRttiConverterContextGetContext () const
 
ezWorldGetWorld () const
 
virtual ezGameObjectHandle ResolveStringToGameObjectHandle (const void *pString, ezComponentHandle hThis, ezStringView sProperty) const
 Tries to resolve a 'reference' (given in pData) to an ezGameObject. More...
 
- Public Member Functions inherited from ezReflectedClass
virtual const ezRTTIGetDynamicRTTI () const
 
bool IsInstanceOf (const ezRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
 
template<typename T >
EZ_ALWAYS_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.
 

Static Public Member Functions

static ezEngineProcessDocumentContextAllocateContext (const ezDocumentOpenMsgToEngine *pMsg)
 
- Static Public Member Functions inherited from ezEngineProcessDocumentContext
static ezEngineProcessDocumentContextGetDocumentContext (ezUuid guid)
 
static void AddDocumentContext (ezUuid guid, const ezVariant &metaData, ezEngineProcessDocumentContext *pView, ezEngineProcessCommunicationChannel *pIPC, ezStringView sDocumentType)
 
static bool PendingOperationsInProgress ()
 
static void UpdateDocumentContexts ()
 
static void DestroyDocumentContext (ezUuid guid)
 
- Static Public Member Functions inherited from ezNoBase
static const ezRTTIGetStaticRTTI ()
 

Protected Member Functions

virtual void OnInitialize () override
 
virtual void OnDeinitialize () override
 
virtual ezEngineProcessViewContextCreateViewContext () override
 Needs to be implemented to create a view context used for windows and thumbnails rendering.
 
virtual void DestroyViewContext (ezEngineProcessViewContext *pContext) override
 Needs to be implemented to destroy the view context created in CreateViewContext.
 
virtual ezStatus ExportDocument (const ezExportDocumentMsgToEngine *pMsg) override
 Exports to current document resource to file. Make sure to write ezAssetFileHeader at the start of it.
 
virtual void UpdateDocumentContext () override
 A tick functions that allows each document context to do processing that continues over multiple frames and can't be handled in HandleMessage directly. More...
 
- Protected Member Functions inherited from ezEngineProcessDocumentContext
virtual bool PendingOperationInProgress () const
 Should return true if this context has any operation in progress like thumbnail rendering and thus needs to continue rendering even if no new messages from the editor come in.
 
void UpdateSyncObjects ()
 
void CreateThumbnailViewContext (const ezCreateThumbnailMsgToEngine *pMsg)
 Creates the thumbnail view context. It uses 'CreateViewContext' in combination with an off-screen render target.
 
void DestroyThumbnailViewContext ()
 Once a thumbnail is successfully rendered, the thumbnail view context is destroyed again.
 
virtual bool UpdateThumbnailViewContext (ezEngineProcessViewContext *pThumbnailViewContext)
 Overwrite this function to apply the thumbnail render settings to the given context. More...
 
virtual void OnThumbnailViewContextRequested ()
 Called before a thumbnail context is created.
 
virtual void OnThumbnailViewContextCreated ()
 Called after a thumbnail context was created. Allows to insert code before the thumbnail is generated.
 
virtual void OnDestroyThumbnailViewContext ()
 Called before a thumbnail context is destroyed. Used for cleanup of what was done in OnThumbnailViewContextCreated()
 
void SetTagOnObject (const ezUuid &object, const char *szTag, bool bSet, bool recursive)
 Sets or removes the given tag on the object and optionally all children.
 
void SetTagRecursive (ezGameObject *pObject, const ezTag &tag)
 Sets the given tag on the object and all children.
 
void ClearTagRecursive (ezGameObject *pObject, const ezTag &tag)
 Clears the given tag on the object and all children.
 
const ezEngineProcessViewContextGetViewContext (ezUInt32 uiView) const
 

Additional Inherited Members

- Public Attributes inherited from ezEngineProcessDocumentContext
ezIPCObjectMirrorEngine m_Mirror
 
ezWorldRttiConverterContext m_Context
 
- Protected Attributes inherited from ezEngineProcessDocumentContext
ezWorldm_pWorld = nullptr
 
ezBitflags< ezEngineProcessDocumentContextFlagsm_Flags
 
ezUuid m_DocumentGuid
 
ezVariant m_MetaData
 
ezEngineProcessCommunicationChannelm_pIPC = nullptr
 
ezHybridArray< ezEngineProcessViewContext *, 4 > m_ViewContexts
 
ezMap< ezUuid, ezEditorEngineSyncObject * > m_SyncObjects
 

Detailed Description

Layers that are loaded as sub-documents of a scene share the ezWorld with their main document scene. Thus, this context attaches itself to its parent ezSceneContext.

Member Function Documentation

◆ UpdateDocumentContext()

void ezLayerContext::UpdateDocumentContext ( )
overrideprotectedvirtual

A tick functions that allows each document context to do processing that continues over multiple frames and can't be handled in HandleMessage directly.

Make sure to call the base implementation when overwriting as this handles the thumbnail rendering that takes multiple frames to complete.

Reimplemented from ezEngineProcessDocumentContext.


The documentation for this class was generated from the following files: