ViewPort Class Reference

#include <viewport.h>

Class Description

Represents the 3D viewport where Mudbox renders the scene.

This class provides access to 3D rendering related functions and events. To get a pointer to the current Mudbox viewport, call Kernel()->ViewPort().

Definition at line 147 of file viewport.h.

+ Inheritance diagram for ViewPort:

Public Types

enum  RedrawType { eFull, eArea, eOverlayOnly }
 This type controls the behaviour of the Redraw function, used as a parameter there. More...
 
enum  SceneRenderMode {
  srmNormal = 0, srmFlatTexturesOnBlack, srmFlatTexturesOnWhite, srmFlatNoTextures,
  srmNoTextures
}
 Describes how to render the scene off-screen with RenderScene. More...
 
enum  MirrorPlanePreviewMode {
  mppOff = 0, mppX, mppY, mppZ,
  mppLocalX, mppLocalY, mppLocalZ
}
 Describes possible states for the Mirror Plane Preview. More...
 
enum  MirrorDirectionPreviewMode { mdpOff = 0, mdpToPositive, mdpToNegative }
 Describes possible states for the Mirror Direction Preview. More...
 
- Public Types inherited from Node
enum  DiagnosticLevel { dgnLevel1, dgnLevel2, dgnLevel3 }
 Indicates the level of validity checking that is performed in CheckValidity() More...
 

Public Member Functions

virtual unsigned int FilterCount (void) const
 Returns the number of ViewPortFilters associated with this ViewPort. More...
 
virtual ViewPortFilterFilter (unsigned int iIndex) const
 Returns a pointer to a ViewPortFilter associated with this ViewPort. More...
 
virtual void AddFilter (ViewPortFilter *pFilter)
 Associates a ViewPortFilter with this ViewPort. More...
 
virtual void RemoveFilter (unsigned int iIndex)
 Removes a ViewPortFilter that was associated with this ViewPort. The filter is not deleted. More...
 
void LockFilterCalibration (bool bLocked)
 Locks/unlocks the calibration of all viewport filters associated with this ViewPort. (See ViewPortFilter::LockCalibration()) More...
 
virtual void SaveScreenshot (const QString &sFileName) const
 Saves a snapshot of the current viewport to the given image file name. More...
 
virtual int Width (void)
 Returns the width of the ViewPort in pixels. More...
 
virtual int Height (void)
 Returns the height of the ViewPort in pixels. More...
 
class ImagePlaneInterfaceActiveImagePlane ()
 Returns the current image plane. More...
 
virtual float CursorXPosition (void) const
 Returns the current cursor horizontal position inside the viewport in the 0-1 range. More...
 
virtual float CursorYPosition (void) const
 Returns the current cursor vertical position inside the viewport in the 0-1 range. More...
 
const SurfacePointCursorSurfacePoint (bool bMirrored=false) const
 Returns the surface point which is under the cursor. More...
 
unsigned int LayerCount (void) const
 This is the same as FilterCount() More...
 
class LayerLayer (unsigned int iLayerIndex) const
 This is the same as Filter() More...
 
void UnlinkLayer (class Layer *pLayer)
 This is the same as RemoveFilter() More...
 
class LayerCreateLayer (void)
 Returns a new ViewPortFilter. More...
 
void AddLayer (class Layer *pLayer)
 This is the same as AddFilter() More...
 
class LayerActiveLayer (void) const
 Returns a pointer to the active layer (filter). That is, the one last clicked on by the user. More...
 
void SetActiveLayer (class Layer *pLayer)
 Set a layer (filter) to be the active one. More...
 
ViewPortFilter::RequirementValue ViewPortFilterRequirements (void) const
 Returns the combined requirements of all visible ViewPortFilters associated with this ViewPort. More...
 
void Redraw (RedrawType eType=eFull, float fXStart=0, float fYStart=0, float fXEnd=0, float fYEnd=0)
 Calling this function will redraw the viewport. More...
 
ImageRenderScene (const QString &sChannel, int iWidth, int iHeight, SceneRenderMode renderMode, enum Image::Format fmt=Image::e8integer, bool bTiledImg=true)
 Renders the scene, and returns it in an image. More...
 
ImageRenderScene (int iWidth, int iHeight, SceneRenderMode renderMode, enum Image::Format fmt=Image::e8integer, bool bTiledImg=true)
 Renders the scene, and returns it in an image. More...
 
ImageRenderScene (int iWidth, int iHeight, enum Image::Format fmt=Image::e8integer, bool bTiledImg=true) const
 Renders the scene, including background and post-process filters, and returns it in an image. More...
 
void SetMirrorPlanePreview (MirrorPlanePreviewMode newMode, float offset=0.0)
 Controls the display of the Mirror Plane Preview. More...
 
MirrorPlanePreviewMode MirrorPlanePreview (void) const
 Returns the current Mirror Plane Preview Mode. More...
 
float MirrorPlanePreviewOffset (void) const
 Returns the current Mirror Plane Preview Offset. More...
 
void SetMirrorDirectionPreview (MirrorDirectionPreviewMode newMode)
 Sets mirror direction preview mode. More...
 
MirrorDirectionPreviewMode MirrorDirectionPreview (void) const
 Returns mirror direction preview mode. More...
 
virtual struct ViewPortState ViewPortState (void)
 Returns the viewport state structure. More...
 
virtual bool ShowCurves (void) const
 Returns true if curves are being rendered in this viewport. False otherwise. More...
 
- Public Member Functions inherited from LayerContainer
virtual unsigned int LayerIndex (const class Layer *pLayer) const
 Returns the index of the specified layer in the container. If the layer in not in the container, either -1 or a value equal to LayerCount() will be returned. More...
 
virtual void MoveLayer (class Layer *pLayer, class Layer *pWhere, bool bBefore)
 Moves the layer before or after the specified one in the list. More...
 
virtual void ReparentLayer (class Layer *pLayer, class Layer *pParent)
 Makes this layer as a child of another one. More...
 
virtual class LayerBaseLayer (void) const
 Returns the base layer. More...
 
virtual unsigned int LayerGroupCount (void) const
 Returns the number of layer groups in the container. More...
 
virtual class LayerGroupLayerGroup (unsigned int iLayerGroupIndex) const
 Returns a pointer to the layer group based on the index. More...
 
virtual class LayerGroupLayerGroup (class Layer *pLayer) const
 Returns the layer group the given layer belong to. More...
 
virtual class LayerGroupAddLayerGroup (const QString &sName)
 Adds a new group to the container. More...
 
virtual void AddLayerGroup (class LayerGroup *pLayerGroup)
 Adds a new layer group to the container. More...
 
virtual void RemoveLayerGroup (class LayerGroup *pLayerGroup)
 Remove and delete the layer group, layers associated with this group are not removed from the container. More...
 
virtual void UpdateLayerToGroup (class Layer *pLayer, class LayerGroup *pLayerGroup)
 Moves this layer into the group, if the layer is associated to another group, this layer will be disconnected from that group first. More...
 
virtual class LayerGroupActiveLayerGroup (void) const
 Returns the pointer points to the active layer group. More...
 
virtual void SetActiveLayerGroup (class LayerGroup *pLayerGroup)
 Set the active layer group, actve layer will be set to 0 if pLayerGroup != 0. More...
 
virtual void Serialize (Stream &s)
 Reads/writes this object to/from a data stream. More...
 
- Public Member Functions inherited from TreeNode
 TreeNode (void)
 
 ~TreeNode (void)
 
virtual void AddChild (TreeNode *pChild, bool bFirst=false) const
 Adds a node/subtree to the list of children. The added node will be removed from the current parent if it has one. More...
 
virtual void RemoveChild (TreeNode *pChild) const
 Removes a node/subtree from the list of children. More...
 
virtual TreeNodeFirstChild (void) const
 Returns the first node from the child list. More...
 
virtual TreeNodeParent (void) const
 Returns the parent node. More...
 
virtual TreeNodeNextSibling (void) const
 Returns the next linked node with the same parent. More...
 
virtual TreeNodePrevSibling (void) const
 Returns the previous linked node with the same parent. More...
 
virtual void MoveChild (TreeNode *pChild, TreeNode *pAfter)
 Moves the child after the given node in order. More...
 
virtual TreeNodeChildByClass (const ClassDesc *pClass, bool bAutoCreate=true) const
 Returns the first child with the specified type. When the bAutoCreate parameter is true and such a child does not exists, it creates it with the preferred descedant type. More...
 
template<typename type >
typeChildByClass (bool bAutoCreate=true) const
 Same as above, a most confortable version. More...
 
virtual TreeNodeChildByClass (const ClassDesc *pClass, unsigned int iIndex=0) const
 Returns the first child with the specified type, or returns zero if no child found. More...
 
template<typename type >
typeChildByClass (unsigned int iIndex=0) const
 Same as above, a most confortable version. More...
 
virtual void DeleteChildByClass (const ClassDesc *pClass)
 Deletes all child which is derived from a specific class. More...
 
virtual QString Info (void) const
 Returns descriptive information about the node. More...
 
virtual bool Visible (void) const
 Returns if the node is visible. Should be overridden in derived classes. More...
 
virtual void SetVisible (bool b)
 Sets the node visibility Should be overridden in derived classes. More...
 
virtual bool Locked (void) const
 Returns if the node is locked. Should be overridden in derived classes. More...
 
virtual void SetLocked (bool b)
 Sets the locking of the node. Should be overridden in derived classes. More...
 
virtual bool HiddenFromUI (void) const
 Returns true if the node cannot be seen from UI. More...
 
virtual void SetHiddenFromUI (bool b)
 Sets visibility in UI. More...
 
virtual void OnLinked (const TreeNode *pOldParent)
 This function is called then the node is linked to a new parent. More...
 
virtual void CheckValidity (Node::DiagnosticLevel iLevel=dgnLevel2) const
 See the documentation for Node::CheckValidity. More...
 
QString UniqueChildName (const TreeNode *pChild, const QString &sPrefix="") const
 Finds a node name that is unique among the children of this node. More...
 
virtual void SetStringID (const QString &sName)
 This method does the same thing as Node::SetStringID, except it ensures the name is unique among this node's siblings. More...
 
virtual void CopyTo (Node *pNode) const
 
- Public Member Functions inherited from Node
 Node (const QString &sStringID="", const QString &sDisplayName="")
 Standard constructor. More...
 
virtual ~Node (void)
 
virtual void Initialize (void)
 
void LoadTemplate (const QString &sFileName="", bool bStartEvent=false)
 Use an external XML file to initialize the attributes. More...
 
void SaveTemplate (const QString &sFileName="", bool bSaveOnlyVisible=false)
 Save current attributes as an XML template. More...
 
unsigned int Version (void) const
 Returns the current version of the node. This number increases when the content of the node changed (when ContentChanged() called). More...
 
void SetVersion (unsigned int iVersion)
 Sets the current version number for the node. More...
 
unsigned int ReferenceCount (void) const
 Returns the number of pointers referencing this node. More...
 
AttributeReferencePointer (unsigned int iIndex) const
 Returns the address of an attribute which refers to this node. The type of the attribute is always aptr. More...
 
NodeReferenceNode (unsigned int iIndex) const
 Returns the address of a node referencing this node. More...
 
virtual QString Name (const ClassDesc *pClass=0) const
 Deprecated. More...
 
virtual void SetName (const QString &sName)
 Deprecated. More...
 
virtual QString StringID (const ClassDesc *pClass=0) const
 Returns the string id of the node. More...
 
virtual QString DisplayName (void) const
 Returns the display name of the node. More...
 
virtual void SetDisplayName (const QString &sDisplayName)
 Sets the display name of the node. More...
 
virtual QString HelpID (void) const
 Returns the help entry id of the node. Can be overwritten in derived classes. More...
 
virtual void SetHelpID (const QString &sHelpID)
 Sets the help entry id of the node. More...
 
void Annex (Node *pSource, const QString &sCategory="")
 Relink all the attributes of the source node to this one. More...
 
bool IsKindOf (const ClassDesc *pClass) const
 Returns true if this node is derived from the pClass class. More...
 
void ContentChanged (void) const
 This function must be called if the content of the node is changed. More...
 
virtual NodeDuplicate (void) const
 
virtual void OnNodeEvent (const Attribute &cAttribute, NodeEventType cType)
 This function is called if an event occurs with any of the attributes of the node. More...
 
virtual void OnEvent (const EventGate &cEvent)
 This function is called when a generic event occurs. See EventGate class. More...
 
void RequestDeferredEvent (Attribute &cAttribute)
 Request for a deferred event, which will occur only in the main loop. More...
 
unsigned int AttributeCount (void) const
 Returns the number of attributes owned by the node. More...
 
AttributeAttributeByIndex (int iIndex) const
 Returns a specified attribute (or 0 if iIndex is greater than the number of attributes). More...
 
AttributeAttributeByName (const QString &sName) const
 Returns a specified attribute by its name. Returns 0 if the attribute not found. More...
 
AttributeAttributeByID (const QString &sID) const
 Returns a specified attribute by its ID. Returns 0 if the attribute not found. More...
 
void SetAttributeValue (const QString &sAttributeID, const QString &sNewValue)
 Set the value of an attribute from a string. More...
 
QString AttributeValue (const QString &sAttributeID) const
 Returns the current value of an attribute as a string. More...
 
void LogAttributes (void) const
 Write all attributes into the log file. More...
 
virtual QWidgetCreatePropertiesWindow (QWidget *pParent)
 Create a window which displays the attributes of the node. Can be overriden to provide a custom interface. More...
 
AttributeAddAttribute (Attribute::AttributeType type, const QString &id)
 Allows SDK users to add attributes at runtime. More...
 
NodeNext (void) const
 Returns the next node in the chain. Used to enumerate the current nodes. See also First(). More...
 
int ID (void) const
 Returns an ID for the node. The ID is unique in the whole application life. More...
 
bool SetID (int iID)
 Set ID for the node. More...
 

Static Public Attributes

static aevent PreRenderEvent
 This event is triggered when a new frame is about to be drawn. More...
 
static aevent FrameEvent
 This event is triggered when a new frame is displayed on the viewport. See the class EventGate for more details. More...
 
static aevent EndRenderEvent
 This event is triggered when rendering a new image of the scene is finished. See the class EventGate for more details. More...
 
static aevent PostRenderEvent
 This event is triggered at the end of rendering the scene into a rendertarget. More...
 
static aevent MouseMoveEvent
 This event is triggered when a mouse move event occurs inside the viewport. More...
 
static aevent LeftMouseButtonPressEvent
 This event is triggered when left mouse button down occurs. More...
 
static aevent LeftMouseButtonReleaseEvent
 This event is triggered when left mouse button release occurs. More...
 
static aevent ContextMenuEvent
 This event is triggered on context menu (right mouse button) More...
 
static aevent SceneRenderEvent
 This event is triggered after scene is rendered. More...
 
static aevent ViewportResizeEvent
 This event is triggered when viewport's size is changed. More...
 

Protected Member Functions

 ViewPort (void)
 Do not use the constructor directly. More...
 
virtual ImageRenderRegion (ImgTile bounds, ImgTile region, enum Image::Format eFormat, bool bTiled) const
 

Additional Inherited Members

- Static Public Member Functions inherited from Node
static void StartHashing ()
 This is called once in main once static ctors are done. More...
 
static NodeFirst (void)
 This function will return the first node in the memory. Used to enumerate all the current nodes. See also Next(). More...
 
static NodeByID (int iID)
 Returns the node with the specified ID, or zero if such a node does not exists. More...
 
static NodeByName (const QString &sClass, const QString &sName)
 Search for a node with the name sName. More...
 
- Public Attributes inherited from TreeNode
 DECLARE_CLASS
 
- Public Attributes inherited from Node
AttributeThisPointer m_pThis
 
 DECLARE_CLASS
 

Member Enumeration Documentation

enum RedrawType

This type controls the behaviour of the Redraw function, used as a parameter there.

Enumerator
eFull 
eArea 

Schedule a full redraw of the 3d viewport later, ViewPort::Redraw returns immediately when this parameter is used.

eOverlayOnly 

Schedule a redraw of the 3d viewport for the specified area only, ViewPort::Redraw returns immediately when this parameter is used.

Redraws the overlay part of the viewport right away. The 3d content is not redrawn.

Definition at line 249 of file viewport.h.

250  {
251  eFull,
252  eArea,
253  eOverlayOnly
254  };
Schedule a full redraw of the 3d viewport later, ViewPort::Redraw returns immediately when this param...
Definition: viewport.h:252
Schedule a redraw of the 3d viewport for the specified area only, ViewPort::Redraw returns immediatel...
Definition: viewport.h:253

Describes how to render the scene off-screen with RenderScene.

Enumerator
srmNormal 

Renders the scene as it would appear in the interactive viewport.

srmFlatTexturesOnBlack 

flat shaded, textures on black material background, no grids, curves or background

srmFlatTexturesOnWhite 

flat shaded, textures on white material background, no grids, curves or background

srmFlatNoTextures 

flat shaded, no textures, grids, curves or background

srmNoTextures 

flat shading off, textures off, no grids, curves or background

Definition at line 266 of file viewport.h.

266  {
267  srmNormal = 0,
272  };
flat shading off, textures off, no grids, curves or background
Definition: viewport.h:271
flat shaded, no textures, grids, curves or background
Definition: viewport.h:270
Renders the scene as it would appear in the interactive viewport.
Definition: viewport.h:267
flat shaded, textures on white material background, no grids, curves or background ...
Definition: viewport.h:269
flat shaded, textures on black material background, no grids, curves or background ...
Definition: viewport.h:268

Describes possible states for the Mirror Plane Preview.

Enumerator
mppOff 
mppX 
mppY 
mppZ 
mppLocalX 
mppLocalY 
mppLocalZ 

Definition at line 338 of file viewport.h.

Describes possible states for the Mirror Direction Preview.

Enumerator
mdpOff 
mdpToPositive 
mdpToNegative 

Definition at line 349 of file viewport.h.

Constructor & Destructor Documentation

ViewPort ( void  )
protected

Do not use the constructor directly.

It is unlikely that you would ever create your own scene in a plug-in. If you do need to, you should not call the constructor directly. Instead, use CreateInstances, like this:

Viewport *myNewScene = CreateInstance<Viewport>();

Member Function Documentation

virtual unsigned int FilterCount ( void  ) const
virtual

Returns the number of ViewPortFilters associated with this ViewPort.

virtual ViewPortFilter* Filter ( unsigned int  iIndex) const
virtual

Returns a pointer to a ViewPortFilter associated with this ViewPort.

Parameters
[in]iIndexindex of the ViewPortFilter to be returned
virtual void AddFilter ( ViewPortFilter pFilter)
virtual

Associates a ViewPortFilter with this ViewPort.

Parameters
[in]pFiltera pointer to the ViewPortFilter to be added
virtual void RemoveFilter ( unsigned int  iIndex)
virtual

Removes a ViewPortFilter that was associated with this ViewPort. The filter is not deleted.

Parameters
[in]iIndexindex of the ViewPortFilter to be removed
void LockFilterCalibration ( bool  bLocked)

Locks/unlocks the calibration of all viewport filters associated with this ViewPort. (See ViewPortFilter::LockCalibration())

Parameters
[in]bLockedSet this true to lock calibration, and false to unlock it
virtual void SaveScreenshot ( const QString sFileName) const
virtual

Saves a snapshot of the current viewport to the given image file name.

The file type will be determined by the extension of the file name (eg .png, .bmp, .tif).

See also Kernel()->RenderScene() for a more flexible method.

Parameters
[in]sFileNameName of the image file where the screenshot should be saved
virtual int Width ( void  )
virtual

Returns the width of the ViewPort in pixels.

virtual int Height ( void  )
virtual

Returns the height of the ViewPort in pixels.

class ImagePlaneInterface* ActiveImagePlane ( )

Returns the current image plane.

virtual float CursorXPosition ( void  ) const
virtual

Returns the current cursor horizontal position inside the viewport in the 0-1 range.

virtual float CursorYPosition ( void  ) const
virtual

Returns the current cursor vertical position inside the viewport in the 0-1 range.

const SurfacePoint* CursorSurfacePoint ( bool  bMirrored = false) const

Returns the surface point which is under the cursor.

Parameters
[in]bMirroreda bool to determine whether getting the mirrored surface point.
unsigned int LayerCount ( void  ) const
virtual

This is the same as FilterCount()

Reimplemented from LayerContainer.

class Layer* Layer ( unsigned int  iLayerIndex) const
virtual

This is the same as Filter()

Parameters
[in]iLayerIndexindex of the layer (filter) to be returned

Reimplemented from LayerContainer.

void UnlinkLayer ( class Layer pLayer)
virtual

This is the same as RemoveFilter()

Parameters
[in]pLayerindex of the layer (filter) to be removed

Reimplemented from LayerContainer.

class Layer* CreateLayer ( void  )
virtual

Returns a new ViewPortFilter.

Reimplemented from LayerContainer.

void AddLayer ( class Layer pLayer)
virtual

This is the same as AddFilter()

Parameters
[in]pLayera pointer to the layer (filter) to be added

Reimplemented from LayerContainer.

class Layer* ActiveLayer ( void  ) const
virtual

Returns a pointer to the active layer (filter). That is, the one last clicked on by the user.

Reimplemented from LayerContainer.

void SetActiveLayer ( class Layer pLayer)
virtual

Set a layer (filter) to be the active one.

Parameters
[in]pLayera pointer to the layer (filter) to be made active

Reimplemented from LayerContainer.

ViewPortFilter::RequirementValue ViewPortFilterRequirements ( void  ) const

Returns the combined requirements of all visible ViewPortFilters associated with this ViewPort.

void Redraw ( RedrawType  eType = eFull,
float  fXStart = 0,
float  fYStart = 0,
float  fXEnd = 0,
float  fYEnd = 0 
)

Calling this function will redraw the viewport.

Parameters
[in]eTypeThis parameter determined what should be affected by the function. See ViewPort::RedrawType for mode details.
[in]fXStartLeft side of the area which has to be refreshed in the 0-1 intervall. Ignored if eType != eArea.
[in]fYStartTop side of the area which has to be refreshed in the 0-1 intervall. Ignored if eType != eArea.
[in]fXEndRight side of the area which has to be refreshed in the 0-1 intervall. Ignored if eType != eArea.
[in]fYEndUpper side of the area which has to be refreshed in the 0-1 intervall. Ignored if eType != eArea.
Image* RenderScene ( const QString sChannel,
int  iWidth,
int  iHeight,
SceneRenderMode  renderMode,
enum Image::Format  fmt = Image::e8integer,
bool  bTiledImg = true 
)

Renders the scene, and returns it in an image.

Does not include extra things like the HUD or the cursor ring. Returns a pointer to an image object that the scene was rendered into. You can specify the desired size for the rendering, or leave the input variables set to 0 to render at the current screen resolution.

You can also describe a render mode – the different render modes can be used together to extract unprojected textures or extract shading/shadow information.

currently only 8 bit images are supported by this operation Note: Once the image is returned, it is your responsibility to delete it when you are done with it.

Parameters
[in]sChannelthe name of the channel to render
[in]iWidthThe width of the rendering in pixels. Set to 0 to use current screen size.
[in]iHeightThe height of the rendering in pixels. Set to 0 to use current screen size.
renderModedescribes variations on how to render the scene.
[in]fmtDesired image format.
[in]bTiledImghint – true if the resulting image is to be tiled, false if contiguous.
Image* RenderScene ( int  iWidth,
int  iHeight,
SceneRenderMode  renderMode,
enum Image::Format  fmt = Image::e8integer,
bool  bTiledImg = true 
)

Renders the scene, and returns it in an image.

Does not include extra things like the HUD or the cursor ring. Returns a pointer to an image object that the scene was rendered into. You can specify the desired size for the rendering, or leave the input variables set to 0 to render at the current screen resolution.

You can also describe a render mode – the different render modes can be used together to extract unprojected textures or extract shading/shadow information.

currently only 8 bit images are supported by this operation Note: Once the image is returned, it is your responsibility to delete it when you are done with it.

Parameters
[in]iWidthThe width of the rendering in pixels. Set to 0 to use current screen size.
[in]iHeightThe height of the rendering in pixels. Set to 0 to use current screen size.
renderModedescribes variations on how to render the scene.
[in]fmtDesired image format.
[in]bTiledImghint – true if the resulting image is to be tiled, false if contiguous.
Image* RenderScene ( int  iWidth,
int  iHeight,
enum Image::Format  fmt = Image::e8integer,
bool  bTiledImg = true 
) const

Renders the scene, including background and post-process filters, and returns it in an image.

Does not include extra things like the HUD or the cursor ring. Returns a pointer to an image object that the scene was rendered into. You can specify the desired size for the rendering, or leave the input variables set to 0 to render at the current screen resolution.

currently only 8 bit images are supported by this operation Note: Once the image is returned, it is your responsibility to delete it when you are done with it.

Parameters
[in]iWidthThe width of the rendering in pixels. Set to 0 to use current screen size.
[in]iHeightThe height of the rendering in pixels. Set to 0 to use current screen size.
[in]fmtDesired image format.
[in]bTiledImghint – true if the resulting image is to be tiled, false if contiguous.
void SetMirrorPlanePreview ( MirrorPlanePreviewMode  newMode,
float  offset = 0.0 
)

Controls the display of the Mirror Plane Preview.

The Mirror Plane Preview is an on-screen representation of a plane in 3d aligned to a major axis in local or world space. It is sized and positioned based on the active mesh in the scene (if any). It is used during interactions (such as selecting a mirror mode) to help the user visualize which direction is which.

Parameters
[in]newModeWhich plane should be displayed
[in]offsetHow much the plane should be offset from 0.0
MirrorPlanePreviewMode MirrorPlanePreview ( void  ) const

Returns the current Mirror Plane Preview Mode.

float MirrorPlanePreviewOffset ( void  ) const

Returns the current Mirror Plane Preview Offset.

void SetMirrorDirectionPreview ( MirrorDirectionPreviewMode  newMode)

Sets mirror direction preview mode.

MirrorDirectionPreviewMode MirrorDirectionPreview ( void  ) const

Returns mirror direction preview mode.

virtual struct ViewPortState ViewPortState ( void  )
virtual

Returns the viewport state structure.

virtual bool ShowCurves ( void  ) const
virtual

Returns true if curves are being rendered in this viewport. False otherwise.

virtual Image* RenderRegion ( ImgTile  bounds,
ImgTile  region,
enum Image::Format  eFormat,
bool  bTiled 
) const
protectedvirtual

Member Data Documentation

aevent PreRenderEvent
static

This event is triggered when a new frame is about to be drawn.

Definition at line 386 of file viewport.h.

aevent FrameEvent
static

This event is triggered when a new frame is displayed on the viewport. See the class EventGate for more details.

Definition at line 389 of file viewport.h.

aevent EndRenderEvent
static

This event is triggered when rendering a new image of the scene is finished. See the class EventGate for more details.

Definition at line 392 of file viewport.h.

aevent PostRenderEvent
static

This event is triggered at the end of rendering the scene into a rendertarget.

Plugins can use this event to render additional content to the rendertargets, like gizmos or overlays. See the class EventGate for more details.

Definition at line 396 of file viewport.h.

aevent MouseMoveEvent
static

This event is triggered when a mouse move event occurs inside the viewport.

Definition at line 399 of file viewport.h.

aevent LeftMouseButtonPressEvent
static

This event is triggered when left mouse button down occurs.

Definition at line 402 of file viewport.h.

aevent LeftMouseButtonReleaseEvent
static

This event is triggered when left mouse button release occurs.

Definition at line 405 of file viewport.h.

aevent ContextMenuEvent
static

This event is triggered on context menu (right mouse button)

Definition at line 408 of file viewport.h.

aevent SceneRenderEvent
static

This event is triggered after scene is rendered.

Should be used if plug in has any widgets to render into the scene.

Definition at line 412 of file viewport.h.

aevent ViewportResizeEvent
static

This event is triggered when viewport's size is changed.

Definition at line 415 of file viewport.h.


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