This reference page is linked to from the following overview topics: Scene Graph, Layers and Viewport Filters, Viewports.
Represents the 3D viewport where Mudbox renders the scene.
Definition at line 287 of file viewport.h.
#include <viewport.h>
Public Types |
|
enum | RedrawType { eFull, eArea, eOverlayOnly } |
This type controls the behaviour of the Redraw function, used as a parameter there. More... |
|
Public Member Functions |
|
virtual unsigned int | FilterCount (void) const |
Returns the number of ViewPortFilters
associated with this ViewPort.
|
|
virtual ViewPortFilter * | Filter (unsigned int iIndex) const |
Returns a pointer to a
ViewPortFilter associated with this ViewPort.
|
|
virtual void | AddFilter (ViewPortFilter *pFilter) |
Associates a
ViewPortFilter with this ViewPort.
|
|
virtual void | RemoveFilter (unsigned int iIndex) |
Removes a
ViewPortFilter that was associated with this ViewPort.
The filter is not deleted. |
|
void | LockFilterCalibration (bool bLocked) |
Locks/unlocks the calibration of all
viewport filters associated with this ViewPort.
(See ViewPortFilter::LockCalibration())
|
|
virtual void | SaveScreenshot (const QString &sFileName) const |
Saves a snapshot of the current viewport to
the given image file name. |
|
virtual int | Width (void) |
Returns the width of the ViewPort
in pixels. |
|
virtual int | Height (void) |
Returns the height of the ViewPort
in pixels. |
|
class ImagePlaneInterface * | ActiveImagePlane () |
Returns the current image plane. |
|
virtual float | CursorXPosition (void) const |
Returns the current cursor horizontal
position inside the viewport in the 0-1 range. |
|
virtual float | CursorYPosition (void) const |
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. |
|
unsigned int | LayerCount (void) const |
This is the same as
FilterCount() |
|
class Layer * | Layer (unsigned int iLayerIndex) const |
This is the same as
Filter() |
|
void | UnlinkLayer (class Layer *pLayer) |
This is the same as
RemoveFilter() |
|
class Layer * | CreateLayer (void) |
Returns a new
ViewPortFilter. |
|
void | AddLayer (class Layer *pLayer) |
This is the same as AddFilter()
|
|
class Layer * | ActiveLayer (void) const |
Returns a pointer to the active layer
(filter). That is, the one last clicked on by the user. |
|
void | SetActiveLayer (class Layer *pLayer) |
Set a layer (filter) to be the active one.
|
|
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. |
|
virtual struct ViewPortState | ViewPortState (void) |
Returns the viewport state structure.
|
|
Public Attributes |
|
aevent | MouseMoveEvent |
aevent | LeftMouseButtonPressEvent |
aevent | LeftMouseButtonReleaseEvent |
Protected Member Functions |
|
ViewPort (void) | |
Do not use the constructor directly.
|
enum RedrawType |
This type controls the behaviour of the Redraw function, used as a parameter there.
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 491 of file viewport.h.
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>();
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.
[in] | iIndex | index of the ViewPortFilter to be returned |
virtual void AddFilter | ( | ViewPortFilter * | pFilter | ) | [virtual] |
Associates a ViewPortFilter with this ViewPort.
[in] | pFilter | a 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.
[in] | iIndex | index 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())
[in] | bLocked | Set 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.
[in] | sFileName | Name 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.
[in] | bMirrored | a bool to determine whether getting the mirrored surface point. |
unsigned int LayerCount | ( | void | ) | const [virtual] |
This is the same as Filter()
[in] | iLayerIndex | index of the layer (filter) to be returned |
Reimplemented from LayerContainer.
void UnlinkLayer | ( | class Layer * | pLayer | ) | [virtual] |
This is the same as RemoveFilter()
[in] | pLayer | index of the layer (filter) to be removed |
Reimplemented from LayerContainer.
class Layer* CreateLayer | ( | void | ) | [virtual] |
void AddLayer | ( | class Layer * | pLayer | ) | [virtual] |
This is the same as AddFilter()
[in] | pLayer | a 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.
[in] | pLayer | a 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.
[in] | eType | This parameter determined what should be affected by the function. See ViewPort::RedrawType for mode details. |
[in] | fXStart | Left side of the area which has to be refreshed in the 0-1 intervall. Ignored if eType != eArea. |
[in] | fYStart | Top side of the area which has to be refreshed in the 0-1 intervall. Ignored if eType != eArea. |
[in] | fXEnd | Right side of the area which has to be refreshed in the 0-1 intervall. Ignored if eType != eArea. |
[in] | fYEnd | Upper side of the area which has to be refreshed in the 0-1 intervall. Ignored if eType != eArea. |
virtual struct ViewPortState ViewPortState | ( | void | ) | [read, virtual] |
Returns the viewport state structure.
Definition at line 527 of file viewport.h.
Definition at line 529 of file viewport.h.
Definition at line 531 of file viewport.h.