ChangeQueue
ReferencesBase class for ChangeQueue. Generally used by render plugins to build interactive updating of scenes that are being rendered.
Constructors
ChangeQueue
#Construct a new ChangeQueue using the given CreatePreviewEventArgs. The preview scene for these args will be used to populate the world.
protected ChangeQueue()
ChangeQueue
#Construct a new ChangeQueue from the given document
[CLSCompliant(false)]
protected ChangeQueue()
pluginId,
Id of plugin instantiating ChangeQueue
docRuntimeSerialNumber,
viewinfo,
bRespectDisplayPipelineAttributes
Determines whether the display pipeline attributes for this viewport should be taken into account when supplying data. If you are using this queue to populate a scene for the "Render" command, set this to false. If you are using it to draw a realtime preview, you will probably want to set it to true.
ChangeQueue
#Construct a new ChangeQueue from the given document, using given display pipeline attributes.
[CLSCompliant(false)]
protected ChangeQueue()
pluginId,
Id of plugin instantiating ChangeQueue
docRuntimeSerialNumber,
viewinfo,
attributes,
Display pipeline attributes to use.
bRespectDisplayPipelineAttributes,
Determines whether the display pipeline attributes for this viewport should be taken into account when supplying data. If you are using this queue to populate a scene for the "Render" command, set this to false. If you are using it to draw a realtime preview, you will probably want to set it to true.
bNotifyChanges
Determines whether you want to receive updates when the model changes. If you are rendering for a view capture, print or something similar, you will probably want to set this to false.
Properties
Get the DisplayPipelineAttributes if available, null otherwise
Return true if this ChangeQueue is created for preview rendering. No view was set for preview rendering.
Methods
ApplyClippingPlaneChanges
#Override this when you want to handle clippingplane changes
protected virtual void ApplyClippingPlaneChanges()
ApplyDisplayPipelineAttributesChanges
#Override if you need to react to display attribute changes. This function is needed to be able to react to different sample settings for i.e. capture preview rendering.
protected virtual void ApplyDisplayPipelineAttributesChanges()
ApplyDynamicObjectTransforms
#Handle dynamic object transforms
protected virtual void ApplyDynamicObjectTransforms()
dynamicObjectTransforms
ApplyGroundPlaneChanges
#Override this when you want to handle groundplane changes
protected virtual void ApplyGroundPlaneChanges()
GroundPlane
gp
ApplyMaterialChanges
#Override when you want to handle material changes
protected virtual void ApplyMaterialChanges()
ApplyMeshChanges
#Override this when you want to handle mesh changes.
ApplyMeshInstanceChanges
#Override this when you want to handle mesh instance changes (block instances and first-time added new meshes)
ApplyRenderSettingsChanges
#Override this when you want to handle render setting changes. These are for the viewport settings.
ApplyRenderSettingsChanges
#Override this when you need to handle background changes (through RenderSettings)
ApplySkylightChanges
#Override this when you want to handle skylight changes
protected virtual void ApplySkylightChanges()
Skylight
skylight
ApplySunChanges
#Override this when you want to handle sun changes
protected virtual void ApplySunChanges()
Light
sun
Compare to ViewInfo instances and decide whether they are equal or not. If you need to change the way the comparison is done you can override this function and implement your custom comparison.
Returns: true if the views are considered equal
BakeFor
#Override this if you need to control baking behavior for textures. By default bake everything.
BakingSize
#Override this if you need to control the size of the baked bitmaps for textures. By default the value returned is 2048.
ContentRenderHash
#Override this if you need to modify the way render hashes are calcuated in the change queue. This will alter the way materials are grouped.
Convert given (camera-based) light to a world-based light (in-place)
Helper function to get a CRC from a Guid.
Signal the queue to do the initialisation of the queue, seeding it with the content currently available.
public void CreateWorld()
bFlushWhenReady
Set to true CreateWorld should automatically flush at the end. Note that the Flush called when true is passed doesn't apply changes.
Get RenderEnvironment for given RenderHash. Can return null.
Returns: RenderEnvironment if render hash gives a match, null otherwise
Get the RenderEnvironment from the ChangeQueue content cache from the original instance id
Returns: RenderEnvironment
Get RenderEnvironment RenderHash for given usage.
Tell the ChangeQueue to flush all collected events. This can trigger a host of Apply* calls. The following is the order in which those calls get made if there are changes for that specific data type: ApplyViewChange ApplyLinearWorkflowChanges ApplyDynamicObjectTransforms ApplyDynamicLightChanges ApplyRenderSettingsChanges ApplyEnvironmentChanges (background) ApplyEnvironmentChanges (refl) ApplyEnvironmentChanges (sky) ApplySkylightChanges ApplySunChanges ApplyLightChanges ApplyMaterialChanges ApplyMeshChanges ApplyMeshInstanceChanges ApplyGroundPlaneChanges ApplyClippingPlaneChanges
public void Flush()
Get groundplane known to the queue at the time of the Flush
public GroundPlane GetQueueGroundPlane()
Get render settings known to the queue at the time of the Flush
Get the scene bounding box
Returns: Scene bounding box
Get skylight known to the queue at the time of the Flush
public Skylight GetQueueSkylight()
Get view known to the queue at the time of the Flush
Returns: ViewInfo
Get the RenderMaterial from the ChangeQueue material cache based on RenderHash
Returns: RenderMaterial
Get the RenderMaterial from the ChangeQueue material cache from the original instance id
Returns: RenderMaterial
NotifyBeginUpdates
#Override this when you want to be notified of begin of changes
protected virtual void NotifyBeginUpdates()
NotifyDynamicUpdatesAreAvailable
#Override this when you want to be notified dynamic updates are available
protected virtual void NotifyDynamicUpdatesAreAvailable()
NotifyEndUpdates
#Override this when you want to be notified when change notifications have ended.
protected virtual void NotifyEndUpdates()
Call Flush() once, after that automatically dispose the queue.
public void OneShot()
Return the collection of original document instance ids assocaited with the Environment id.
Return the collection of original document instance ids assocaited with the material id.
Return the collection of original document instance ids assocaited with the Texture id.
ProvideOriginalObject
#Override ProvideOriginalObject and return true if you want original objects supplied with ChangeQueue.Mesh. This will then also allow access to the Attributes.UserData of the original object from which the Mesh was generated.
Signal the queue to refresh all of the materials in the scene.
public void RefreshMaterials()
Get RenderTexture for given RenderHash. Can return null.
Returns: RenderTexture if found for render hash, null otherwise
Get the RenderTexture from the ChangeQueue content cache from the original instance id
Returns: RenderTexture