
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 | 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 |
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
| virtual MCCOMErr MCCOMAPI I3DRenderHelper::SetScene | ( | I3DShScene * | scene | ) | [pure virtual] |
Set the scene that will be rendered.
| scene | The scene that will be rendered. |
| virtual MCCOMErr MCCOMAPI I3DRenderHelper::SetCamera | ( | I3DShCamera * | camera | ) | [pure virtual] |
Sets the rendering camera.
| 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 )
| 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::SetBufferNeeds | ( | RenderFilterNeeds & | needs | ) | [pure virtual] |
Sets the GBuffers that need to be rendered.
| needs | A bitfield that specifies which GBuffer should be rendered. |
Enable/Disable post rendering
| enable | True if the postrendering is enabled. |
| 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.
| 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.
| stream | An open stream of communication with the server | |
| syncThreadID | The id of the current thread |
| 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
| 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 MCCOMErr MCCOMAPI I3DRenderHelper::GetRasterLayer | ( | IShRasterLayer ** | rasterLayer | ) | [pure virtual] |
Returns the color buffer (must be called within a callback of the rendering)
| rasterLayer | The color buffer. |
| 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.
| gBuffers | The array of GBuffers. |
| virtual MCCOMErr MCCOMAPI I3DRenderHelper::AbortRendering | ( | ) | [pure virtual] |
Stops the current rendering if there is one.
| virtual MCCOMErr MCCOMAPI I3DRenderHelper::PauseRendering | ( | ) | [pure virtual] |
Pauses the current rendering
| virtual IShParameterComponent* MCCOMAPI I3DRenderHelper::CreateRendererNoAddRef | ( | IDType | classID | ) | [pure virtual] |
Create a new renderer that will be used for the next rendering.
| classID | The classID of the final renderer to use. |
| virtual boolean MCCOMAPI I3DRenderHelper::GetIsInBatchQueue | ( | ) | [pure virtual] |
Return the current rendering mode
| virtual boolean MCCOMAPI I3DRenderHelper::IsStillRendering | ( | ) | [pure virtual] |
Returns true as long as the rendering is not finished
| virtual void MCCOMAPI I3DRenderHelper::SetAlphaChannelOptions | ( | boolean | renderAlpha, | |
| boolean | usePreMultipledAlpha = false | |||
| ) | [pure virtual] |
Call to control the rendering of the alpha channel
| renderAlpha | true if the alpha should be rendered | |
| usePreMultipledAlpha | true if the alpha should be premultiplied |
1.5.3