3ds Max C++ API Reference
LightscapeLight::AreaLightCustAttrib Class Referenceabstract

Area Lights sampling custom attribute. More...

#include <lslights.h>

+ Inheritance diagram for LightscapeLight::AreaLightCustAttrib:

Public Types

enum  {
  kDefaultSamples_Area = 32 , kDefaultSamples_Linear = kDefaultSamples_Area , kDefaultSamples_Cylinder = kDefaultSamples_Area , kDefaultSamples_Sphere = kDefaultSamples_Area ,
  kDefaultSamples_Disc = kDefaultSamples_Area , kDefaultSamples_Point = 0
}
 Default number of samples. More...
 
- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
 

Public Member Functions

virtual bool AreaLightComputationEnabled (TimeValue t, Interval *valid=NULL) const =0
 Returns whether the area light computation is enabled. More...
 
virtual BOOL IsLightShapeRenderingEnabled (TimeValue t, Interval *valid=NULL) const =0
 Returns whether the light's shape is rendered. More...
 
virtual void LightShapeRenderingEnabled (TimeValue t, BOOL on)=0
 Set whether the light's shape is rendered. More...
 
virtual Interface_ID GetID ()
 Returns the Interface ID for this class, LS_AREALIGHTCUSTATTRIB_INTERFACE_ID. More...
 
virtual int GetNumSamples (TimeValue t, Interval *valid=NULL) const =0
 Returns the number of samples to be used. More...
 
virtual void SetNumSamples (TimeValue t, int numSamples)=0
 Sets the number of samples to be used. More...
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
virtual LifetimeType LifetimeControl ()
 
virtual bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
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 ()
 

Static Public Attributes

static const BOOL kDefault_EnableAreaLight = TRUE
 Default value of the area light computation state. More...
 
static const BOOL kDefault_EnableLightShapeRendering = FALSE
 Default value of the light shape rendering state. More...
 

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...
 

Detailed Description

Area Lights sampling custom attribute.

This class holds the sampling information and additional information for area lights.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Default number of samples.

Enumerator
kDefaultSamples_Area 

Default num samples for area lights.

kDefaultSamples_Linear 

Default num samples for linear lights.

kDefaultSamples_Cylinder 

Default num samples for cylinder lights.

kDefaultSamples_Sphere 

Default num samples for sphere lights.

kDefaultSamples_Disc 

Default num samples for disc lights.

kDefaultSamples_Point 

Default num samples for point lights.

954  {
955  kDefaultSamples_Area = 32,
961  };
@ kDefaultSamples_Sphere
Default num samples for sphere lights.
Definition: lslights.h:958
@ kDefaultSamples_Area
Default num samples for area lights.
Definition: lslights.h:955
@ kDefaultSamples_Linear
Default num samples for linear lights.
Definition: lslights.h:956
@ kDefaultSamples_Disc
Default num samples for disc lights.
Definition: lslights.h:959
@ kDefaultSamples_Cylinder
Default num samples for cylinder lights.
Definition: lslights.h:957
@ kDefaultSamples_Point
Default num samples for point lights.
Definition: lslights.h:960

Member Function Documentation

◆ AreaLightComputationEnabled()

virtual bool AreaLightComputationEnabled ( TimeValue  t,
Interval valid = NULL 
) const
pure virtual

Returns whether the area light computation is enabled.

Parameters
[in]t- The time at which the value is retrieved
[in,out]valid- If this argument is not NULL, the validity of this value is intersected with the interval pointed to by this argument.
Returns
always the value kDefault_EnableAreaLight

◆ IsLightShapeRenderingEnabled()

virtual BOOL IsLightShapeRenderingEnabled ( TimeValue  t,
Interval valid = NULL 
) const
pure virtual

Returns whether the light's shape is rendered.

Parameters
[in]t- The time at which the value is retrieved
[in,out]valid- If this argument is not NULL, the validity of this value is intersected with the interval pointed to by this argument.
Returns
TRUE if the light shape is rendered

◆ LightShapeRenderingEnabled()

virtual void LightShapeRenderingEnabled ( TimeValue  t,
BOOL  on 
)
pure virtual

Set whether the light's shape is rendered.

Parameters
[in]t- The time at which the value is retrieved
[in]on- Render or not the light shape in mental ray
Returns
TRUE if the light shape is rendered

◆ GetNumSamples()

virtual int GetNumSamples ( TimeValue  t,
Interval valid = NULL 
) const
pure virtual

Returns the number of samples to be used.

Postcondition
The number of samples should be a power of 2
Parameters
[in]t- The time at which the number of samples is retrieved.
[in,out]valid- If this argument is not NULL, the validity of this number of samples is intersected with the interval pointed to by this argument.
Returns
The number of samples

◆ SetNumSamples()

virtual void SetNumSamples ( TimeValue  t,
int  numSamples 
)
pure virtual

Sets the number of samples to be used.

Precondition
The number of samples should be a power of 2
Parameters
[in]t- The time at which the number of samples is set.
[in]numSamples- The number of sample to use.

◆ GetID()

virtual Interface_ID GetID ( )
inlinevirtual

Returns the Interface ID for this class, LS_AREALIGHTCUSTATTRIB_INTERFACE_ID.

Reimplemented from BaseInterface.

#define LS_AREALIGHTCUSTATTRIB_INTERFACE_ID
The Interface ID for the Area Sampling custom attribute interface.
Definition: lslights.h:60

Member Data Documentation

◆ kDefault_EnableAreaLight

const BOOL kDefault_EnableAreaLight = TRUE
static

Default value of the area light computation state.

◆ kDefault_EnableLightShapeRendering

const BOOL kDefault_EnableLightShapeRendering = FALSE
static

Default value of the light shape rendering state.