IPreviewMaker Struct Reference
[Shell Interfaces]
List of all members.
Classes |
struct | TRenderingQuality |
| Used to specify rendering quality of a preview. More...
|
Public Types |
enum | { kFlatMode,
kSphereMode,
kObjectMode,
kSceneMode
} |
Public Member Functions |
virtual void MCCOMAPI | SetTemplateScene (I3DShScene *scene, boolean fitIntoBBox, const TBBox3D &bbox)=0 |
virtual void MCCOMAPI | SetSceneToPreview (I3DShScene *scene)=0 |
virtual void MCCOMAPI | SetPreviewMode (int16 previewMode)=0 |
virtual void MCCOMAPI | SetMasterShader (I3DShMasterShader *master, boolean withDisplacement=false)=0 |
virtual void MCCOMAPI | SetCamera (I3DShCamera *camera)=0 |
virtual void MCCOMAPI | SetObjectToPreview (I3DShObject *object, const TVector3 &xyzScaling)=0 |
virtual void MCCOMAPI | SetObjectRotation (const TMatrix33 &matrix)=0 |
virtual void MCCOMAPI | SetRenderingCallbacks (I3DRenderingCallbacks *callback)=0 |
virtual void MCCOMAPI | SetTiling (uint32 width, uint32 height)=0 |
virtual void MCCOMAPI | SetUseDefaultBackgroundColor (boolean useIt)=0 |
virtual void MCCOMAPI | SetAutoFraming (boolean isAuto)=0 |
virtual int16 MCCOMAPI | GetPreviewMode ()=0 |
virtual I3DShMasterShader *MCCOMAPI | GetMasterShaderNoAddRef ()=0 |
virtual I3DShCamera *MCCOMAPI | GetCameraNoAddRef ()=0 |
virtual I3DShScene *MCCOMAPI | GetSceneNoAddRef ()=0 |
virtual I3DShInstance *MCCOMAPI | GetObjectInstanceNoAddRef ()=0 |
virtual void MCCOMAPI | InitPreviewer ()=0 |
virtual void MCCOMAPI | Reset ()=0 |
virtual void MCCOMAPI | RenderPreview (TMCPixelBucket &outBucket, const TRenderingQuality &renderingQuality, TMCRect *rect=NULL, TRenderArea *inZone=NULL, boolean withAlphaChannel=true, int32 synchThreadID=0)=0 |
virtual void MCCOMAPI | AbortRendering ()=0 |
virtual void MCCOMAPI | CopyFromRasterlayerToBucket (TMCPixelBucket &outBucket, const TMCRect &area)=0 |
virtual void MCCOMAPI | SetObjectHotPoint (const TVector3 &hotPoint)=0 |
Detailed Description
Interface for a preview maker, used for generating scene previews. Use I3DShUtilities::CreatePreviewMaker() to create it, then use to draw previews.
Member Enumeration Documentation
- Enumerator:
kFlatMode |
|
kSphereMode |
|
kObjectMode |
|
kSceneMode |
|
Member Function Documentation
virtual void MCCOMAPI IPreviewMaker::AbortRendering |
( |
|
) |
[pure virtual] |
Abort the rendering of the preview
virtual void MCCOMAPI IPreviewMaker::CopyFromRasterlayerToBucket |
( |
TMCPixelBucket & |
outBucket, |
|
|
const TMCRect & |
area | |
|
) |
| | [pure virtual] |
Copy a part of the already calculated preview.
- Parameters:
-
| outBucket | a bucket to store the result |
| area | the area to get from the preview. |
virtual I3DShCamera* MCCOMAPI IPreviewMaker::GetCameraNoAddRef |
( |
|
) |
[pure virtual] |
Get a link to the active camera of the preview scene
- Returns:
- the camera.
virtual I3DShMasterShader* MCCOMAPI IPreviewMaker::GetMasterShaderNoAddRef |
( |
|
) |
[pure virtual] |
Get a link to the master shader of the object previewed
- Returns:
- the mastershader.
virtual I3DShInstance* MCCOMAPI IPreviewMaker::GetObjectInstanceNoAddRef |
( |
|
) |
[pure virtual] |
Get a link to the instance of the preview object
- Returns:
- the instance of the object.
virtual int16 MCCOMAPI IPreviewMaker::GetPreviewMode |
( |
|
) |
[pure virtual] |
Get the preview mode (flat, sphere, object or scene)
- Returns:
- the preview mode: kFlatMode, kSphereMode, kObjectMode or kSceneMode
virtual I3DShScene* MCCOMAPI IPreviewMaker::GetSceneNoAddRef |
( |
|
) |
[pure virtual] |
Get a link to the preview scene.
- Returns:
- the preview scene. Return the template scene if not in kSceneMode
virtual void MCCOMAPI IPreviewMaker::InitPreviewer |
( |
|
) |
[pure virtual] |
Should be call after all the settings have been set and befor the render.
Renders a preview of the scene
- Parameters:
-
| outBucket | the resulting preview |
| renderingQuality | defines the quality of the rendering (antialiasing, shadows...) |
| rect | reserved |
| inZone | the zone to render |
| withAlphaChannel | render also the alpha channel |
| synchThreadID | id of the thread we are in, ( 0 will always work....) |
virtual void MCCOMAPI IPreviewMaker::Reset |
( |
|
) |
[pure virtual] |
reset the position of the object. Should not be called in kSceneMode
virtual void MCCOMAPI IPreviewMaker::SetAutoFraming |
( |
boolean |
isAuto |
) |
[pure virtual] |
Autoframing will move camera for the object to fit in the view.
- Parameters:
-
| isAuto | if True set autoframing. |
virtual void MCCOMAPI IPreviewMaker::SetCamera |
( |
I3DShCamera * |
camera |
) |
[pure virtual] |
Set the camera from where we want to see the preview scene.
- Parameters:
-
| camera | The camera. (must be in the preview scene). |
virtual void MCCOMAPI IPreviewMaker::SetMasterShader |
( |
I3DShMasterShader * |
master, |
|
|
boolean |
withDisplacement = false | |
|
) |
| | [pure virtual] |
Set the master shader on the object of the preview
- Parameters:
-
| master | the master shader. |
| withDisplacement | If true object will use the displacement shader of the master shader. |
virtual void MCCOMAPI IPreviewMaker::SetObjectHotPoint |
( |
const TVector3 & |
hotPoint |
) |
[pure virtual] |
Set the hot point the object in the preview scene.
- Parameters:
-
| hotPoint | the hot point vector |
virtual void MCCOMAPI IPreviewMaker::SetObjectRotation |
( |
const TMatrix33 & |
matrix |
) |
[pure virtual] |
Rotate the object in the preview scene.
- Parameters:
-
| matrix | the rotatin matrix |
virtual void MCCOMAPI IPreviewMaker::SetObjectToPreview |
( |
I3DShObject * |
object, |
|
|
const TVector3 & |
xyzScaling | |
|
) |
| | [pure virtual] |
Set the object to preview (for kObjectMode)
- Parameters:
-
| object | the object. |
| xyzScaling | the non-uniform scaling of the object. |
virtual void MCCOMAPI IPreviewMaker::SetPreviewMode |
( |
int16 |
previewMode |
) |
[pure virtual] |
Set the preview mode (flat, sphere, object or scene)
- Parameters:
-
| previewMode | kFlatMode, kSphereMode, kObjectMode or kSceneMode |
virtual void MCCOMAPI IPreviewMaker::SetRenderingCallbacks |
( |
I3DRenderingCallbacks * |
callback |
) |
[pure virtual] |
Set the rendering call backs if they should be different than standard ones.
- Parameters:
-
| callback | the callback to use after finishing each tile. |
virtual void MCCOMAPI IPreviewMaker::SetSceneToPreview |
( |
I3DShScene * |
scene |
) |
[pure virtual] |
Set the scene to preview (for kSceneMode)
- Parameters:
-
virtual void MCCOMAPI IPreviewMaker::SetTemplateScene |
( |
I3DShScene * |
scene, |
|
|
boolean |
fitIntoBBox, |
|
|
const TBBox3D & |
bbox | |
|
) |
| | [pure virtual] |
Set the template scene to use for the preview (for other than kSceneMode)
- Parameters:
-
| scene | The template scene to use. It must contains an instance named "Object", this instance will be used when you set the object to preview. |
| fitIntoBBox | If true, after replacing the object of the instance "Object", the bounding box of this instance will remain the same. |
| bbox | If fitIntoBBox is true, set the bounding box of the object. |
virtual void MCCOMAPI IPreviewMaker::SetTiling |
( |
uint32 |
width, |
|
|
uint32 |
height | |
|
) |
| | [pure virtual] |
Set the width and height of the tiles
- Parameters:
-
| width | the width of one tile in pixels. |
| height | the height of one tile in pixels. |
virtual void MCCOMAPI IPreviewMaker::SetUseDefaultBackgroundColor |
( |
boolean |
useIt |
) |
[pure virtual] |
Specify if the preview is to use the default background color or not
- Parameters:
-
| useIt | If true the preview will use the background color. |
The documentation for this struct was generated from the following file: