3ds Max C++ API Reference
INodeGIProperties2 Class Referenceabstract

This interace accesses the adaptive subdivision properties. More...

#include <INodeGIProperties.h>

+ Inheritance diagram for INodeGIProperties2:

Public Member Functions

virtual void CopyGIPropertiesFrom (const INodeGIProperties2 &source)=0
 Copy properties from another interface. More...
 
virtual BOOL GIUseAdaptiveSubdivision () const =0
 Returns whether the use adaptive subdivision property is turned on. More...
 
virtual float GIGetMinMeshSize () const =0
 Returns the minimum mesh size set for the object. More...
 
virtual float GIGetInitialMeshSize () const =0
 Returns the initial mesh size set for the object. More...
 
virtual float GIGetContrastThreshold () const =0
 Returns the contrast threshold for subdivision. More...
 
virtual void GISetUseAdaptiveSubdivision (BOOL useAdaptiveSubdivision)=0
 Set whether the use adaptive subdivision property is turned on. More...
 
virtual void GISetMinMeshSize (float minMeshSize)=0
 Set the minimum mesh size set for the object. More...
 
virtual void GISetInitialMeshSize (float initialMeshSize)=0
 Set the initial mesh size set for the object. More...
 
virtual void GISetContrastThreshold (float contrastThreshold)=0
 Set the contrast threshold for subdivision. More...
 
virtual void CopyGIPropertiesFrom (const INodeGIProperties &source)=0
 
- Public Member Functions inherited from INodeGIProperties
virtual void CopyGIPropertiesFrom (const INodeGIProperties &source)=0
 
virtual BOOL GIGetIsExcluded () const =0
 
virtual void GISetIsExcluded (BOOL isExcluded)=0
 
virtual BOOL GIGetIsOccluder () const =0
 
virtual BOOL GIGetIsReceiver () const =0
 
virtual BOOL GIGetIsDiffuse () const =0
 
virtual BOOL GIGetIsSpecular () const =0
 
virtual BOOL GIGetUseGlobalMeshSettings () const =0
 
virtual BOOL GIGetMeshingEnabled () const =0
 
virtual unsigned short GIGetNbRefineSteps () const =0
 
virtual unsigned short GIGetNbRefineStepsDone () const =0
 
virtual float GIGetMeshSize () const =0
 
virtual void GISetIsOccluder (BOOL isOccluder)=0
 
virtual void GISetIsReceiver (BOOL isReceiver)=0
 
virtual void GISetIsDiffuse (BOOL isDiffuseReflective)=0
 
virtual void GISetIsSpecular (BOOL isSpecular)=0
 
virtual void GISetUseGlobalMeshSettings (BOOL globalMeshing)=0
 
virtual void GISetMeshingEnabled (BOOL meshingEnabled)=0
 
virtual void GISetNbRefineSteps (unsigned short nbRefineSteps)=0
 
virtual void GISetNbRefineStepsDone (unsigned short nbRefineStepsDone)=0
 
virtual void GISetMeshSize (float size)=0
 
virtual BOOL GIGetIsExcludedFromRegather () const =0
 
virtual void GISetIsExcludedFromRegather (BOOL isExcluded)=0
 
virtual BOOL GIGetStoreIllumToMesh () const =0
 
virtual void GISetStoreIllumToMesh (BOOL storeIllum)=0
 
virtual BOOL GIGetByLayer () const =0
 
virtual void GISetByLayer (BOOL byLayer)=0
 
virtual float GIGetRayMult () const =0
 
virtual void GISetRayMult (float rayMult)=0
 
- Public Member Functions inherited from FPMixinInterface
 FPMixinInterface ()
 
virtual LifetimeType LifetimeControl ()
 
virtual CoreExport bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
CoreExport ~FPMixinInterface ()
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 
virtual FPInterfaceDescGetDescByID (Interface_ID id)
 
virtual Interface_ID GetID ()
 
- Public Member Functions inherited from FPInterface
virtual FPInterfaceDescGetDesc ()=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 ActionTableGetActionTable ()
 
virtual void EnableActions (BOOL onOff)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=NULL)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Additional Inherited Members

- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
 
- 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...
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 
- Protected Member Functions inherited from FPMixinInterface
 FPMixinInterface (const FPMixinInterface &rhs)
 
FPMixinInterfaceoperator= (const FPMixinInterface &rhs)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 
- Protected Attributes inherited from FPMixinInterface
Tab< InterfaceNotifyCallback * > * interfaceNotifyCBs
 

Detailed Description

This interace accesses the adaptive subdivision properties.

An instance of this interface can be retrieved using the following line of code (assuming 'node' is of type INode*):
static_cast<INodeGIProperties2*>(node->GetInterface(NODEGIPROPERTIES2_INTERFACE))

The adaptive subdivision properties are only used when the object is not using the global mesh settings. When an object is using the global settings, these will also be used for adaptive subdivision.
Here is a description of the adaptive subdivision properties:
GEOMETRIC OBJECTS (affects only geometric objects):

  • Use Adaptive Subdivision: TRUE indicates that the object uses adaptive subdivision. FALSE indicates that it doesn't.
  • Mininum Mesh Size: The is the minimum size that adaptive subdivision will subdivide a face. The size of a face is the length of the longest side.
  • Initial Mesh Size: This is the size of the smallest face that the initial meshing code will subdivide to improve the face shape.
  • Contrast Threshold: This value which can be from 0 to 1 is the threshold used to determine when a face is subdivided. The contrast is calculated for each light searately. The contrast on a face is effectively calculated like this:
    max = max brightness of light shining on the vertices of the face
    min = min brightness of light shining on the vertices of the face
    contrast = log(max * (max - min) / (max + min) - 0.02 + 1.0) / log(1000.0 - 0.02 + 1) if max is 0 the the contrast is 0.

Member Function Documentation

◆ CopyGIPropertiesFrom() [1/2]

virtual void CopyGIPropertiesFrom ( const INodeGIProperties2 source)
pure virtual

Copy properties from another interface.

Parameters
[in]source- The interface the properties are copied from.

◆ GIUseAdaptiveSubdivision()

virtual BOOL GIUseAdaptiveSubdivision ( ) const
pure virtual

Returns whether the use adaptive subdivision property is turned on.

This property should be ignored if INodeGIProperties::GIGetUseGlobalMeshSettings() returns TRUE.

Returns
TRUE if the object can be adaptively subdivided. FALSE otherwise.

◆ GIGetMinMeshSize()

virtual float GIGetMinMeshSize ( ) const
pure virtual

Returns the minimum mesh size set for the object.

This property should be ignored if INodeGIProperties::GIGetUseGlobalMeshSettings() returns TRUE.

Returns
The minimum mesh size that adaptive subdivision will produce. The size of a face is the length of the longest side.

◆ GIGetInitialMeshSize()

virtual float GIGetInitialMeshSize ( ) const
pure virtual

Returns the initial mesh size set for the object.

This property should be ignored if INodeGIProperties::GIGetUseGlobalMeshSettings() returns TRUE.

Returns
The size of the smallest face that the initial meshing code will subdivide to improve the face shape. The size of a face in this case is the square-root of the area.

◆ GIGetContrastThreshold()

virtual float GIGetContrastThreshold ( ) const
pure virtual

Returns the contrast threshold for subdivision.

This property should be ignored if INodeGIProperties::GIGetUseGlobalMeshSettings() returns TRUE.

Returns
The threshold, which can be from 0 to 1, used to determine when a face is subdivided. The contrast is calculated for each light searately. The contrast on a face is effectively calculated like this:
max = max brightness of light shining on the vertices of the face
min = min brightness of light shining on the vertices of the face
contrast = log(max * (max - min) / (max + min) - 0.02 + 1.0) / log(1000.0 - 0.02 + 1) if max is 0 the the contrast is 0.

◆ GISetUseAdaptiveSubdivision()

virtual void GISetUseAdaptiveSubdivision ( BOOL  useAdaptiveSubdivision)
pure virtual

Set whether the use adaptive subdivision property is turned on.

This property should be ignored if INodeGIProperties::GIGetUseGlobalMeshSettings() returns TRUE.

Parameters
[in]useAdaptiveSubdivision- TRUE if the object can be adaptively subdivided. FALSE otherwise.

◆ GISetMinMeshSize()

virtual void GISetMinMeshSize ( float  minMeshSize)
pure virtual

Set the minimum mesh size set for the object.

This property should be ignored if INodeGIProperties::GIGetUseGlobalMeshSettings() returns TRUE.

Parameters
[in]minMeshSize- The minimum mesh size that adaptive subdivision will produce. The size of a face is the length of the longest side.

◆ GISetInitialMeshSize()

virtual void GISetInitialMeshSize ( float  initialMeshSize)
pure virtual

Set the initial mesh size set for the object.

This property should be ignored if INodeGIProperties::GIGetUseGlobalMeshSettings() returns TRUE.

Parameters
[in]initialMeshSize- The size of the smallest face that the initial meshing code will subdivide to improve the face shape. The size of a face in this case is the square-root of the area.

◆ GISetContrastThreshold()

virtual void GISetContrastThreshold ( float  contrastThreshold)
pure virtual

Set the contrast threshold for subdivision.

This property should be ignored if INodeGIProperties::GIGetUseGlobalMeshSettings() returns TRUE.

Parameters
[in]contrastThreshold- The threshold, which can be from 0 to 1, used to determine when a face is subdivided. The contrast is calculated for each light searately. The contrast on a face is effectively calculated like this:
max = max brightness of light shining on the vertices of the face
min = min brightness of light shining on the vertices of the face
contrast = log(max * (max - min) / (max + min) - 0.02 + 1.0) / log(1000.0 - 0.02 + 1) if max is 0 the the contrast is 0.

◆ CopyGIPropertiesFrom() [2/2]

virtual void CopyGIPropertiesFrom
Remarks
K Prototype

Clones the properties from a source