3ds Max C++ API Reference
|
#include <maxapi.h>
Public Member Functions | |
virtual | ~ViewExp13 () |
Destructor. | |
virtual bool | IsUsingDefaultLights () const =0 |
Is this viewport using default lights ? | |
virtual BOOL | GetSingleDefaultLight () const =0 |
Get whether the viewport uses one default light, or two. | |
virtual size_t | GetDefaultLightsData (DefaultLight *pDefaultLights, size_t sizeOfDefaultLights, bool bApplyGlobalLevel) const =0 |
Get the default lights data and their number at the same time. | |
virtual void | UpdateLabel ()=0 |
Updates the viewport label, if the display mode has changed. | |
virtual float | GetZoom ()=0 |
Get the zoom value of the viewport. | |
virtual float | GetHither ()=0 |
Get the hither clipping value of the viewport. | |
virtual float | GetYon ()=0 |
Get the yon clipping value of the viewport. | |
virtual DeviceRect | GetRegionDeviceRect ()=0 |
Returns the viewport region rectangle as a DeviceRect. | |
virtual void | SetRegionDeviceRect (DeviceRect r)=0 |
Sets the viewport region rectangle as a DeviceRect. | |
virtual DeviceRect | GetBlowupDeviceRect ()=0 |
Returns the viewport blow-up rectangle as a DeviceRect. | |
virtual void | SetBlowupDeviceRect (DeviceRect r)=0 |
Sets the viewport blow-up rectangle as a DeviceRect. | |
virtual DeviceRect | GetSelDeviceRect (TimeValue t)=0 |
Returns the viewport bounding box of the current node selection, as a DeviceRect. | |
virtual void | SetEdgedFaces (int md)=0 |
Sets if drawing edges faces should be turned on in the viewport. | |
virtual int | GetEdgedFaces (void)=0 |
Gets if drawing edges faces is turned on in the viewport. | |
virtual bool | QueryCursorSceneIntersection (float x, float y, Point3 &intersection)=0 |
Query the world space intersection point under the specified cursor position. | |
Public Member Functions inherited from ViewExp11 | |
virtual | ~ViewExp11 () |
Destructor. | |
virtual BOOL | IsDegrading ()=0 |
Gets whether or not we are in the process of drawing the viewports in an degraded state. | |
Public Member Functions inherited from ViewExp10 | |
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. | |
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 ¢er=Point3::Origin)=0 |
Rotates the viewport. | |
virtual void | SetFocalDistance (float dist)=0 |
Sets the focal distance of the viewport. | |
virtual bool | UndoBegin ()=0 |
Call this method before any change to the viewpoint or viewport parameters. | |
virtual bool | UndoAccept ()=0 |
Marks the end of recording viewport changes for undo. | |
virtual void | Invalidate (bool bForegroundOnly=false)=0 |
A call to Interface::RedrawViews will cause the viewport to be redrawn. | |
virtual bool | IsValid () const =0 |
Retrieves the validity state of the viewport foreground. | |
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. | |
Public Member Functions inherited from ViewExp | |
virtual int | GetViewID ()=0 |
Return the unique ID of the viewport represented by the ViewExp. | |
virtual ViewExp * | ToPointer ()=0 |
virtual bool | IsAlive ()=0 |
virtual Point2 | MapViewToScreen (const Point3 &p)=0 |
virtual float | GetFPS ()=0 |
Get the FPS from the active viewport. | |
virtual void | SetSolidBackgroundColorMode (bool bSolidColor)=0 |
Set the viewport background color mode as solid color mode or gradient color mode. | |
virtual bool | IsSolidBackgroundColorMode ()=0 |
Get the current viewport background color mode. | |
virtual void | ResetBackgroundColorMode ()=0 |
Reset viewport background color mode. | |
virtual void | InvalidateRect (const Rect &rect)=0 |
virtual INT_PTR | Execute (int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0) |
virtual Point3 | GetPointOnCP (const IPoint2 &ps)=0 |
virtual float | GetCPDisp (const Point3 base, const Point3 &dir, const IPoint2 &sp1, const IPoint2 &sp2, BOOL snap=FALSE)=0 |
virtual Point3 | MapScreenToView (const IPoint2 &sp, float depth)=0 |
virtual void | MapScreenToWorldRay (float sx, float sy, Ray &ray)=0 |
virtual BOOL | SetAffineTM (const Matrix3 &m)=0 |
virtual void | GetAffineTM (Matrix3 &tm)=0 |
virtual float | GetScreenScaleFactor (const Point3 worldPoint)=0 |
virtual float | GetVPWorldWidth (const Point3 wPoint)=0 |
virtual Point3 | MapCPToWorld (const Point3 cpPoint)=0 |
virtual float | NonScalingObjectSize ()=0 |
virtual Point3 | SnapPoint (const IPoint2 &in, IPoint2 &out, Matrix3 *plane2d=NULL, DWORD flags=0)=0 |
virtual void | SnapPreview (const IPoint2 &in, IPoint2 &out, Matrix3 *plane2d=NULL, DWORD flags=0)=0 |
virtual void | GetGridDims (float *MinX, float *MaxX, float *MinY, float *MaxY)=0 |
virtual float | SnapLength (float in)=0 |
virtual GraphicsWindow * | getGW ()=0 |
virtual int | IsWire ()=0 |
virtual Rect | GetDammageRect ()=0 |
virtual void | GetConstructionTM (Matrix3 &tm)=0 |
virtual void | SetGridSize (float size)=0 |
virtual float | GetGridSize ()=0 |
virtual BOOL | IsGridVisible ()=0 |
virtual void | SetGridVisibility (BOOL bVisible)=0 |
virtual int | GetGridType ()=0 |
virtual BOOL | setBkgImageDsp (BOOL onOff)=0 |
virtual int | getBkgImageDsp (void)=0 |
virtual void | setSFDisplay (int onOff)=0 |
virtual int | getSFDisplay (void)=0 |
virtual HWND | GetHWnd ()=0 |
virtual BOOL | IsActive ()=0 |
virtual BOOL | IsEnabled ()=0 |
virtual int | GetViewType ()=0 |
virtual BOOL | IsPerspView ()=0 |
virtual BOOL | IsCanvasNavigationMode ()=0 |
virtual float | GetFOV ()=0 |
virtual float | GetFocalDist ()=0 |
virtual void | SetFocalDist (float fd)=0 |
virtual INode * | GetViewCamera ()=0 |
virtual void | SetViewCamera (INode *camNode)=0 |
virtual void | SetViewUser (BOOL persp)=0 |
virtual INode * | GetViewSpot ()=0 |
virtual void | SetViewSpot (INode *spotNode)=0 |
virtual void | ClearHitList ()=0 |
virtual INode * | GetClosestHit ()=0 |
virtual INode * | GetHit (int i)=0 |
virtual int | HitCount ()=0 |
virtual void | LogHit (INode *nr, ModContext *mc, DWORD dist, ulong info, HitData *hitdata=NULL)=0 |
This method records a sub-object level hit record with the system using the specified parameters. | |
virtual HitLog & | GetSubObjHitList ()=0 |
virtual void | ClearSubObjHitList ()=0 |
virtual int | NumSubObjHits ()=0 |
virtual void | CtrlLogHit (INode *nr, DWORD dist, ulong info, DWORD infoExtra)=0 |
virtual CtrlHitLog & | GetCtrlHitList ()=0 |
virtual void | ClearCtrlHitList ()=0 |
virtual void | TrackImplicitGrid (IPoint2 m, Matrix3 *mat=NULL, ULONG hitTestFlags=0)=0 |
virtual void | CommitImplicitGrid (IPoint2 m, int mouseflags, Matrix3 *mat=NULL)=0 |
virtual void | ReleaseImplicitGrid ()=0 |
Public Member Functions inherited from InterfaceServer | |
virtual UtilExport | ~InterfaceServer () |
Destructor. | |
virtual UtilExport BaseInterface * | GetInterface (Interface_ID id) |
template<class InterfaceType > | |
InterfaceType * | GetTypedInterface () |
Additional Inherited Members | |
Public Types inherited from ViewExp | |
enum | { kEXECUTE_GET_VIEWEXP_10 = 0 , kEXECUTE_GET_VIEWPORT_ID = 1 , kEXECUTE_GET_VIEWEXP_11 = 2 , kEXECUTE_GET_VIEWEXP_13 = 3 } |
Static Public Member Functions inherited from MaxHeapOperators | |
static UtilExport void * | operator new (size_t size) |
Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e) |
Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new (size_t size, const char *filename, int line) |
New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, int block_type, const char *filename, int line) |
New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e, const char *filename, int line) |
New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new (size_t size, unsigned long flags) |
New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e, unsigned long flags) |
New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new[] (size_t size) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e) |
New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new[] (size_t size, const char *filename, int line) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new[] (size_t size, int block_type, const char *filename, int line) |
New operator used to allocate arrays of objects. | |
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line) |
New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new[] (size_t size, unsigned long flags) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e, unsigned long flags) |
New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. | |
static UtilExport void | operator delete (void *ptr) |
Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e) |
Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete (void *ptr, const char *filename, int line) |
Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete (void *ptr, int block_type, const char *filename, int line) |
Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line) |
Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete (void *ptr, unsigned long flags) |
Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags) |
Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete[] (void *ptr) |
Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e) |
Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete[] (void *ptr, const char *filename, int line) |
Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete[] (void *ptr, int block_type, const char *filename, int line) |
Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line) |
Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete[] (void *ptr, unsigned long flags) |
Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags) |
Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, void *placement_ptr) |
Placement new operator. | |
static UtilExport void | operator delete (void *ptr, void *placement_ptr) |
Placement delete operator. | |
static UtilExport void * | aligned_malloc (size_t size, size_t alignment) |
Allocates memory on a specified alignment boundary. | |
static UtilExport void * | aligned_realloc (void *ptr, size_t size, size_t alignment) |
Reallocates memory on a specified alignment boundary. | |
static UtilExport void | aligned_free (void *ptr) |
Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. | |
Extends ViewExp11.
The following code example shows how to get access to this interface:
|
inlinevirtual |
Destructor.
|
pure virtual |
Is this viewport using default lights ?
|
pure virtual |
Get whether the viewport uses one default light, or two.
/*!
|
pure virtual |
Get the default lights data and their number at the same time.
[in,out] | pDefaultLights | - The array of DefaultLight, it should be initialized before calling this method and it will be filled. It should have a maximum size of 2 as we use a maximum of 2 lights for a viewport. |
[in] | sizeOfDefaultLights | - The size of the pDefaultLights array initialized before that call. |
[in] | bApplyGlobalLevel | - Tells if we should we apply or not the global tint and level from the Render Environment on the lights data ? |
|
pure virtual |
Updates the viewport label, if the display mode has changed.
May be needed when displaying a camera view, and the camera name is changed. Primarily for internal use.
|
pure virtual |
Get the zoom value of the viewport.
Gets the zoom value of the viewport.
|
pure virtual |
Get the hither clipping value of the viewport.
Get the hither clipping value of the viewport.
|
pure virtual |
Get the yon clipping value of the viewport.
Get the yon clipping value of the viewport.
|
pure virtual |
Returns the viewport region rectangle as a DeviceRect.
Gets the viewport region rectangle, similar to Interface7::GetRegionRect(), but with coordinates in the range [0..1] instead of in pixels.
|
pure virtual |
Sets the viewport region rectangle as a DeviceRect.
Sets the viewport region rectangle, similar to Interface7::SetRegionRect(), but with coordinates in the range [0..1] instead of in pixels.
|
pure virtual |
Returns the viewport blow-up rectangle as a DeviceRect.
Gets the viewport blow-up rectangle, similar to Interface7::GetBlowupRect(), but with coordinates in the range [0..1] instead of in pixels.
|
pure virtual |
Sets the viewport blow-up rectangle as a DeviceRect.
Sets the viewport blow-up rectangle, similar to Interface7::SetBlowupRect(), but with coordinates in the range [0..1] instead of in pixels.
|
pure virtual |
Returns the viewport bounding box of the current node selection, as a DeviceRect.
Gets the viewport bounding box rectangle of the selection, at the given slider time, with coordinates in the range [0..1] instead of in pixels .
Sets if drawing edges faces should be turned on in the viewport.
A non-zero input value turns it on, 0 turns it off.
Gets if drawing edges faces is turned on in the viewport.
Returns non-zero if edged faces is on.
|
pure virtual |
Query the world space intersection point under the specified cursor position.
Returns true if the cursor hit any scene object, otherwise return false.