3ds Max C++ API Reference
IPerezAllWeather Class Referenceabstract

Interface for accessing functionality that exists in the Perez All Weather Model. More...

#include <IPerezAllWeather.h>

+ Inheritance diagram for IPerezAllWeather:

Classes

struct  PerezParams
 Data structure for storing the ABCDE coefficients of the Perez sky model. More...
 

Public Member Functions

virtual void GetPerezParamsFromIlluminances (int dayNumber, float atmWaterContent, float solarZenithAngle, float diffuseHorizontalIllumiance, float directNormalIlluminance, IPerezAllWeather::PerezParams &param)=0
 Calculates the Perez coefficients based on measured illumiance values. More...
 
virtual void GetPerezParamsFromIrradiances (int dayNumber, float solarZenithAngle, float diffuseHorizontalIrradiance, float directNormalIrradiance, IPerezAllWeather::PerezParams &param)=0
 Calculates the Perez coefficients based on measured irradiance values. More...
 
virtual void CalcModelCoefficients (float skyBrightness, float skyClearness, float solarZenithAngle, IPerezAllWeather::PerezParams &param)=0
 Calculates the Perez coefficients based on measured sky brightness and clearness values. More...
 
virtual float CalcSkyBrightness (int dayNumber, float solarZenithAngle, float diffuseHorizontalIrradiance, float normalDirectIrradiance)=0
 Derives the sky brightness from measured irradiance values. More...
 
virtual float CalcSkyClearness (float solarZenithAngle, float diffuseHorizontalIrradiance, float normalDirectIrradiance)=0
 Derives the sky clearness from measured irradiance values. More...
 
virtual float CalcDiffuseHorizontalIrradiance (int dayNumber, float skyBrightness, float solarZenithAngle)=0
 Derives the diffuse horizontal irradiance value from sky brightness. More...
 
virtual float CalcDirectNormalIrradiance (float diffuseHorizontalIrradiance, float solarZenithAngle, float skyClearness)=0
 Derives the direct normal irradiance value from sky clearness. More...
 
virtual float GetDiffuseHorizontalIlluminance (float diffuseHorizontalRadiance, float skyBrightness, float skyClearness, float solarZenithAngle, float atmWaterContent)=0
 Converts a radiance value to an illuminance. More...
 
virtual float GetDirectNormalIlluminance (float directNormalRadiance, float skyBrightness, float skyClearness, float solarZenithAngle, float atmWaterContent)=0
 Converts a radiance value to an illuminance. More...
 
virtual float GetDiffuseHorizontalIrradiance (float diffuseHorizontalIlluminance, float skyBrightness, float skyClearness, float solarZenithAngle, float atmWaterContent)=0
 Converts an illuminance value to an irradiance. More...
 
virtual float GetDirectNormalIrradiance (float directNormalIllumiance, float skyBrightness, float skyClearness, float solarZenithAngle, float atmWaterContent)=0
 Converts an illuminance value to an irradiance. More...
 
virtual float GetAtmosphericPrecipitableWaterContent (BOOL tempValid, float surfaceDewPointTemp)=0
 Converts a dew point temperature to an atmospheric water content. More...
 
- Public Member Functions inherited from FPInterfaceDesc
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 BaseInterfaceGetInterface (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. More...
 
CoreExport void AppendProperty (int id,...)
 Add a new property to this interface descriptor. More...
 
CoreExport void AppendEnum (int id,...)
 Add a new enum to this interface descriptor. More...
 
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)
 
FPInterfaceDescGetDesc ()
 
Interface_ID GetID ()
 
CoreExport FPFunctionDefGetFnDef (FunctionID fid)
 
ActionTableGetActionTable ()
 
CoreExport void EnableActions (BOOL onOff)
 
virtual CoreExport HINSTANCE HInstance ()
 
virtual CoreExport const MCHARGetRsrcString (StringResID id)
 
- Public Member Functions inherited from FPInterface
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)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
virtual bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=nullptr)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Static Public Member Functions

static IPerezAllWeatherGetInterface ()
 Returns the pointer to this interface. More...
 
- 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...
 

Additional Inherited Members

- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
 
- Public Attributes inherited from FPInterfaceDesc
Interface_ID ID
 
MSTR internal_name
 
StringResID description
 
ClassDesccd
 
USHORT flags
 
Tab< FPFunctionDef * > functions
 
Tab< FPPropDef * > props
 
Tab< FPEnum * > enumerations
 
MSPluginClasspc
 
Rolloutrollout
 
ActionTableaction_table
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 
- Protected Member Functions inherited from FPInterfaceDesc
CoreExport void load_descriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, USHORT flag, va_list ap)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 

Detailed Description

Interface for accessing functionality that exists in the Perez All Weather Model.

The Perez All-Weather model is used to calculate the luminance of the sky based on various sets of parameters, which may all be measured or derived from each other:

  • Illuminances for the sky (diffuse horizontal) and in the direction of the sun (direct normal).
  • Irradiances for the sky (diffuse horizontal) and in the direction of the sun (direct normal).
  • Sky brightness and clearness.
    Remarks
    A pointer to this interface may retrieved by calling IPerezAllWeather::GetInterface().

Member Function Documentation

◆ GetInterface()

IPerezAllWeather * GetInterface ( )
inlinestatic

Returns the pointer to this interface.

130 {
132 }
#define PEREZ_ALL_WEATHER_INTERFACE_ID
Interface identifier for class IPerezAllWeather.
Definition: IPerezAllWeather.h:16
Interface for accessing functionality that exists in the Perez All Weather Model.
Definition: IPerezAllWeather.h:28
CoreExport Interface * GetCOREInterface()

◆ GetPerezParamsFromIlluminances()

virtual void GetPerezParamsFromIlluminances ( int  dayNumber,
float  atmWaterContent,
float  solarZenithAngle,
float  diffuseHorizontalIllumiance,
float  directNormalIlluminance,
IPerezAllWeather::PerezParams param 
)
pure virtual

Calculates the Perez coefficients based on measured illumiance values.

Parameters
dayNumberThe day of the year, index from 1.
atmWaterContentThe atmospheric water content (maybe calculated through GetAtmosphericPrecipitableWaterContent()).
solarZenithAngleThe angle between the sun and the zenith (0,0,1), in radians.
diffuseHorizontalIllumianceThe measured diffuse horizontal illuminance.
directNormalIlluminanceThe measured direct normal illuminance.
[out]paramThe Perez coefficients are returned through this.

◆ GetPerezParamsFromIrradiances()

virtual void GetPerezParamsFromIrradiances ( int  dayNumber,
float  solarZenithAngle,
float  diffuseHorizontalIrradiance,
float  directNormalIrradiance,
IPerezAllWeather::PerezParams param 
)
pure virtual

Calculates the Perez coefficients based on measured irradiance values.

Parameters
dayNumberThe day of the year, index from 1.
solarZenithAngleThe angle between the sun and the zenith (0,0,1), in radians.
diffuseHorizontalIrradianceThe measured diffuse horizontal irradiance.
directNormalIrradianceThe measured direct normal irradiance.
[out]paramThe Perez coefficients are returned through this.

◆ CalcModelCoefficients()

virtual void CalcModelCoefficients ( float  skyBrightness,
float  skyClearness,
float  solarZenithAngle,
IPerezAllWeather::PerezParams param 
)
pure virtual

Calculates the Perez coefficients based on measured sky brightness and clearness values.

Parameters
skyBrightnessThe measured sky brightness (may be calculated through CalcSkyBrightness()).
skyClearnessThe measured sky clearness (may be calculated through CalcSkyClearness()).
solarZenithAngleThe angle between the sun and the zenith (0,0,1), in radians.
[out]paramThe Perez coefficients are returned through this.

◆ CalcSkyBrightness()

virtual float CalcSkyBrightness ( int  dayNumber,
float  solarZenithAngle,
float  diffuseHorizontalIrradiance,
float  normalDirectIrradiance 
)
pure virtual

Derives the sky brightness from measured irradiance values.

Parameters
dayNumberThe day of the year, index from 1.
solarZenithAngleThe angle between the sun and the zenith (0,0,1), in radians.
diffuseHorizontalIrradianceThe measured diffuse horizontal irradiance.
normalDirectIrradianceThe measured direct normal irradiance.
Returns
The calculated brightness value.

◆ CalcSkyClearness()

virtual float CalcSkyClearness ( float  solarZenithAngle,
float  diffuseHorizontalIrradiance,
float  normalDirectIrradiance 
)
pure virtual

Derives the sky clearness from measured irradiance values.

Parameters
solarZenithAngleThe angle between the sun and the zenith (0,0,1), in radians.
diffuseHorizontalIrradianceThe measured diffuse horizontal irradiance.
normalDirectIrradianceThe measured direct normal irradiance.
Returns
The calculated clearness value.

◆ CalcDiffuseHorizontalIrradiance()

virtual float CalcDiffuseHorizontalIrradiance ( int  dayNumber,
float  skyBrightness,
float  solarZenithAngle 
)
pure virtual

Derives the diffuse horizontal irradiance value from sky brightness.

Parameters
dayNumberThe day of the year, index from 1.
skyBrightnessThe measured sky brightness.
solarZenithAngleThe angle between the sun and the zenith (0,0,1), in radians.
Returns
The calculated diffuse horizontal irradiance value.

◆ CalcDirectNormalIrradiance()

virtual float CalcDirectNormalIrradiance ( float  diffuseHorizontalIrradiance,
float  solarZenithAngle,
float  skyClearness 
)
pure virtual

Derives the direct normal irradiance value from sky clearness.

Parameters
diffuseHorizontalIrradianceThe diffuse horizontal irradiance, which may be calculated with CalcDiffuseHorizontalIrradiance().
solarZenithAngleThe angle between the sun and the zenith (0,0,1), in radians.
skyClearnessThe measured sky clearness.
Returns
The calculated diffuse horizontal irradiance value.

◆ GetDiffuseHorizontalIlluminance()

virtual float GetDiffuseHorizontalIlluminance ( float  diffuseHorizontalRadiance,
float  skyBrightness,
float  skyClearness,
float  solarZenithAngle,
float  atmWaterContent 
)
pure virtual

Converts a radiance value to an illuminance.

Parameters
diffuseHorizontalRadianceThe measured diffuse horizontal radiance.
skyBrightnessThe measured sky brightness (may be calculated through CalcSkyBrightness()).
skyClearnessThe measured sky clearness (may be calculated through CalcSkyClearness()).
solarZenithAngleThe angle between the sun and the zenith (0,0,1), in radians.
atmWaterContentThe atmospheric water content (maybe calculated through GetAtmosphericPrecipitableWaterContent()).
Returns
The illuminance value, calculated from the inputs.

◆ GetDirectNormalIlluminance()

virtual float GetDirectNormalIlluminance ( float  directNormalRadiance,
float  skyBrightness,
float  skyClearness,
float  solarZenithAngle,
float  atmWaterContent 
)
pure virtual

Converts a radiance value to an illuminance.

Parameters
directNormalRadianceThe measured direct normal radiance.
skyBrightnessThe measured sky brightness (may be calculated through CalcSkyBrightness()).
skyClearnessThe measured sky clearness (may be calculated through CalcSkyClearness()).
solarZenithAngleThe angle between the sun and the zenith (0,0,1), in radians.
atmWaterContentThe atmospheric water content (maybe calculated through GetAtmosphericPrecipitableWaterContent()).
Returns
The illuminance value, calculated from the inputs.

◆ GetDiffuseHorizontalIrradiance()

virtual float GetDiffuseHorizontalIrradiance ( float  diffuseHorizontalIlluminance,
float  skyBrightness,
float  skyClearness,
float  solarZenithAngle,
float  atmWaterContent 
)
pure virtual

Converts an illuminance value to an irradiance.

Parameters
diffuseHorizontalIlluminanceThe measured diffuse horizontal illuminance.
skyBrightnessThe measured sky brightness (may be calculated through CalcSkyBrightness()).
skyClearnessThe measured sky clearness (may be calculated through CalcSkyClearness()).
solarZenithAngleThe angle between the sun and the zenith (0,0,1), in radians.
atmWaterContentThe atmospheric water content (maybe calculated through GetAtmosphericPrecipitableWaterContent()).
Returns
The irradiance value, calculated from the inputs.

◆ GetDirectNormalIrradiance()

virtual float GetDirectNormalIrradiance ( float  directNormalIllumiance,
float  skyBrightness,
float  skyClearness,
float  solarZenithAngle,
float  atmWaterContent 
)
pure virtual

Converts an illuminance value to an irradiance.

Parameters
directNormalIllumianceThe measured direct normal illuminance.
skyBrightnessThe measured sky brightness (may be calculated through CalcSkyBrightness()).
skyClearnessThe measured sky clearness (may be calculated through CalcSkyClearness()).
solarZenithAngleThe angle between the sun and the zenith (0,0,1), in radians.
atmWaterContentThe atmospheric water content (maybe calculated through GetAtmosphericPrecipitableWaterContent()).
Returns
The irradiance value, calculated from the inputs.

◆ GetAtmosphericPrecipitableWaterContent()

virtual float GetAtmosphericPrecipitableWaterContent ( BOOL  tempValid,
float  surfaceDewPointTemp 
)
pure virtual

Converts a dew point temperature to an atmospheric water content.

Parameters
tempValidIndicates whether the value stored in surfaceDewPointTemp is valid and usable. If false, then the value stored in surfaceDewPointTemp is ignored, and a default value is returned instead.
surfaceDewPointTempThe dew point temperature.
Returns
The atmospheric water content, calculated from the input value.