3ds Max C++ API Reference
|
Viewport manager to control general illumination, including shadow support in the viewport. More...
#include <IViewportShadingMgr.h>
Public Types | |
enum | EViewportDisplayQuality { kNone , kGood , kBest } |
enum | EViewportLightFlags { kShadowCasting , kIlluminating , kLocked } |
Please refer to INodeShadingProperties for more details. More... | |
![]() | |
enum | LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled } |
Public Member Functions | |
virtual void | SetViewportShadingLimits (int limit, bool bQuiet=true)=0 |
Define the viewports shading quality. | |
virtual int | GetViewportShadingLimits ()=0 |
Retrieve the viewport quality. | |
virtual bool | GetAutoDisplayOfSelLights ()=0 |
Get the current state of the Auto Display Selected light flag. | |
virtual void | SetAutoDisplayOfSelLights (bool bSet)=0 |
Set the state of the Auto Display of Selected lights flag. | |
virtual void | SetCastShadowDefaultLights (bool bSet)=0 |
Flag controlling shadow generation for default lights. | |
virtual bool | GetCastShadowDefaultLights ()=0 |
Access the flag defining whether shadows are generated for default lights. | |
virtual void | DisplayOnlySelectedLights ()=0 |
A method that defines that the current selected lights will be part of viewport rendering. | |
virtual void | LockSelectedLights (bool bSet)=0 |
Lock the current selected lights. | |
virtual void | GetViewportShadingLights (Tab< INode * > &lightList, int type)=0 |
A method to retrieve lights based on the usage in the scene. | |
virtual void | SetGlobalShadowIntensity (float intensity)=0 |
Sets the global intensity override for the shadows. | |
virtual float | GetGlobalShadowIntensity ()=0 |
Retrieve the Global shadow intensity. | |
virtual void | SetUseTransparencyInShadows (bool bSet)=0 |
Defines whether the viewport shading code supports transparent object/materials in the shadow code. | |
virtual bool | GetUseTransparencyInShadows ()=0 |
Get the current Transparency in shadows flag. | |
virtual void | SetUpdateShadowInActiveViewOnly (bool bSet)=0 |
Defines whether the viewport shading code updates the shadows for all windows or just the active viewport. | |
virtual bool | GetUpdateShadowInActiveViewOnly ()=0 |
Get the current update shadow in active view only flag. | |
virtual bool | IsShadingLimitValid (int limit)=0 |
Determine whether the shading limit is compatible with the current graphics hardware. | |
virtual Color | GetLightIconColor (INode &lightNode)=0 |
Get the light icon color based on the current viewport shading limits. | |
virtual void | SetUseTransparencyInGI (bool bSet)=0 |
Set whether the GI viewport system works with Transparent objects. | |
virtual bool | GetUseTransparencyInGI ()=0 |
Get whether the GI viewport system uses Transparency. | |
virtual void | SetShadowFilterSize (float filterSize)=0 |
Set the shadow filter size of soft-edge shadow. | |
virtual float | GetShadowFilterSize ()=0 |
Get the shadow filter size of soft-edge shadow. | |
![]() | |
CoreExport | FPInterfaceDesc () |
CoreExport | FPInterfaceDesc (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, ULONG flag,...) |
CoreExport | ~FPInterfaceDesc () |
virtual void | Init () |
LifetimeType | LifetimeControl () |
virtual BaseInterface * | GetInterface (Interface_ID id) |
CoreExport void | LoadDescriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *pCD, ULONG flag,...) |
CoreExport void | AppendFunction (int id,...) |
Add a new function to this interface descriptor. | |
CoreExport void | AppendProperty (int id,...) |
Add a new property to this interface descriptor. | |
CoreExport void | AppendEnum (int id,...) |
Add a new enum to this interface descriptor. | |
CoreExport void | SetClassDesc (ClassDesc *i_cd) |
CoreExport va_list | check_fn (va_list ap, int id) |
CoreExport va_list | scan_fn (va_list ap, int id, int index) |
CoreExport va_list | check_prop (va_list ap, int id) |
CoreExport va_list | scan_prop (va_list ap, int id, int index) |
CoreExport va_list | check_enum (va_list ap, EnumID id) |
CoreExport va_list | scan_enum (va_list ap, EnumID id, int index) |
FPInterfaceDesc * | GetDesc () |
Interface_ID | GetID () |
CoreExport FPFunctionDef * | GetFnDef (FunctionID fid) |
ActionTable * | GetActionTable () |
CoreExport void | EnableActions (BOOL onOff) |
virtual CoreExport HINSTANCE | HInstance () |
virtual CoreExport const MCHAR * | GetRsrcString (StringResID id) |
![]() | |
virtual BaseInterface * | GetInterface (Interface_ID id) |
virtual FPInterfaceDesc * | GetDesc ()=0 |
virtual CoreExport FPStatus | Invoke (FunctionID fid, TimeValue t=0, FPParams *params=NULL) |
virtual FPStatus | Invoke (FunctionID fid, FPParams *params) |
virtual CoreExport FPStatus | Invoke (FunctionID fid, TimeValue t, FPValue &result, FPParams *params=NULL) |
virtual FPStatus | Invoke (FunctionID fid, FPValue &result, FPParams *params=NULL) |
virtual CoreExport FunctionID | FindFn (const MCHAR *name) |
virtual CoreExport BOOL | IsEnabled (FunctionID actionID) |
virtual CoreExport BOOL | IsChecked (FunctionID actionID) |
virtual CoreExport BOOL | IsVisible (FunctionID actionID) |
virtual CoreExport FunctionID | GetIsEnabled (FunctionID actionID) |
virtual CoreExport FunctionID | GetIsChecked (FunctionID actionID) |
virtual CoreExport FunctionID | GetIsVisible (FunctionID actionID) |
virtual ActionTable * | GetActionTable () |
virtual void | EnableActions (BOOL onOff) |
![]() | |
virtual UtilExport | ~BaseInterface () |
Destructor. | |
UtilExport BaseInterface * | GetInterface (Interface_ID id) override |
virtual UtilExport Interface_ID | GetID () |
virtual LifetimeType | LifetimeControl () |
virtual bool | RegisterNotifyCallback (InterfaceNotifyCallback *incb) |
virtual void | UnRegisterNotifyCallback (InterfaceNotifyCallback *incb) |
virtual BaseInterface * | AcquireInterface () |
virtual void | ReleaseInterface () |
virtual void | DeleteInterface () |
virtual BaseInterface * | CloneInterface (void *remapDir=nullptr) |
![]() | |
virtual UtilExport | ~InterfaceServer () |
Destructor. | |
virtual UtilExport BaseInterface * | GetInterface (Interface_ID id) |
template<class InterfaceType > | |
InterfaceType * | GetTypedInterface () |
Additional Inherited Members | |
![]() | |
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. | |
![]() | |
Interface_ID | ID |
MSTR | internal_name |
StringResID | description |
ClassDesc * | cd |
USHORT | flags |
Tab< FPFunctionDef * > | functions |
Tab< FPPropDef * > | props |
Tab< FPEnum * > | enumerations |
MSPluginClass * | pc |
Rollout * | rollout |
ActionTable * | action_table |
![]() | |
static CoreExport FPInterfaceDesc | nullInterface |
![]() | |
CoreExport void | load_descriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, USHORT flag, va_list ap) |
![]() | |
virtual FPStatus | _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p) |
Viewport manager to control general illumination, including shadow support in the viewport.
New to 3ds Max 2008, the IViewportShadingMgr gives access to the new viewport Shading feature. The viewports have been redesigned to support more realistic rendering including Shadows. The interface also provides access to various flags that control how lights are used in the viewport. This is used closely with the new INodeShadingProperites API, that manages the actual flags set by IViewportShadingMgr The developer can get access to the CORE interface by using
enum EViewportLightFlags |
Please refer to INodeShadingProperties for more details.
Enumerator | |
---|---|
kShadowCasting | |
kIlluminating | Light is shadow casting. |
kLocked | Light is illuminating. |
Define the viewports shading quality.
Set the viewport rendering quality to a value defined in EViewportDisplayQuality. Please make sure you call IsShadingLimitValid before this method to determine if the graphics hardware supports this shading level.
limit | The shading limits as defined by EViewportDisplayQuality |
bQuiet | True to enable quiet mode. No dialogs will be produced to provide user feedback. This defaults to true. |
|
pure virtual |
Retrieve the viewport quality.
Get the viewport rendering quality, as defined by EViewportDisplayQuality
|
pure virtual |
Get the current state of the Auto Display Selected light flag.
This will return the current state of the Auto Display of selected lights flag Any lights that are selected will automatically have their illumination flag set and take part in viewport rendering. If they have their shadow flag set as well, they will become shadow casters.
|
pure virtual |
Set the state of the Auto Display of Selected lights flag.
This will set the current state of the Auto Display of selected lights flag If set to true, any lights that are selected will automatically have their illumination flag set and take part in viewport rendering. If they have their shadow flag set as well, they will become shadow casters.
bSet | The flag value |
|
pure virtual |
Flag controlling shadow generation for default lights.
Defines whether default lights cast shadows in the viewport
bSet | The flag value |
|
pure virtual |
Access the flag defining whether shadows are generated for default lights.
|
pure virtual |
A method that defines that the current selected lights will be part of viewport rendering.
When used, all lights that are currently selected will have their Illumination flag set, and will be part of the viewport rendering. All unselected lights will be deactivated.
|
pure virtual |
Lock the current selected lights.
A locked light will be active in the viewport rendering, regardless of other flags set This could be something like a sun light, that always illuminates and casts shadows. Any selected light will have this flag set depending on the parameter value
bSet | The value of the flag to set. |
A method to retrieve lights based on the usage in the scene.
This is a general method to retrieve a list of nodes based on EViewportLightFlags. This is a quick way off accessing all viewport shadow casting lights in the scene.
&lightList | A node tab to retrieve the node list based on type |
type | The light type to store based on EViewportLightFlags |
|
pure virtual |
Sets the global intensity override for the shadows.
The intensity value is a global override for the general appearance of the shadow. A value of 1.0, the default will provide the unaltered shadow. A value less than one will fade the shadow to produce different effects.
intensity | The value to set the intensity. This should be between 0 and 1, but the function will clamp |
|
pure virtual |
Retrieve the Global shadow intensity.
This will return the current intensity value for the shadows.
|
pure virtual |
Defines whether the viewport shading code supports transparent object/materials in the shadow code.
This is a performance flag. If it is turned off, then the viewport will become faster as less GPU resources are active. This flag is typically used by the Adaptive Degradation system
bSet | True to turn it on - False to turn it off |
|
pure virtual |
Get the current Transparency in shadows flag.
See SetUseTransparencyInShadows
|
pure virtual |
Defines whether the viewport shading code updates the shadows for all windows or just the active viewport.
The us a performance flag. TO increase performance in the viewports, turning this flag on will only update shadows in the active viewport - if it is a supported mode.
bSet | True to turn it on - False to turn it off |
|
pure virtual |
Get the current update shadow in active view only flag.
See SetUpdateShadowInActiveViewOnly
|
pure virtual |
Determine whether the shading limit is compatible with the current graphics hardware.
This method is used to determine if the graphics hardware can support the shading level. This will query the GPU to find out what pixel shader support exists. For "Best", shader model 3 is required, "Good" needs a minimum of shader model 2. The developer should call this method before calling SetViewportShadingLimits as that method will not perform any additional tests.
limit | The shading limit to test |
|
pure virtual |
Get the light icon color based on the current viewport shading limits.
The light icon that gets drawn should reflect the current state of the viewport shading. When the light is shadow casting it will be displayed in a duller color. If the light is currently not illuminating again it will appear duller than the usual wireframe color. This method should be used for any lights that display a viewport icon and want to adhere to the new coloring scheme. The color returned can be used in the GraphicsWindow::setColor function.
&lightNode | The light node to check for the current state of viewport shading flags |
|
pure virtual |
Set whether the GI viewport system works with Transparent objects.
|
pure virtual |
Get whether the GI viewport system uses Transparency.
|
pure virtual |
Set the shadow filter size of soft-edge shadow.
This method is used to control the softness of the shadow edge when the viewport shadow mode is set to soft-edge shadow. It has no effect when in hard-edge shadow mode or if an area light with viewport soft shadow turned on.
filterSize | The value to set the filter size. This should be between 0 and 1, but the function will clamp. |
|
pure virtual |
Get the shadow filter size of soft-edge shadow.
This will return the current filter size of soft-edge shadow.