ChangeQueue

References
public abstract class ChangeQueue : IDisposable
Base 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(
pluginId,
Id of plugin instantiating ChangeQueue
createPreviewEventArgs
)

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

DisplayPipelineAttributes

#Since v6.0
Get the DisplayPipelineAttributes if available, null otherwise
public DisplayPipelineAttributes DisplayPipelineAttributes { get; }

IsPreview

#Since v6.0
Return true if this ChangeQueue is created for preview rendering. No view was set for preview rendering.
public bool IsPreview { get; }

ViewId

#Since v6.0
Return view ID for a RhinoDoc based ChangeQueue. Returns Guid.Empty if no view was associated with the changequeue, i.e. preview rendering.
public Guid ViewId { get; }

Methods

ApplyClippingPlaneChanges

#
Override this when you want to handle clippingplane changes
protected virtual void ApplyClippingPlaneChanges(
Guid[]
deleted,
addedOrModified
)

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(
displayPipelineAttributes
The changed DisplayPipelineAttributes.
)

ApplyDynamicClippingPlaneChanges

#
Override this when you want to handle dynamicclippingplane changes
protected virtual void ApplyDynamicClippingPlaneChanges()

ApplyDynamicLightChanges

#
Handle dynamic light changes
protected virtual void ApplyDynamicLightChanges(
List<Light>
dynamicLightChanges
)

ApplyDynamicObjectTransforms

#
Handle dynamic object transforms
protected virtual void ApplyDynamicObjectTransforms(
dynamicObjectTransforms
)

ApplyEnvironmentChanges

#
Override this when you want to handle environment changes
protected virtual void ApplyEnvironmentChanges(
usage
)

ApplyGroundPlaneChanges

#
Override this when you want to handle groundplane changes
protected virtual void ApplyGroundPlaneChanges(
GroundPlane
gp
)

ApplyLightChanges

#
Override this when you want to handle light changes
protected virtual void ApplyLightChanges(
List<Light>
lightChanges
)

ApplyLinearWorkflowChanges

#
Override this when you want to handle linear workflow changes
protected virtual void ApplyLinearWorkflowChanges()

ApplyMaterialChanges

#
Override when you want to handle material changes
protected virtual void ApplyMaterialChanges(
List<Material>
mats
List of ChangeQueue::Material that have changed
)

ApplyMeshChanges

#
Override this when you want to handle mesh changes.
protected virtual void ApplyMeshChanges(
Guid[]
deleted,
List of Guids to meshes that have been deleted
List<Mesh>
added
List of ChangeQueueMeshes that have been added or changed
)

ApplyMeshInstanceChanges

#
Override this when you want to handle mesh instance changes (block instances and first-time added new meshes)
[CLSCompliant(false)] protected virtual void ApplyMeshInstanceChanges(
deleted,
addedOrChanged
)

ApplyRenderSettingsChanges

#
Override this when you want to handle render setting changes. These are for the viewport settings.
protected virtual void ApplyRenderSettingsChanges()

ApplyRenderSettingsChanges

#
Override this when you need to handle background changes (through RenderSettings)
protected virtual void ApplyRenderSettingsChanges()

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
)

ApplyViewChange

#
Override ApplyViewChange when you want to receive changes to the view/camera
protected virtual void ApplyViewChange(
viewInfo
The ViewInfo with the changes
)

AreViewsEqual

#Since v6.0
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.
public virtual bool AreViewsEqual(
aView,
First ViewInfo to compare
bView
Second ViewInfo to compare
)
true if the views are considered equal

BakeFor

#
Override this if you need to control baking behavior for textures. By default bake everything.
[CLSCompliant(false)] protected virtual ChangeQueue.BakingFunctions BakeFor()

BakingSize

#
Override this if you need to control the size of the baked bitmaps for textures. By default the value returned is 2048.
protected virtual int BakingSize()

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.
[CLSCompliant(false)] protected virtual uint ContentRenderHash(
content,
flags,
excludeParameterNames,
lw
)

ConvertCameraBasedLightToWorld

#Since v6.0
Convert given (camera-based) light to a world-based light (in-place)
public static void ConvertCameraBasedLightToWorld(
changequeue,
Light
light,
vp
)

CrcFromGuid

#Since v6.0
Helper function to get a CRC from a Guid.
[CLSCompliant(false)] public static uint CrcFromGuid(
guid
)

CreateWorld

#Since v6.0
Calls CreateWorld with true passed.
public void CreateWorld()

CreateWorld

#Since v6.0
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.
)

Dispose

#Since v6.0
Dispose our ChangeQueue
public void Dispose()

Dispose

#
Dispose our ChangeQueue. Disposes unmanaged memory.
protected virtual void Dispose(
isDisposing
)

EnvironmentForid

#Since v6.0
Get RenderEnvironment for given RenderHash. Can return null.
[CLSCompliant(false)] public RenderEnvironment EnvironmentForid(
crc
)
RenderEnvironment if render hash gives a match, null otherwise

EnvironmentFromOriginalInstanceId

#Since v8.5
Get the RenderEnvironment from the ChangeQueue content cache from the original instance id
public RenderEnvironment EnvironmentFromOriginalInstanceId(
id
The original instance id
)
RenderEnvironment

EnvironmentIdForUsage

#Since v6.0
Get RenderEnvironment RenderHash for given usage.
[CLSCompliant(false)] public uint EnvironmentIdForUsage(
usage
)

Flush

#Since v6.0
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()

GetQueueGroundPlane

#Since v6.0
Get groundplane known to the queue at the time of the Flush
public GroundPlane GetQueueGroundPlane()

GetQueueRenderSettings

#Since v6.0
Get render settings known to the queue at the time of the Flush
public RenderSettings GetQueueRenderSettings()

GetQueueSceneBoundingBox

#Since v6.0
Get the scene bounding box
public BoundingBox GetQueueSceneBoundingBox()
Scene bounding box

GetQueueSkylight

#Since v6.0
Get skylight known to the queue at the time of the Flush
public Skylight GetQueueSkylight()

GetQueueSun

#Since v6.0
Get sun known to the queue at the time of the Flush
public Light GetQueueSun()

GetQueueView

#Since v6.0
Get view known to the queue at the time of the Flush
public ViewInfo GetQueueView()
ViewInfo

MaterialFromId

#Since v6.0
Get the RenderMaterial from the ChangeQueue material cache based on RenderHash
[CLSCompliant(false)] public RenderMaterial MaterialFromId(
crc
The RenderHash
)
RenderMaterial

MaterialFromOriginalInstanceId

#Since v8.5
Get the RenderMaterial from the ChangeQueue material cache from the original instance id
public RenderMaterial MaterialFromOriginalInstanceId(
id
The original instance id
)
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()

OneShot

#Since v6.0
Call Flush() once, after that automatically dispose the queue.
public void OneShot()

OriginalInstanceIdsFromEnvironmentId

#Since v8.23
Return the collection of original document instance ids assocaited with the Environment id.
[CLSCompliant(false)] public Guid[] OriginalInstanceIdsFromEnvironmentId(
crc
The Environment id
)

OriginalInstanceIdsFromMaterialId

#Since v8.23
Return the collection of original document instance ids assocaited with the material id.
[CLSCompliant(false)] public Guid[] OriginalInstanceIdsFromMaterialId(
crc
The material id
)

OriginalInstanceIdsFromTextureId

#Since v8.23
Return the collection of original document instance ids assocaited with the Texture id.
[CLSCompliant(false)] public Guid[] OriginalInstanceIdsFromTextureId(
crc
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.
protected virtual bool ProvideOriginalObject()

RefreshMaterials

#Since v9.0
Signal the queue to refresh all of the materials in the scene.
public void RefreshMaterials()

TextureForId

#Since v7.0
Get RenderTexture for given RenderHash. Can return null.
[CLSCompliant(false)] public RenderTexture TextureForId(
crc
render hash of the content to search for
)
RenderTexture if found for render hash, null otherwise

TextureFromOriginalInstanceId

#Since v8.5
Get the RenderTexture from the ChangeQueue content cache from the original instance id
public RenderTexture TextureFromOriginalInstanceId(
id
The original instance id
)
RenderTexture