RenderWindow

References
public class RenderWindow : IDisposable

Properties

SessionId

#Since v5.11
public Guid SessionId { get; }

Methods

AddChannel

#Since v5.0
Add a channel to the frame buffer in addition to the fixed Red, Green, Blue and Alpha channels.
public bool AddChannel(
channel
Channel to add
)
If the channel existed then true is returned otherwise; returns true if the channel was added or false if not.

AddWireframeChannel

#Since v5.0
This method sets the frame buffer size and adds all the necessary wireframe channels automatically. It also creates the wireframe channel data automatically so that your renderer doesn't have to. You typically call this method only when your renderer does not support wireframe rendering itself. If you call this method, then you should not add any wireframe channels returned by GetRenderChannels(). If your renderer is capable of rendering the wireframe channels itself, you should not call this method. Instead, you must make sure you add the wireframe channels if GetRenderChannels() requests them. See IRhRdkRenderWindow::GetRenderChannels(). After the wires are rendered, the wireframe post effects will composite them into the final rendered image. Note: This method should really be called AddWireframeChannels(). [SDK_UNFREEZE] */
public bool AddWireframeChannel(
doc,
The document to display
viewport,
The view to display
size,
The size of the image without clipping (i.e., if you have a region, it is the size of the image before you cut the region out.
region
The area of the rendering you want to display. This should match the size of the render window itself (i.e, - the one set using SetSize)
)
Returns true if all of the wireframe channels were added successfully.

ChannelId

#Since v5.0
public static Guid ChannelId()

Create

#Since v6.0
public static RenderWindow Create(
szSize
)

Dispose

#Since v6.0
public void Dispose()

EnableDebugThreadCheck

#
Expert use only. Note that it is critical that when you disable the check, you absolutely ensure that there can not be access to the render window from multiple threads during the period it is disabled. Set it back on as soon as possible.
public void EnableDebugThreadCheck(
enabled
Sets the status of the thread check flag on the render window in debug builds
)

EndAsyncRender

#Since v6.0
Must be called when an asynchronous render has finished or ended for any reason.
public void EndAsyncRender(
successCode
Completed for a correct or canceled render, Failed for errors.
)

FromSessionId

#Since v5.11
public static RenderWindow FromSessionId(
sessionId
)

GetAdjust

#Since v6.0 Obsolete v7.0
OBSOLETE. NOT IMPLEMENTED.
public RenderWindow.ImageAdjust GetAdjust()
obsoleteThe Render Window UI now uses post effects for gamma, tone mapping, etc.

GetBitmap

#Since v6.0
public Bitmap GetBitmap()

GetRequestedRenderChannels

#Since v7.0
Get array of Guids representing the channels requested by the post effect pipeline for this RenderWindow.
public Guid[] GetRequestedRenderChannels()
Array of Guid

GetRequestedRenderChannelsAsStandardChannels

#Since v7.0
Get array of StandardChannels enum values representing the channels requested by the post effect pipeline for this RenderWindow.
public RenderWindow.StandardChannels[] GetRequestedRenderChannelsAsStandardChannels()
Array of StandardChannels

Invalidate

#Since v5.0
Invalidate the entire view window so that the pixels get painted.
public void Invalidate()

InvalidateArea

#Since v5.0
public void InvalidateArea()

IsChannelAvailable

#Since v7.0
Query if a channel is available.
public bool IsChannelAvailable(
id
)
Returns true if the channel is available.

IsChannelShown

#Since v7.0
Query if a channel is being shown.
public bool IsChannelShown(
id
)
Returns true if the channel is being shown.

OpenChannel

#Since v5.0
public RenderWindow.Channel OpenChannel()

RegisterPostEffectExecutionControl

#Since v8.0
Register an instance of PostEffectExecutionControl.
public void RegisterPostEffectExecutionControl()

SaveDibAsBitmap

#Since v6.0
Save current Dib of RenderWindow as file Helper function for debugging purposes.
public void SaveDibAsBitmap(
filename
)

SaveRenderImageAs

#Since v6.0
Like RenderWindow.SaveRenderImageAs(string,Guid,bool), but with Guid set to Guid.Empty.
public void SaveRenderImageAs(
filename,
Filename of image file to be created
saveAlpha
True if alpha channel should be saved.
)

SaveRenderImageAs

#Since v6.0
Save current RenderWindow contents as an image file with the given name. The filetype will be determine. Pass in render engine Guid if an engine implements saving to a format that is not supported by Rhino. Guid.Empty if there is no need for that.
public void SaveRenderImageAs(
filename,
Filename of image file to be created
renderEngineGuid,
render engine ID
saveAlpha
True if alpha channel should be saved.
)

SetAdjust

#Since v6.0 Obsolete v7.0
OBSOLETE. NOT IMPLEMENTED.
public void SetAdjust(
imageAdjust
OBSOLETE
)
obsoleteThe Render Window UI now uses post effects for gamma, tone mapping, etc.

SetIsRendering

#Since v7.1
Set whether or not rendering is in progress. Added to support raytraced mode.
public void SetIsRendering(
is_rendering
)

SetProgress

#Since v5.0
Accepts a rendering progress value to inform the user of the rendering advances.
public void SetProgress(
text,
The progress text.
progress
A progress value in the domain [0.0f; 1.0f].
)

SetRenderOutputRect

#Since v8.0
Specify a sub-rectangle of the render window to indicate where the relevant render output has been written. For example, if a renderer chooses to render at half resolution, it could write its data to the top left quadrant of the render window, which can be indicated by setting the render output rectangle. This is set to the full render window size by default. When the render window size is modified, the render output rectangle will be set to reflect the new size.
public void SetRenderOutputRect(
rect
Rectangle
)

SetRGBAChannelColors

#Since v5.0
Call this method to open the RenderWindow.StandardChannels.RGBA channel and set a block of color values
public void SetRGBAChannelColors(
rectangle,
rectangle.X is the horizontal pixel position of the left edge. No validation is done on this value. The caller is responsible for ensuring that it is within the frame buffer. rectangle.Y is the vertical pixel position of the top edge. No validation is done on this value. The caller is responsible for ensuring that it is within the frame buffer. rectangle.Width is the width of the rectangle in pixels. No validation is done on this value. rectangle.Height is the height of the rectangle in pixels. No validation is done on this value.
colors
Array of Color4f values used to set the RenderWindow.StandardChannels.RGBA
)

SetRGBAChannelColors

#Since v5.0
Call this method to open the RenderWindow.StandardChannels.RGBA channel and set a block of color values
public void SetRGBAChannelColors(
size,
Size of the area to set. No validation is done on this value
colors
Array of Color4f values used to set the RenderWindow.StandardChannels.RGBA
)

SetSize

#Since v5.0
public void SetSize(
size
)

SetView

#Since v6.0
public void SetView()

Size

#Since v5.0
public Size Size()

StandardChannelForGuid

#Since v7.0
Get the StandardChannels for the given Guid
public static RenderWindow.StandardChannels StandardChannelForGuid(
id
)

Events

Cloned

#Since v5.11
public static event EventHandler<RenderWindowClonedEventArgs> Cloned