Rhino C++ API
8.12
|
#include <IRhRdkRenderWindow.h>
Classes | |
class | IChannel |
class | IChannelEx |
class | IEventWatcher |
class | IGPUChannel |
class | IOpenGLChannel |
Public Types | |
enum | FileResult : unsigned int { FileResult::Success, FileResult::OpenReadFail, FileResult::OpenWriteFail, FileResult::ReadFail, FileResult::WriteFail, FileResult::ReadException, FileResult::WriteException, FileResult::WrongRenderer } |
enum | RenderResult : unsigned int { RenderResult::Completed, RenderResult::Failed } |
Public Member Functions | |
virtual | ~IRhRdkRenderWindow () |
virtual bool | AddChannel (const UUID &uuidChannel, UINT uPixelSize)=0 |
virtual bool | AddWireframeChannel (CRhinoDoc &doc, const ON_3dmView &view, const ON_2iSize &size, const ON_4iRect ®ion)=0 |
virtual CRhRdkImageAdjust | Adjust (void) const =0 |
virtual void | ApplyUserInterfaceUpdates (bool)=0 |
virtual ON_wString | ChannelDescription (const UUID &) const =0 |
virtual void | ClearChannels (void)=0 |
virtual_su void | ClearEndTime (void) |
virtual void | ClearRendering (void)=0 |
virtual bool | DeleteDib (void)=0 |
virtual RDK_DEPRECATED void | EndAsyncRender (eRenderSuccessCode rsc) |
virtual void | EndAsyncRender (RenderResult res)=0 |
virtual bool | EnsureDib (void)=0 |
virtual void * | EVF (const wchar_t *, void *)=0 |
virtual_su bool | GetRenderChannels (OUT ON_SimpleArray< UUID > &aChan) const |
virtual void | Invalidate (void)=0 |
virtual void | InvalidateArea (const ON_4iRect &rect)=0 |
virtual bool | IsChannelAvailable (const UUID &uuidChannel) const =0 |
virtual bool | IsChannelShown (const UUID &uuidChannel) const =0 |
virtual bool | IsInPlace (void) const =0 |
virtual CRhinoDib * | LockDib (void) const =0 |
virtual IChannel * | NewClientChannel (const UUID &uuidChannel, bool bAllowMultipleAccess) const =0 |
virtual_su bool | OnClose (void) const |
virtual void | OnSynchronousRenderFinished (bool)=0 |
virtual void | OnTimer (void)=0 |
virtual IChannel * | OpenChannel (const UUID &uuidChannel)=0 |
virtual class CRhRdkPostEffectPlugInManager * | PEPManager (void) const =0 |
virtual bool | PreAllocateChannel (const UUID &uuidChannel)=0 |
virtual FileResult | ReadFrameBufferFile (const wchar_t *wszFilename, CRhRdkRenderingInfo &infoOut)=0 |
virtual_su void | RegisterEventWatcher (IEventWatcher &ew) |
virtual IRhRdkRenderSession * | RenderSession (void) const =0 |
virtual UUID | RenderSessionId (void) const |
virtual FileResult | SaveRenderImageAs (const wchar_t *wszFilename, const UUID &uuidRenderEngine, bool bSaveAlpha) const =0 |
virtual class CRhRdkSdkRender * | SdkRender (void) const =0 |
virtual bool | SetAdjust (const class IRhRdkImageAdjust &)=0 |
virtual bool | SetDib (const CRhinoDib &)=0 |
virtual_su void | SetIsRendering (bool b) |
virtual void | SetProgress (const ON_wString &sText, int iPercent)=0 |
virtual bool | SetSize (const ON_2iSize &size)=0 |
virtual void | SetUI (IRhRdkRenderUI *)=0 |
virtual void | SetView (const ON_3dmView &view)=0 |
virtual_su void | SetWatermarkText (const wchar_t *wsz) |
virtual bool | ShowChannel (const UUID &uuidChannel)=0 |
virtual UUID | ShowingChannel (void) const =0 |
virtual ON_2iSize | Size (void) const =0 |
virtual IRhRdkRenderUI * | UI (void) const =0 |
virtual void | UnlockDib (void) const =0 |
virtual_su void | UnregisterEventWatcher (IEventWatcher &ew) |
virtual void | UseInPlaceView (const CRhinoDoc &doc, const ON_4iRect &rect, CRhinoView &view)=0 |
virtual ON_3dmView | View (void) const =0 |
virtual FileResult | WriteFrameBufferFile (const wchar_t *wszFilename) const =0 |
Static Public Member Functions | |
static IRhRdkRenderWindow * | New (const CRhinoDoc &doc) |
static IRhRdkRenderWindow * | New (const CRhinoDoc &doc, const ON_3dmView &view) |
static IRhRdkRenderWindow * | New (void) |
static bool | PreAllocateChannel (IRhRdkRenderWindow &rw, const UUID &uuidChannel) |
Static Public Attributes | |
static const UUID | chanAlbedoBlue |
static const UUID | chanAlbedoGreen |
static const UUID | chanAlbedoRed |
static const UUID | chanAlbedoRGB |
static const UUID | chanAlpha |
static const UUID | chanBackgroundLuminanceBlue |
static const UUID | chanBackgroundLuminanceGreen |
static const UUID | chanBackgroundLuminanceRed |
static const UUID | chanBlue |
static const UUID | chanDistanceFromCamera |
static const UUID | chanGreen |
static const UUID | chanLuminanceBlue |
static const UUID | chanLuminanceGreen |
static const UUID | chanLuminanceRed |
static const UUID | chanMaterialIds |
static const UUID | chanNormalX |
static const UUID | chanNormalXYZ |
static const UUID | chanNormalY |
static const UUID | chanNormalZ |
static const UUID | chanObjectIds |
static const UUID | chanRed |
static const UUID | chanRGB |
static const UUID | chanRGBA |
static const UUID | chanWireframe |
static const UUID | chanWireframeAnnotationsRGBA |
static const UUID | chanWireframeCurvesRGBA |
static const UUID | chanWireframeIsocurvesRGBA |
static const UUID | chanWireframePointsRGBA |
static const UUID | chanWireframeRGBA |
This is the interface to the render window and frame buffer system used in the RDK render pipeline.
To the client, this interface represents the window into which rendered pixels are written. It is associated with a render session and also usually with a render frame. The render session manages the render window object (including its smart frame buffer, frame buffer and channels), and in the case of asynchronous rendering, an async render context. The SdkRender stack object creates the session with a unique identifier. Anyone with the identifier can find the render session and therefore also the associated render window and optional async render context.
|
strong |
|
strong |
|
inlinevirtual |
|
pure virtual |
Add a channel to the frame buffer in addition to the fixed Red, Green, Blue and Alpha channels.
uuidChannel | is the channel identifier. This can be one of the standard RDK channel UUIDs (see below) or a custom-defined UUID. Standard RDK channels appear on the toolbar and menu. Custom ones do not, but are still available for use by software that knows how to use them (e.g., a custom post-effect plug-in). |
uPixelSize | is the number of bytes required to store channel data for a single pixel. In the case of the standard RDK channels, this value must be sizeof(float) because these channels store a single float for each pixel. In the case of custom channels, this value can be anything you like since RDK does not understand or use it. |
|
pure virtual |
Use this utility method to automatically add wireframe channels to the rendered image. 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.
doc | is the document to display. |
view | is the view to display. |
size | is 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 | is the area of the rendering you want to display. This is usually a rect which is from (0, 0) to the width and height in the 'size' parameter, but it's different during RenderWindow and RenderInWindow where it is the region selected by the user in the viewport. This should match the size of the render window itself (i.e., the size set using SetSize). |
+------------------—+ | | | +----—+ | | | | <----— 'region' is the area being rendered. It's different to the full | | | | rendering area during RenderWindow and RenderInWindow. | +----—+ | | | <— 'size' is the size of the unclipped rendering. +------------------—+
|
pure virtual |
OBSOLETE – not implemented
CRhRdkImageAdjust is no longer used and is not implemented. To access the settings that this used to provide, you will need access to the document being rendered.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Remove all channels except Red, Green, Blue and Alpha. Prepares the system for calling AddChannel().
virtual_su void IRhRdkRenderWindow::ClearEndTime | ( | void | ) |
Call this to clear the end time. Used when extending a rendering (e.g., in Cycles).
|
pure virtual |
|
pure virtual |
|
virtual |
This method is deprecated in favor of the one below.
|
pure virtual |
This function must be called when an asynchronous render process has ended. Failing to do so will result in crashes when render window junk is cleared (either on EndCommand or exit of program).
res | is rsc_completed for a successful render or canceled render, or rsc_failed for a render with errors. |
|
pure virtual |
|
pure virtual |
Emergency virtual function for future expansion. Currently uses: "SetWatermarkText" - pvData is pointer to wide string. "ClearEndTime" "SetIsRendering" - pvData is pointer to bool.
virtual_su bool IRhRdkRenderWindow::GetRenderChannels | ( | OUT ON_SimpleArray< UUID > & | aChan | ) | const |
Renderers that support the feature uuidFeatureRenderChannels can call this to get the channels to render. The render settings has a user option for 'automatic' or 'custom'. When set to automatic, this returns the channels required by the current set of post effects. When set to custom, this returns the user's choice of channels.
|
pure virtual |
Invalidate the entire view window so that the pixels get painted.
|
pure virtual |
Invalidate an area of the view window so that the pixels get painted.
|
pure virtual |
Query if a channel is available.
|
pure virtual |
Query if a channel is being shown.
|
pure virtual |
|
pure virtual |
Lock the dib for exclusive access. You must call UnlockDib() later even if this returns null.
|
static |
|
static |
|
static |
Each of these methods creates a render window which is not associated with an actual window or render session but is otherwise fully functional. You can use it to write to channels, create DIBs, run post effects, tone-mapping, gamma, etc.
|
pure virtual |
virtual_su bool IRhRdkRenderWindow::OnClose | ( | void | ) | const |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Open a channel. If the channel is already open, the function will fail and return null. If successful, an IChannel interface will be returned and you must call Close() on this interface after use. The returned interface allows direct access to the underlying channel (or, in the case of chanRGB, chanRGBA, chanAlbedoRGB and NormalXYZ, collective channels). It is the responsibility of the caller to exercise caution when calling IChannel::GetValue() and IChannel::SetValue() since no range checking or other validation is performed by these methods.
uuidChannel | is the channel identifier. |
|
pure virtual |
|
pure virtual |
Allocate all memory associated with a channel in advance. If your application will access channels on multiple threads during the rendering process, you are strongly advised to call this function first for each channel you will access on the main thread. Ensure that SetSize has been called on the IRhRdkRenderWindow object first.
|
static |
Allocate all memory associated with a channel in advance. If your application will access channels on multiple threads during the rendering process, you are strongly advised to call this function first for each channel you will access on the main thread. Ensure that SetSize() has been called on the IRhRdkRenderWindow object first.
|
pure virtual |
virtual_su void IRhRdkRenderWindow::RegisterEventWatcher | ( | IEventWatcher & | ew | ) |
Call this to register an event watcher. This enables the watcher to find out when data in the render window has changed.
|
pure virtual |
|
virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
virtual_su void IRhRdkRenderWindow::SetIsRendering | ( | bool | b | ) |
This function is here to support raytraced mode.
|
pure virtual |
Set progress text and optional percentage.
sText | is the text to display in the progress area. |
iPercent | is the amount of progress as a percentage. If this parameter is set to -1 it will be ignored. |
|
pure virtual |
Set the pixel size of the frame buffer.
|
pure virtual |
|
pure virtual |
virtual_su void IRhRdkRenderWindow::SetWatermarkText | ( | const wchar_t * | wsz | ) |
Call this to set a watermark string which will be displayed in the rendering as a post effect.
wsz | is the string to set. |
|
pure virtual |
Show a channel.
uuidChannel | is the identifier of the channel to show. |
|
pure virtual |
Get the channel that is being shown.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Unlock the dib. Must be called after any call to LockDib().
virtual_su void IRhRdkRenderWindow::UnregisterEventWatcher | ( | IEventWatcher & | ew | ) |
Call this to unregister an event watcher.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |