Public Member Functions

ViewExp10 Class Reference

Search for all occurrences

Detailed Description

Extends ViewExp.

The following code example shows gow to get access to this interface:

    // hWnd is the handle of a viewport window. This is passed to MouseCallback::proc
    ViewExp* vp = ip->GetViewport(hWnd);
    ViewExp10* vp10 = NULL;
    if (vp != NULL)
        vp10 = reinterpret_cast<ViewExp10*>(vp->Execute(ViewExp::kEXECUTE_GET_VIEWEXP_10));
    ip->ReleaseViewport(vp);

#include <maxapi.h>

Inheritance diagram for ViewExp10:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual  ~ViewExp10 ()
  Destructor.
virtual BOOL  SetFOV (float fov)=0
  Sets the Field of View for the viewport.
virtual float  GetViewportFPS ()=0
  Gets the state of the active viewport current fps.
virtual float  GetViewportClipScale ()=0
  Gets the state of the active viewport clip scale value.
virtual void  SetViewportClipScale (float fScale)=0
  Sets the state of the active viewport clip scale value.
Viewport navigation methods

Viewport navigation is usually implemented by viewport command modes (VIEWPORT_COMMAND).

The viewport should be invalidated by the command mode's mouse callback procedure in response to user input that change the viewpoint or some view parameters. See ViewExp10::Invalidate for more details. Viewport navigation commands should be undoable. See ViewExp10::UndoBegin and ViewExp10::UndoAccept for more details. The follwoing methods work with all view types except object based ones (camera, light, etc).

See also:
class CommandMode, class MouseCallBack, Sample code MaxSDK\HowTo\ViewportNavigation
virtual void  Pan (const Point2 &screenDelta)=0
  Pans the viewport.
virtual void  Zoom (float zoomFactor)=0
  Zooms the viewport.
virtual void  Rotate (const Quat &rotData, const Point3 &center=Point3::Origin)=0
  Rotates the viewport.
virtual void  SetFocalDistance (float dist)=0
  Sets the focal distance of the viewport.
Undo support
virtual bool  UndoBegin ()=0
  Marks the start of recording viewport changes for undo.
virtual bool  UndoAccept ()=0
  Marks the end of recording viewport changes for undo.
Viewport invalidation
virtual void  Invalidate (bool bForegroundOnly=false)=0
  Invalidates the viewport.
virtual bool  IsValid () const =0
  Retrieves the valid state of the viewport.
Adaptive Degradation parameters
virtual float  GetAdaptiveDegGoalFPS ()=0
  Gets Adaptive Deg. goal FPS.
virtual void  SetAdaptiveDegGoalFPS (float fFPS)=0
  Sets Adaptive Deg. goal FPS.
virtual BOOL  GetAdaptiveDegDisplayModeCurrent ()=0
  Gets the state of the display mode current display option.
virtual void  SetAdaptiveDegDisplayModeCurrent (BOOL bMode)=0
  Sets the display mode to the current display.
virtual BOOL  GetAdaptiveDegDisplayModeFastShaded ()=0
  Gets the state of the display mode Fast Shaded display option.
virtual void  SetAdaptiveDegDisplayModeFastShaded (BOOL bMode)=0
  Sets the state of the display mode Fast Shaded display option.
virtual BOOL  GetAdaptiveDegDisplayModeWire ()=0
  Gets the state of the display mode Wireframe display option.
virtual void  SetAdaptiveDegDisplayModeWire (BOOL bMode)=0
  Sets the state of the display mode Wireframe display option.
virtual BOOL  GetAdaptiveDegDisplayModeBox ()=0
  Gets the state of the display mode BoundingBox display option.
virtual void  SetAdaptiveDegDisplayModeBox (BOOL bMode)=0
  Sets the state of the display mode BoundingBox display option.
virtual BOOL  GetAdaptiveDegDisplayModePoint ()=0
  Gets the state of the display mode Point display option.
virtual void  SetAdaptiveDegDisplayModePoint (BOOL bMode)=0
  Sets the state of the display mode Point display option.
virtual BOOL  GetAdaptiveDegDisplayModeHide ()=0
  Gets the state of the display mode Hide display option.
virtual void  SetAdaptiveDegDisplayModeHide (BOOL bMode)=0
  Sets the state of the display mode Hide display option.
virtual BOOL  GetAdaptiveDegDrawBackface ()=0
  Gets the state of the Draw Backface option.
virtual void  SetAdaptiveDegDrawBackface (BOOL bDraw)=0
  Sets the state of the Draw Backface option.
virtual BOOL  GetAdaptiveDegNeverDegradeSelected ()=0
  Gets the state of the Never Degrade Selected option.
virtual void  SetAdaptiveDegNeverDegradeSelected (BOOL bNeverDegrade)=0
  Sets the state of the Never Degrade Selected option.
virtual BOOL  GetAdaptiveDegDegradeLight ()=0
  Gets the state of the Degrade to Default Light option.
virtual void  SetAdaptiveDegDegradeLight (BOOL bDegradeLight)=0
  Sets the state of the Degrade to Default Light option.
virtual BOOL  GetAdaptiveDegNeverRedrawAfterDegrade ()=0
  Gets the state of the Never Redraw After Degrade option.
virtual void  SetAdaptiveDegNeverRedrawAfterDegrade (BOOL bNeverRedraw)=0
  Sets the state of the Never Redraw After Degrade option.
virtual float  GetAdaptiveDegCameraDistancePriority ()=0
  Gets the state of the Distance From Camera Priority option.
virtual void  SetAdaptiveDegCameraDistancePriority (float fPriority)=0
  Sets the state of the Distance From Camera Priority option.
virtual float  GetAdaptiveDegScreenSizePriority ()=0
  Gets the state of the Screen Size Priority option.
virtual void  SetAdaptiveDegScreenSizePriority (float fPriority)=0
  Sets the state of the Screen Size Priority option.
virtual int  GetAdaptiveDegMinSize ()=0
  Gets the state of the Minimum Draw Size option.
virtual void  SetAdaptiveDegMinSize (int iMinSize)=0
  Sets the state of the Minimum Draw Size option.

Constructor & Destructor Documentation

virtual ~ViewExp10 ( ) [inline, virtual]

Destructor.

{ }

Member Function Documentation

virtual void Pan ( const Point2 screenDelta ) [pure virtual]

Pans the viewport.

Parameters:
[in] screenDelta - Screen space pan amount.
virtual void Zoom ( float  zoomFactor ) [pure virtual]

Zooms the viewport.

This is equivalent to the Interactive Zoom tool in the UI. When used on a perspective view, it ultimately modifies the focal distance, and moves the camera. When used on an orthogonal or isometric view, it simplies calls an internal zoom function. Values between 0.0 and 1.0 will zoom in, and values greater than 1.0 will zoom out. For instance, zooming in with a value of 0.5 will enlarge the apparent display, and effectively half the focal distance for perspective views. Zooming out with a value of 2.0 will effectively double the focal distance for perspective views. Note: Setting this value to zero will set the focal distance to zero. This is highly discouraged. To recover from a zero assignment, either set the focal distance to a positive number, or zoom using the middle mouse button.

Parameters:
[in] zoomFactor - Zoom factor to apply to the viewport.
virtual void Rotate ( const Quat rotData,
const Point3 center = Point3::Origin 
) [pure virtual]

Rotates the viewport.

This is equivalent to the Viewport Rotation tool in the UI.

Parameters:
[in] rotData - Rotation to apply to the viewport.
[in] center - pivot on which the viewport rotation is based.
virtual void SetFocalDistance ( float  dist ) [pure virtual]

Sets the focal distance of the viewport.

Parameters:
[in] dist - The new distance for the focal length
virtual bool UndoBegin ( ) [pure virtual]

Marks the start of recording viewport changes for undo.

Call this method before any change to the viewpoint or viewport parameters. Usually this method is called from within a MouseCallback::proc method in response to the start of a user interaction (MOUSE_POINT, MOUSE_KEYBOARD)

virtual bool UndoAccept ( ) [pure virtual]

Marks the end of recording viewport changes for undo.

Call this method after a change to the viewpoint or viewport parameters. Usually this method is called from within a MouseCallback::proc method in response to the end of a user interaction (MOUSE_POINT sent to MouseCallback::proc with the last point)

virtual void Invalidate ( bool  bForegroundOnly = false ) [pure virtual]

Invalidates the viewport.

A call to Interface::RedrawViews will cause the viewport to be redrawn

Parameters:
[in] bForegroundOnly - If true, only the foreground plane is invalidated. If false, both foreground and background planes are invalidated.
See also:
The topic named "Foreground\Background" in the 3ds Max SDK Programmer's Guide.
virtual bool IsValid ( ) const [pure virtual]

Retrieves the valid state of the viewport.

Returns:
true if the viewport is valid, false otherwise
virtual BOOL SetFOV ( float  fov ) [pure virtual]

Sets the Field of View for the viewport.

This can be used on Perpective and Camera views. That is VIEW_PERSP_USER or VIEW_CAMERA from enum ViewType. To see the results of this call the viewports will have to be updated. For instance you could call: Interface::RedrawViews()

Parameters:
fov - The field of view in Radians to set the viewport to. Valid values are 0.0 to 2 PI.
Returns:
TRUE if successful or FALSE if not.
virtual float GetViewportFPS ( ) [pure virtual]

Gets the state of the active viewport current fps.

Gets the state of the active viewport current play back fps. NOTE GetFPS returns the Adaptive degradation goal frame rate

virtual float GetViewportClipScale ( ) [pure virtual]

Gets the state of the active viewport clip scale value.

This gets the state of the viewport clip scale value. The minimum clip value is computed by taking the scene bounding box and multipling by this value. Making this value larger will make the scene display more accurately but bring the near clip plane farther from the camera. Making this value smaller will bring the near clip plane closer but have a more likely chance of have close polygons render incorrectly

virtual void SetViewportClipScale ( float  fScale ) [pure virtual]

Sets the state of the active viewport clip scale value.

This sets the state of the viewport clip scale value. The minimum clip value is computed by taking the scene bounding box and multipling by this value. Making this value larger will make the scene display more accurately but bring the near clip plane farther from the camera. Making this value smaller will bring the near clip plane closer but have a more likely chance of have close polygons render incorrectly

Parameters:
fScale The scale value
virtual float GetAdaptiveDegGoalFPS ( ) [pure virtual]

Gets Adaptive Deg. goal FPS.

Gets Adaptive Deg. goal FPS. This is the frame rate the adaptive deg system wants to hold

virtual void SetAdaptiveDegGoalFPS ( float  fFPS ) [pure virtual]

Sets Adaptive Deg. goal FPS.

Sets Adaptive Deg. goal FPS. This is the frame rate the adaptive deg system wants to hold

virtual BOOL GetAdaptiveDegDisplayModeCurrent ( ) [pure virtual]

Gets the state of the display mode current display option.

Gets the state of the display mode current display option

virtual void SetAdaptiveDegDisplayModeCurrent ( BOOL  bMode ) [pure virtual]

Sets the display mode to the current display.

Sets the display mode to the current display

virtual BOOL GetAdaptiveDegDisplayModeFastShaded ( ) [pure virtual]

Gets the state of the display mode Fast Shaded display option.

Gets the state of the display mode Fast Shaded display option

virtual void SetAdaptiveDegDisplayModeFastShaded ( BOOL  bMode ) [pure virtual]

Sets the state of the display mode Fast Shaded display option.

Sets the state of the display mode Fast Shaded display option

virtual BOOL GetAdaptiveDegDisplayModeWire ( ) [pure virtual]

Gets the state of the display mode Wireframe display option.

Gets the state of the display mode Wireframe display option

virtual void SetAdaptiveDegDisplayModeWire ( BOOL  bMode ) [pure virtual]

Sets the state of the display mode Wireframe display option.

Sets the state of the display mode Wireframe display option

virtual BOOL GetAdaptiveDegDisplayModeBox ( ) [pure virtual]

Gets the state of the display mode BoundingBox display option.

Gets the state of the display mode BoundingBox display option

virtual void SetAdaptiveDegDisplayModeBox ( BOOL  bMode ) [pure virtual]

Sets the state of the display mode BoundingBox display option.

Sets the state of the display mode BoundingBox display option

virtual BOOL GetAdaptiveDegDisplayModePoint ( ) [pure virtual]

Gets the state of the display mode Point display option.

Gets the state of the display mode Point display option

virtual void SetAdaptiveDegDisplayModePoint ( BOOL  bMode ) [pure virtual]

Sets the state of the display mode Point display option.

Sets the state of the display mode Point display option

virtual BOOL GetAdaptiveDegDisplayModeHide ( ) [pure virtual]

Gets the state of the display mode Hide display option.

Gets the state of the display mode Hide display option

virtual void SetAdaptiveDegDisplayModeHide ( BOOL  bMode ) [pure virtual]

Sets the state of the display mode Hide display option.

Sets the state of the display mode Hide display option

virtual BOOL GetAdaptiveDegDrawBackface ( ) [pure virtual]

Gets the state of the Draw Backface option.

Gets the state of the Draw Backface option. When on backfaces will be drawn when degrading improving performance

virtual void SetAdaptiveDegDrawBackface ( BOOL  bDraw ) [pure virtual]

Sets the state of the Draw Backface option.

Sets the state of the Draw Backface option. When on backfaces will be drawn when degrading improving performance

virtual BOOL GetAdaptiveDegNeverDegradeSelected ( ) [pure virtual]

Gets the state of the Never Degrade Selected option.

Gets the state of the Never Degrade Selected option. When on selected objects will never get degraded allowing the user to focus on them

virtual void SetAdaptiveDegNeverDegradeSelected ( BOOL  bNeverDegrade ) [pure virtual]

Sets the state of the Never Degrade Selected option.

Sets the state of the Never Degrade Selected option. When on selected objects will never get degraded allowing the user to focus on them

virtual BOOL GetAdaptiveDegDegradeLight ( ) [pure virtual]

Gets the state of the Degrade to Default Light option.

Gets the state of the Degrade to Default Light option. When on the system will degrade the lights to just the default over the shoulder light

virtual void SetAdaptiveDegDegradeLight ( BOOL  bDegradeLight ) [pure virtual]

Sets the state of the Degrade to Default Light option.

Sets the state of the Degrade to Default Light option. When on the system will degrade the lights to just the default over the shoulder light

virtual BOOL GetAdaptiveDegNeverRedrawAfterDegrade ( ) [pure virtual]

Gets the state of the Never Redraw After Degrade option.

Gets the state of the Never Redraw After Degrade option. When on the system will remain in degraded state even after a mouse up. On large scenes this helps pauses on full redraws

virtual void SetAdaptiveDegNeverRedrawAfterDegrade ( BOOL  bNeverRedraw ) [pure virtual]

Sets the state of the Never Redraw After Degrade option.

Sets the state of the Never Redraw After Degrade option. When on the system will remain in degraded state even after a mouse up. On large scenes this helps pauses on full redraws

virtual float GetAdaptiveDegCameraDistancePriority ( ) [pure virtual]

Gets the state of the Distance From Camera Priority option.

Gets the state of the Distance From Camera Priority option. This weights whether the distance from camera or screen size is used to determine what gets degraded

virtual void SetAdaptiveDegCameraDistancePriority ( float  fPriority ) [pure virtual]

Sets the state of the Distance From Camera Priority option.

Sets the state of the Distance From Camera Priority option. This weights whether the distance from camera or screen size is used to determine what gets degraded

virtual float GetAdaptiveDegScreenSizePriority ( ) [pure virtual]

Gets the state of the Screen Size Priority option.

Gets the state of the Screen Siz Priority option. This weights whether the distance from camera or screen size is used to determine what gets degraded

virtual void SetAdaptiveDegScreenSizePriority ( float  fPriority ) [pure virtual]

Sets the state of the Screen Size Priority option.

Sets the state of the Screen Siz Priority option. This weights whether the distance from camera or screen size is used to determine what gets degraded

virtual int GetAdaptiveDegMinSize ( ) [pure virtual]

Gets the state of the Minimum Draw Size option.

Gets the state of the Minimum Draw Size option. Anything smaller than the Minimum Draw Size in screen space will not be drawn when the system is degrading

virtual void SetAdaptiveDegMinSize ( int  iMinSize ) [pure virtual]

Sets the state of the Minimum Draw Size option.

Sets the state of the Minimum Draw Size option. Anything smaller than the Minimum Draw Size in screen space will not be drawn when the system is degrading


ViewExp10 ViewExp10 ViewExp10 ViewExp10 ViewExp10 ViewExp10 ViewExp10 ViewExp10 ViewExp10 ViewExp10
ViewExp10 ViewExp10 ViewExp10 ViewExp10 ViewExp10 ViewExp10 ViewExp10 ViewExp10 ViewExp10 ViewExp10