TBasicRendererBox Class Reference
[Base Classes for plugins]

Inheritance diagram for TBasicRendererBox:

TBasicDataExchanger I3DExRendererBox TBasicUnknown IExDataExchanger IMCUnknown IMCUnknown List of all members.

Public Member Functions

virtual MCErr MCCOMAPI QueryInterface (const MCIID &riid, void **ppvObj)
virtual uint32 MCCOMAPI AddRef ()
virtual void MCCOMAPI Clone (IExDataExchanger **dataExchanger, IMCUnknown *pUnkOuter)
virtual boolean MCCOMAPI IsEqual (IExDataExchanger *otherDataExchanger)
virtual MCCOMErr MCCOMAPI GetParameter (IDType keyword, void *parameter)
virtual MCCOMErr MCCOMAPI SetParameter (IDType keyword, void *parameter)
virtual MCCOMErr MCCOMAPI ExtensionDataChanged ()
virtual MCCOMErr MCCOMAPI HandleEvent (MessageID message, IMFResponder *source, void *data)
virtual int16 MCCOMAPI GetResID ()
virtual MCCOMErr MCCOMAPI InitComponent ()
virtual MCCOMErr MCCOMAPI CopyComponentExtraData (IExDataExchanger *dest)
virtual void MCCOMAPI SetCamera (I3DShCamera *camera, const TBBox2D &viewPane)
virtual void MCCOMAPI SetScene (I3DShScene *scene)
virtual void MCCOMAPI SetWorkingBox (IWorkingBox *workingBox)
virtual void MCCOMAPI DeleteRenderableCache (I3DShRenderable &renderable)
virtual void MCCOMAPI PreDraw (void *awnd, const TMCRect &windowContentRect, const TMCRect &windowUpdateRect)
virtual void MCCOMAPI DrawInstances (const TRenderableAndTfmArray &instances)
virtual MCErr MCCOMAPI PostDraw ()
virtual MCCOMErr MCCOMAPI DrawOnScreen (void *awnd, const TMCRect &windowContentRect, const TMCRect &windowUpdateRect)
virtual MCCOMErr MCCOMAPI DrawInGC (IMCGraphicContext *gc, const TMCRect &windowContentRect, const TMCRect &windowUpdateRect)
virtual void MCCOMAPI SetRenderingMode (const InteractiveSettings::ERenderMode renderingMode)
virtual uint32 MCCOMAPI GetRenderingMode ()
virtual void MCCOMAPI GetRenderingModeIDs (TMCArray< ResourceID > &renderingModes)
virtual void MCCOMAPI SetRenderActivity (const InteractiveSettings::ERenderActivity renderActivity)
virtual void MCCOMAPI Set2DZoomAndPan (const TVector2 &zoom, const TVector2 &pan)
virtual void MCCOMAPI Dehydrate ()
virtual void MCCOMAPI Rehydrate ()
virtual MCCOMErr MCCOMAPI PreDrawChannels (TMCPixelBucket *colorChannel, TMCPixelBucket *depthChannel, TMCPixelBucket *objectChannel, const boolean useAverageZ)
virtual boolean MCCOMAPI MustDrawInSeparateWindow ()
virtual void PrepareToDestroy ()
virtual void MCCOMAPI SetPlaneImage (TMCPixelBucket *bucket, TMCPoint &startPoint)

Detailed Description

Basic Renderer Box class. Derive from this for a default implementation of I3DExRendererBox
See also:
I3DExRendererBox


Member Function Documentation

virtual uint32 MCCOMAPI TBasicRendererBox::AddRef (   )  [inline, virtual]
 

Increments the reference count of the object

Reimplemented from TBasicUnknown.

virtual void MCCOMAPI TBasicRendererBox::Clone (  IExDataExchanger **  dataExchanger,
IMCUnknown *  pUnkOuter
)  [inline, virtual]
 

Reimplemented from TBasicDataExchanger.

virtual MCCOMErr MCCOMAPI TBasicRendererBox::CopyComponentExtraData (  IExDataExchanger *  dest  )  [inline, virtual]
 

Reimplemented from TBasicDataExchanger.

virtual void MCCOMAPI TBasicRendererBox::Dehydrate (   )  [virtual]
 

Free all render buffers to dehydrate InteractiveRenderer when it's not activated

Implements I3DExRendererBox.

virtual void MCCOMAPI TBasicRendererBox::DeleteRenderableCache (  I3DShRenderable &  renderable  )  [virtual]
 

Delete a single renderable cache

Parameters:
renderable : the renderable whose cache should be deleted

Implements I3DExRendererBox.

virtual MCCOMErr MCCOMAPI TBasicRendererBox::DrawInGC (  IMCGraphicContext *  gc,
const TMCRect &  windowContentRect,
const TMCRect &  windowUpdateRect
)  [virtual]
 

Update the screen without rerendering

Parameters:
gc: graphic context where the rendering should be blitted
windowContentRect: Rectangle of the window content
windowUpdateRect: Rectangle that needs to be updated
Returns:
MC_S_OK if the blit succeeded

Implements I3DExRendererBox.

virtual void MCCOMAPI TBasicRendererBox::DrawInstances (  const TRenderableAndTfmArray &  instances  )  [virtual]
 

Render the instances (should be called after PreDraw())

Parameters:
instances : array of renderables that needs to be drawn

Implements I3DExRendererBox.

virtual MCCOMErr MCCOMAPI TBasicRendererBox::DrawOnScreen (  void *  awnd,
const TMCRect &  windowContentRect,
const TMCRect &  windowUpdateRect
)  [virtual]
 

This is an opportunity for the renderer to update the screen without re-rendering

Parameters:
awnd: Window where the rendering should be blitted.
windowContentRect: Rectangle of the window content
windowUpdateRect: Rectangle that needs to be updated
Returns:
MC_S_OK if the blit succeeded

Implements I3DExRendererBox.

virtual MCCOMErr MCCOMAPI TBasicRendererBox::ExtensionDataChanged (   )  [inline, virtual]
 

Reimplemented from TBasicDataExchanger.

virtual MCCOMErr MCCOMAPI TBasicRendererBox::GetParameter (  IDType  keyword,
void *  parameter
)  [inline, virtual]
 

Reimplemented from TBasicDataExchanger.

virtual uint32 MCCOMAPI TBasicRendererBox::GetRenderingMode (   )  [virtual]
 

Returns the current rendering mode

Returns:
the current rendering mode

Implements I3DExRendererBox.

virtual void MCCOMAPI TBasicRendererBox::GetRenderingModeIDs (  TMCArray< ResourceID > &  renderingModes  )  [virtual]
 

Returns the different rendering modes

Parameters:
renderingModes: returns the list of rendering modes supported by this rendering

Implements I3DExRendererBox.

virtual int16 MCCOMAPI TBasicRendererBox::GetResID (   )  [inline, virtual]
 

Reimplemented from TBasicDataExchanger.

virtual MCCOMErr MCCOMAPI TBasicRendererBox::HandleEvent (  MessageID  message,
IMFResponder *  source,
void *  data
)  [inline, virtual]
 

Reimplemented from TBasicDataExchanger.

virtual MCCOMErr MCCOMAPI TBasicRendererBox::InitComponent (   )  [inline, virtual]
 

Reimplemented from TBasicDataExchanger.

virtual boolean MCCOMAPI TBasicRendererBox::IsEqual (  IExDataExchanger *  otherDataExchanger  )  [inline, virtual]
 

Reimplemented from TBasicDataExchanger.

virtual boolean MCCOMAPI TBasicRendererBox::MustDrawInSeparateWindow (   )  [inline, virtual]
 

Tells the application if the renderer needs to draw in its own platform window

Returns:
True if the renderer needs to draw in its own platform window

Implements I3DExRendererBox.

virtual MCErr MCCOMAPI TBasicRendererBox::PostDraw (   )  [virtual]
 

Finishes the rendering (should be called after DrawInstances())

Implements I3DExRendererBox.

virtual void MCCOMAPI TBasicRendererBox::PreDraw (  void *  awnd,
const TMCRect &  windowContentRect,
const TMCRect &  windowUpdateRect
)  [virtual]
 

Called at the beginning of the rendering

Parameters:
awnd : pointer to a system window ( specific to the platform )
windowContentRect : rectangle corresponding to the content of the window
windowUpdateRect : rectangle that needs to be rendered

Implements I3DExRendererBox.

virtual MCCOMErr MCCOMAPI TBasicRendererBox::PreDrawChannels (  TMCPixelBucket *  colorChannel,
TMCPixelBucket *  depthChannel,
TMCPixelBucket *  objectChannel,
const boolean  useAverageZ
)  [virtual]
 

An optional call that the default interactive renderer supports. The caller supplies pixel buckets to render channel data from the renderer into. Only two channels at a time, so multiple passes may be required to generate the various channels. This call is followed with DrawInstances, PostDraw.

Note:
This call is only supported by software renderers
Parameters:
colorChannel: A pointer to the bucket where the color channel must be stored (can be NULL)
depthChannel: A pointer to the bucket where the depth channel must be stored (can be NULL)
objectChannel: A pointer to the bucket where the object channel must be stored (can be NULL)
useAverageZ: If true the depth channel will be filled with the average value of z

Implements I3DExRendererBox.

virtual void TBasicRendererBox::PrepareToDestroy (   )  [virtual]
 

Called by the shell to notify the renderer that it is not going to be used anymore. This allow the renderer to delete caches and references to windows or context.

Implements I3DExRendererBox.

virtual MCErr MCCOMAPI TBasicRendererBox::QueryInterface (  const MCIID &  riid,
void **  ppvObj
)  [virtual]
 

Check if the object supports a given interface and returns a pointer to that interface if it does. Note that QueryInterface will increment the reference count of the object by one if the interface is found.

Parameters:
riid GUID of the interface
ppvObj A pointer to the pointer being returned.

Reimplemented from TBasicDataExchanger.

virtual void MCCOMAPI TBasicRendererBox::Rehydrate (   )  [virtual]
 

Called when the renderer must be active again

Implements I3DExRendererBox.

virtual void MCCOMAPI TBasicRendererBox::Set2DZoomAndPan (  const TVector2 &  zoom,
const TVector2 &  pan
)  [virtual]
 

Sets the zoom and pan

Parameters:
zoom: the zoom to be set
pan: the pan to be set

Implements I3DExRendererBox.

virtual void MCCOMAPI TBasicRendererBox::SetCamera (  I3DShCamera *  camera,
const TBBox2D &  viewPane
)  [virtual]
 

Called by the 3D database to inform the renderer that the rendering camera changed

Parameters:
camera: The camera used for the rendering
viewPane: The coordinates of the view pane (be careful this is not in camera coordinates! You need to apply the zoom and pan to the camera coordinates).

Implements I3DExRendererBox.

virtual MCCOMErr MCCOMAPI TBasicRendererBox::SetParameter (  IDType  keyword,
void *  parameter
)  [inline, virtual]
 

Reimplemented from TBasicDataExchanger.

virtual void MCCOMAPI TBasicRendererBox::SetPlaneImage (  TMCPixelBucket *  bucket,
TMCPoint &  startPoint
)  [inline, virtual]
 

Sets a pointer to an image to be display before display the scene in real time rendering. This image won't be rendered in the final rendering, it's just an helper image.

Note that the Sree software rendere does not support this mode

Parameters:
bucket pointer to the image
point in window where to start the rendering

Implements I3DExRendererBox.

virtual void MCCOMAPI TBasicRendererBox::SetRenderActivity (  const InteractiveSettings::ERenderActivity  renderActivity  )  [virtual]
 

Tell the renderer about the render activity taking place

Parameters:
renderActivity: the rendering activity

Implements I3DExRendererBox.

virtual void MCCOMAPI TBasicRendererBox::SetRenderingMode (  const InteractiveSettings::ERenderMode  renderingMode  )  [virtual]
 

Sets the rendering mode

Parameters:
renderingMode : the new rendering mode

Implements I3DExRendererBox.

virtual void MCCOMAPI TBasicRendererBox::SetScene (  I3DShScene *  scene  )  [virtual]
 

Sets the scene that is going to rendered. (used to get the backdrop)

Parameters:
scene: the scene that is going to be rendered.

Implements I3DExRendererBox.

virtual void MCCOMAPI TBasicRendererBox::SetWorkingBox (  IWorkingBox *  workingBox  )  [virtual]
 

To set the working box information, don't forget to invalidate renderer if it changes

Parameters:
workingBox : a pointer to the working box (can be NULL)

Implements I3DExRendererBox.


The documentation for this class was generated from the following file:
Generated on Mon Mar 14 12:29:07 2005 for Carrara SDK Doc by  doxygen 1.3.9.1