Public Member Functions | |
virtual MCErr MCCOMAPI | QueryInterface (const MCIID &riid, void **ppvObj) |
virtual uint32 MCCOMAPI | AddRef () |
virtual void MCCOMAPI | Clone (IExDataExchanger **clonedObject, 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 MCCOMErr MCCOMAPI | SimpleHandleEvent (MessageID message, IMFResponder *source, void *data) |
virtual void MCCOMAPI | GetUIHandler (TUIHandlerFunctionPtr &outHandler) |
virtual int16 MCCOMAPI | GetResID () |
virtual int16 MCCOMAPI | GetMiniPartID () |
virtual MCCOMErr MCCOMAPI | OverridesMiniPartID () |
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 (SystWindowPtr awnd, const TMCRect &windowContentRect, const TMCRect &windowUpdateRect) |
virtual void MCCOMAPI | DrawInstances (const TRenderableAndTfmArray &instances, const TRenderable2DArray &renderables2D) |
virtual MCErr MCCOMAPI | PostDraw () |
virtual MCCOMErr MCCOMAPI | DrawOnScreen (SystWindowPtr 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) |
Basic Renderer Box class. Derive from this for a default implementation of I3DExRendererBox
virtual uint32 MCCOMAPI TBasicRendererBox::AddRef | ( | ) | [inline, virtual] |
Increments the reference count of the object
Reimplemented from TBasicDataExchanger.
virtual void MCCOMAPI TBasicRendererBox::Clone | ( | IExDataExchanger ** | clonedObject, | |
IMCUnknown * | pUnkOuter | |||
) | [inline, virtual] |
Creates a copy of an external component. You only need to implement this method if your object has data that are not stored in its Parameter Map (Pmap).
clonedObject | : the resulting copy of the current object | |
pUnkOuter | : the internal component that needs to be linked to your object (call SetControllingUnknown(pUnkOuter) on the clone) |
Reimplemented from TBasicDataExchanger.
virtual MCCOMErr MCCOMAPI TBasicRendererBox::CopyComponentExtraData | ( | IExDataExchanger * | dest | ) | [inline, virtual] |
Some components can contain data that aren't part of its pMap but need to copy during the Undo/Redo action for example. Implement this method to copy these "outside the pmap" data. Typicaly, it should copy the extra data that are cloned in the Clone method implementation.
dest | The component where the date should be copied. |
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
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
gc,: | graphic context where the rendering should be blitted | |
windowContentRect,: | Rectangle of the window content | |
windowUpdateRect,: | Rectangle that needs to be updated |
Implements I3DExRendererBox.
virtual void MCCOMAPI TBasicRendererBox::DrawInstances | ( | const TRenderableAndTfmArray & | instances, | |
const TRenderable2DArray & | renderables2D | |||
) | [virtual] |
Render the instances (should be called after PreDraw())
instances | : array of renderables that needs to be drawn | |
renderables2D | : array of renderables 2D that needs to be drawn |
Implements I3DExRendererBox.
virtual MCCOMErr MCCOMAPI TBasicRendererBox::DrawOnScreen | ( | SystWindowPtr | awnd, | |
const TMCRect & | windowContentRect, | |||
const TMCRect & | windowUpdateRect | |||
) | [virtual] |
This is an opportunity for the renderer to update the screen without re-rendering
awnd,: | Window where the rendering should be blitted. | |
windowContentRect,: | Rectangle of the window content | |
windowUpdateRect,: | Rectangle that needs to be updated |
Implements I3DExRendererBox.
virtual MCCOMErr MCCOMAPI TBasicRendererBox::ExtensionDataChanged | ( | ) | [inline, virtual] |
Called each time a parameter of the parameter map (Pmap) is modified. This should only be used to invalidate caches and should be quick since it can be called many times.
Reimplemented from TBasicDataExchanger.
virtual int16 MCCOMAPI TBasicRendererBox::GetMiniPartID | ( | ) | [inline, virtual] |
Returns the resource ID of the NodePart used for the MiniPart of the component.
If you want this value to be used, implement OverridesMiniPartID.
Reimplemented from TBasicDataExchanger.
virtual MCCOMErr MCCOMAPI TBasicRendererBox::GetParameter | ( | IDType | keyword, | |
void * | parameter | |||
) | [inline, virtual] |
Returns the value of a given parameter of this dataExchanger. This function is called when the shell cannot find the given parameter in the Parameter Map (Pmap) of the component You need to implement this method only if your object has parameters that are not inside the parameter map.
keyword | The ID of the parameter. | |
parameter | A pointer to buffer where the value of the parameter can be copied. |
Reimplemented from TBasicDataExchanger.
virtual uint32 MCCOMAPI TBasicRendererBox::GetRenderingMode | ( | ) | [virtual] |
virtual void MCCOMAPI TBasicRendererBox::GetRenderingModeIDs | ( | TMCArray< ResourceID > & | renderingModes | ) | [virtual] |
Returns the different rendering modes
renderingModes,: | returns the list of rendering modes supported by this rendering |
Implements I3DExRendererBox.
virtual int16 MCCOMAPI TBasicRendererBox::GetResID | ( | ) | [inline, virtual] |
Returns the resource ID of the NodePart used for the properties of the component.
Return 0 to use the default node id (the same number than the one used for the 'COMP' resource). This is the default.
Return -1 if you want an auto pmap (very rarely needed)
Each implementation MUST always return the same value !
Reimplemented from TBasicDataExchanger.
virtual void MCCOMAPI TBasicRendererBox::GetUIHandler | ( | TUIHandlerFunctionPtr & | outHandler | ) | [inline, virtual] |
Returns a static function that handles complex ui events. That function is allowed to change the UI, but it must take into account all the components and use the multivalue mode for parts.
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] |
Set the data of a component to their default value Returns kNotImplementedError if not implemented, MC_S_OK otherwise.
Reimplemented from TBasicDataExchanger.
virtual boolean MCCOMAPI TBasicRendererBox::IsEqual | ( | IExDataExchanger * | otherDataExchanger | ) | [inline, virtual] |
Returns true if the two pointers are referring to the same data exchanger. When IsEqual is called you can assume that otherDataExchanger is of the same type as "this"
otherDataExchanger | the extension to which it will be compared |
Reimplemented from TBasicDataExchanger.
virtual boolean MCCOMAPI TBasicRendererBox::MustDrawInSeparateWindow | ( | ) | [inline, virtual] |
Tells the application if the renderer needs to draw in its own platform window
Implements I3DExRendererBox.
virtual MCCOMErr MCCOMAPI TBasicRendererBox::OverridesMiniPartID | ( | ) | [inline, virtual] |
Returns the resource ID of the NodePart used for the properties of the component.
Return MC_E_NOTIMPL to use the default node id (the same number than the one used for the 'COMP' resource). This is the default.
Return MC_S_OK if you want to use the ID from GetMiniPartID.
Reimplemented from TBasicDataExchanger.
virtual MCErr MCCOMAPI TBasicRendererBox::PostDraw | ( | ) | [virtual] |
Finishes the rendering (should be called after DrawInstances())
Implements I3DExRendererBox.
virtual void MCCOMAPI TBasicRendererBox::PreDraw | ( | SystWindowPtr | awnd, | |
const TMCRect & | windowContentRect, | |||
const TMCRect & | windowUpdateRect | |||
) | [virtual] |
Called at the beginning of the rendering
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.
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.
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
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
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] |
Sets the value of a parameter. You need to implement this method only if your object has parameters that are not inside the parameter map.
keyword | The ID of the parameter. | |
parameter | A pointer to buffer where the value of the parameter can be copied. |
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
bucket | pointer to the image | |
startPoint | 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
renderActivity,: | the rendering activity |
Implements I3DExRendererBox.
virtual void MCCOMAPI TBasicRendererBox::SetRenderingMode | ( | const InteractiveSettings::ERenderMode | renderingMode | ) | [virtual] |
Sets the rendering mode
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)
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
workingBox | : a pointer to the working box (can be NULL) |
Implements I3DExRendererBox.
virtual MCCOMErr MCCOMAPI TBasicRendererBox::SimpleHandleEvent | ( | MessageID | message, | |
IMFResponder * | source, | |||
void * | data | |||
) | [inline, virtual] |
Replaces the deprecated HandleEvent ONLY IN SIMPLE CASES. This function MUST NOT change the user interface (its called for every selected component). Example of allowed use : if (source && (source->GetInstanceID() == 'shfl')) { fPMap.fSeed = gShellUtilities->TickCount(); ExtensionDataChanged(); }
message,: | the ID of the message being sent (All MessageIDs are preceeded with "kMsg") | |
source,: | the part that sent the message (can be NULL !) | |
data,: | a pointer to private data corresponding to the message |
Reimplemented from TBasicDataExchanger.