# I3DRenderHelper Struct Reference
[External Interfaces]

Inheritance diagram for I3DRenderHelper:

List of all members.

## Public Member Functions
virtual MCCOMErr MCCOMAPI | SetScene (I3DShScene *scene)=0
virtual MCCOMErr MCCOMAPI | SetCamera (I3DShCamera *camera)=0
virtual MCCOMErr MCCOMAPI | SetRenderSize (uint32 width, uint32 height, real pixelAspectRation=1.0f)=0
virtual MCCOMErr MCCOMAPI | SetBufferNeeds (RenderFilterNeeds &needs)=0
virtual MCCOMErr MCCOMAPI | EnablePostRendering (boolean enable)=0
virtual MCCOMErr MCCOMAPI | EnableMultiPass (boolean enable)=0
virtual MCCOMErr MCCOMAPI | SetTiling (real tileWidth, real tileHeight)=0
virtual void MCCOMAPI | StartNetworkRendering (TMCNetStream &stream, int32 syncThreadID)=0
virtual MCCOMErr MCCOMAPI | RenderArea (I3DRenderingCallbacks *callbacks, boolean synch=true, int32 synchThreadID=0, const TRenderArea *renderArea=NULL)=0
virtual MCCOMErr MCCOMAPI | GetRasterLayer (IShRasterLayer **rasterLayer)=0
virtual MCCOMErr MCCOMAPI | GetGBuffers (TMCCountedPtrArray< IShChannel > &gBuffers)=0
virtual MCCOMErr MCCOMAPI | AbortRendering ()=0
virtual MCCOMErr MCCOMAPI | PauseRendering ()=0
virtual IShParameterComponent *MCCOMAPI | CreateRendererNoAddRef (IDType classID)=0
virtual boolean MCCOMAPI | GetIsInBatchQueue ()=0
virtual boolean MCCOMAPI | IsStillRendering ()=0
virtual void MCCOMAPI | SetAlphaChannelOptions (boolean renderAlpha, boolean usePreMultipledAlpha=false)=0

## Detailed Description

The Render Helper is the class the controls the rendering. The render helper use a final renderer to render an image or a movie. The render helper provides services such as tiling and multiprocessor support.

You cannot implement your own RenderHelper. However you can instantiate it to render previews or images. To instantiante a renderHelper, use the following code:

     TMCCountedPtr<IMCUnknown> unknown;
     gComponentUtilities->CreateIUnknown('rhlp','1st ',NULL,&unknown);
     ThrowIfNil(unknown);

     TMCCountedPtr<I3DRenderHelper> renderHelper;
     unknown->QueryInterface(IID_I3DRenderHelper,(void**)&renderHelper);
     ThrowIfNil(renderHelper);

If you already have a scene document in memory, you can access the renderHelper of the scene by using the following code:

     TMCCountedPtr<I3DRenderingModule> renderingModule;
     scene->GetSceneRenderingModule(&renderingModule);

     TMCCountedPtr<I3DRenderHelper> renderHelper;
     renderingModule->GetRenderHelper(&renderHelper);

All the 'set' functions only modify the renderHelper settings and not the sceneRenderingModule settings

## Member Function Documentation

virtual MCCOMErr MCCOMAPI I3DRenderHelper::AbortRendering | ( |  | ) | `[pure virtual]`

Stops the current rendering if there is one.

virtual IShParameterComponent* MCCOMAPI I3DRenderHelper::CreateRendererNoAddRef | ( | IDType | classID | ) | `[pure virtual]`

Create a new renderer that will be used for the next rendering.

Parameters:

  | classID | The classID of the final renderer to use.

virtual MCCOMErr MCCOMAPI I3DRenderHelper::EnableMultiPass | ( | boolean | enable | ) | `[pure virtual]`

Enable/Disable the rendering of the multipass elements.

Parameters:

  | enable | True if the multipass is enabled.

virtual MCCOMErr MCCOMAPI I3DRenderHelper::EnablePostRendering | ( | boolean | enable | ) | `[pure virtual]`

Enable/Disable post rendering

Parameters:

  | enable | True if the postrendering is enabled.

virtual MCCOMErr MCCOMAPI I3DRenderHelper::GetGBuffers | ( | TMCCountedPtrArray< IShChannel > & | gBuffers | ) | `[pure virtual]`

Returns an array containing the gBuffers that have been calculated. The order is the order of their identifiers.

Parameters:

  | gBuffers | The array of GBuffers.

virtual boolean MCCOMAPI I3DRenderHelper::GetIsInBatchQueue | ( |  | ) | `[pure virtual]`

Return the current rendering mode

virtual MCCOMErr MCCOMAPI I3DRenderHelper::GetRasterLayer | ( | IShRasterLayer ** | rasterLayer | ) | `[pure virtual]`

Returns the color buffer (must be called within a callback of the rendering)

Parameters:

  | rasterLayer | The color buffer.

virtual boolean MCCOMAPI I3DRenderHelper::IsStillRendering | ( |  | ) | `[pure virtual]`

Returns true as long as the rendering is not finished

virtual MCCOMErr MCCOMAPI I3DRenderHelper::PauseRendering | ( |  | ) | `[pure virtual]`

Pauses the current rendering

virtual MCCOMErr MCCOMAPI I3DRenderHelper::RenderArea | ( | I3DRenderingCallbacks * | callbacks,
|  | boolean | synch = `true`,
|  | int32 | synchThreadID = `0`,
|  | const TRenderArea * | renderArea = `NULL` |
| ) |  |  | `[pure virtual]`

Renders one frame using the current settings

Parameters:

  | callbacks | Callbacks
  | synch | False if a new non-preemptive thread must be launched for the rendering.
  | synchThreadID | Identifier of the thread if synch is true
  | renderArea | SubArea to render (if null, we use production frame)

virtual void MCCOMAPI I3DRenderHelper::SetAlphaChannelOptions | ( | boolean | renderAlpha,
|  | boolean | usePreMultipledAlpha = `false` |
| ) |  |  | `[pure virtual]`

Call to control the rendering of the alpha channel

Parameters:

  | renderAlpha | true if the alpha should be rendered
  | usePreMultipledAlpha | true if the alpha should be premultiplied

virtual MCCOMErr MCCOMAPI I3DRenderHelper::SetBufferNeeds | ( | RenderFilterNeeds & | needs | ) | `[pure virtual]`

Sets the GBuffers that need to be rendered.

Parameters:

  | needs | A bitfield that specifies which GBuffer should be rendered.

virtual MCCOMErr MCCOMAPI I3DRenderHelper::SetCamera | ( | I3DShCamera * | camera | ) | `[pure virtual]`

Sets the rendering camera.

Parameters:

  | camera | The rendering camera.

virtual MCCOMErr MCCOMAPI I3DRenderHelper::SetRenderSize | ( | uint32 | width,
|  | uint32 | height,
|  | real | pixelAspectRation = `1.0f` |
| ) |  |  | `[pure virtual]`

Sets the size of the production frame ( width,height are in pixel )

Parameters:

  | width | width of the production frame in pixel
  | height | height of the production frame in pixel
  | pixelAspectRation | Ratio between the width and height of a pixel.

virtual MCCOMErr MCCOMAPI I3DRenderHelper::SetScene | ( | I3DShScene * | scene | ) | `[pure virtual]`

Set the scene that will be rendered.

Parameters:

  | scene | The scene that will be rendered.

virtual MCCOMErr MCCOMAPI I3DRenderHelper::SetTiling | ( | real | tileWidth,
|  | real | tileHeight |
| ) |  |  | `[pure virtual]`

Sets the size of a tile for the rendering. Note that the actual size of the tiles might be slightly bigger since the renderer will be given a chance to optimize the tile size for best performance.

Parameters:

  | tileWidth | Width in pixel of a tile.
  | tileHeight | Height in pixel of a tile.

virtual void MCCOMAPI I3DRenderHelper::StartNetworkRendering | ( | TMCNetStream & | stream,
|  | int32 | syncThreadID |
| ) |  |  | `[pure virtual]`

Perform a network rendering session. This function is used by rendering node when they start the network rendering.

Parameters:

  | stream | An open stream of communication with the server
  | syncThreadID | The id of the current thread

The documentation for this struct was generated from the following file:

- I3DRenderHelper.h