3ds Max C++ API Reference
IRenderView Class Referenceabstract

This class is a representation of a render view which provides some common functions to manipulate a viewport. More...

#include <IRenderView.h>

+ Inheritance diagram for IRenderView:

Public Member Functions

virtual bool LoadXML (const MCHAR *fileName)=0
 Load the view fragment graph from a specified xml file. More...
 
virtual bool UnloadXML ()=0
 Unload the view fragment graph. More...
 
virtual bool SaveXML (const MCHAR *fileName)=0
 Save the view fragment graph to a specified xml file. More...
 
virtual void SetViewSize (const size_t width, const size_t height)=0
 Set the render view's width and height. More...
 
virtual size_t GetViewWidth () const =0
 Get the render view's width. More...
 
virtual size_t GetViewHeight () const =0
 Get the render view's height. More...
 
virtual void SetRenderRegion (const RenderRegion &renderRegion)=0
 Set the render region of the render view. More...
 
virtual const RenderRegionGetRenderRegion () const =0
 Get the render region of the render view. More...
 
- Public Member Functions inherited from IView
virtual MaxSDK::Graphics::RefObjectPtr GetViewAttachment (const MSTR &name)=0
 Try to get a view attachment from the view. More...
 
virtual void SetViewAttachment (const MSTR &name, const MaxSDK::Graphics::RefObjectPtr &pAttachment)=0
 Assign a view attachment with a given name to the view. More...
 
- Public Member Functions inherited from ARefObject
GraphicsUtilityAPI ARefObject ()
 
virtual GraphicsUtilityAPI long AddRef ()
 from IRefObject, see comments in IRefObject More...
 
virtual GraphicsUtilityAPI long Release ()
 decrease reference count of this object by one, if the decreased reference count equals zero, the object will be deleted. More...
 
GraphicsUtilityAPI IRefObjectQueryInterface (Interface_ID classID)
 Try query an interface from the ref object using a given interface id. More...
 
- Public Member Functions inherited from IRefObject
GraphicsUtilityAPI IRefObject ()
 
virtual GraphicsUtilityAPI ~IRefObject ()
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 
- Protected Member Functions inherited from ARefObject
virtual GraphicsUtilityAPI void DeleteThis ()
 This function will be called when the reference count of an ARefObject equals zero. More...
 
virtual GraphicsUtilityAPI ~ARefObject ()
 

Detailed Description

This class is a representation of a render view which provides some common functions to manipulate a viewport.

For e.g., invalidate or render the view port, save or load the view fragment graph etc.,. To get access to a IRenderView instance, please call ViewExp18::GetRenderView()

See also
class ViewExp18

Member Function Documentation

◆ LoadXML()

virtual bool LoadXML ( const MCHAR fileName)
pure virtual

Load the view fragment graph from a specified xml file.

Parameters
[in]fileNamethe file name of the xml file
Returns
true if succeed or false otherwise.

◆ UnloadXML()

virtual bool UnloadXML ( )
pure virtual

Unload the view fragment graph.

Returns
true if succeed or false otherwise.

◆ SaveXML()

virtual bool SaveXML ( const MCHAR fileName)
pure virtual

Save the view fragment graph to a specified xml file.

Parameters
[in]fileNamethe file name of the xml file
Returns
true if succeed or false otherwise.

◆ SetViewSize()

virtual void SetViewSize ( const size_t  width,
const size_t  height 
)
pure virtual

Set the render view's width and height.

Parameters
[in]widththe width of the view
[in]heightthe height of the view

◆ GetViewWidth()

virtual size_t GetViewWidth ( ) const
pure virtual

Get the render view's width.

Returns
the width of the render view.

◆ GetViewHeight()

virtual size_t GetViewHeight ( ) const
pure virtual

Get the render view's height.

Returns
the height of the render view.

◆ SetRenderRegion()

virtual void SetRenderRegion ( const RenderRegion renderRegion)
pure virtual

Set the render region of the render view.

At the beginning, the rendering target's size,left-top position and right-bottom position are as same as the view. They are fully overlapped. Once the render region is set for one render view, it means how the render region is computed in the view that includes 3 operations for render target: scale,crop and offset. The member mbScalingBeforeClipping of RenderRegion can indicate the order of scaling and clipping.The offset order does not affect the final result. The member mScreenSpaceScale of RenderRegion includes the wide and height's scales by taking the render target's width and height as base. The member mPostRenderClippingRegion of RenderRegion includes the left-top and right-bottom positions of clipping rectangle that are ratios by taking the rendering target's width and height as base. The member mScreenSpaceOffset of RenderRegion will horizontally and vertically move the render target in the screen space of the render view. At last, if the processed render target intersects with the view, the intersection region will become the render region.

Parameters
[in]renderRegionthis parameter is one struct type that includes the clipping rectangle,offset and scales of the original render target in the screen space of the render view.

◆ GetRenderRegion()

virtual const RenderRegion& GetRenderRegion ( ) const
pure virtual

Get the render region of the render view.

Returns
the render region that includes the scales,clipping rectangle and offset of the original render target in the screen space of the render view.