IDaylightSystem2 Class Reference

IDaylightSystem2 Class Referenceabstract

#include <IDaylightSystem.h>

Class Description

Extends IDaylightSystem with new functionality This interface can be obtained when the daylight system is created.

See IDaylightSystemFactory2::Create In the case of an already existent daylight system, this interface can be obtained from the base object of the daylight assembly:

Object* daylightAssemblyObj = ...
BaseInterface* bi = daylightAssemblyObj->GetInterface(IID_DAYLIGHT_SYSTEM2);
IDaylightSystem2* ds = dynamic_cast<IDaylightSystem2*>(bi);
+ Inheritance diagram for IDaylightSystem2:

Public Types

enum  DaylightControlType { eDateAndTime = 0, eManual = 1, eWeatherFile = 2 }
 
- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease, immediateRelease, wantsRelease, serverControlled }
 

Public Member Functions

virtual Interface_ID GetID ()
 
virtual int GetTimeZone (float longitude) const =0
 Computes the approximate time zone from a longitude. More...
 
virtual LightObjectSetSun (const Class_ID &sunClassID)=0
 Sets the sun object of the daylight system. More...
 
virtual LightObjectSetSky (const Class_ID &skyClassID)=0
 Sets the sun object of the daylight system. More...
 
virtual DaylightControlType GetDaylightControlType () const =0
 Returns how the location of the sun in the daylight system is being controlled. More...
 
virtual void SetDaylightControlType (DaylightControlType val)=0
 Specify how the location of the sun in the daylight system will be controlled. More...
 
virtual MSTR GetLocation ()=0
 Returns the name of the location of the daylight system. More...
 
virtual void GetAltitudeAzimuth (TimeValue t, float &altitude, float &azimuth)=0
 Get the alititude and the azimuth angles of the sun at that particular time. More...
 
virtual MaxSDK::AssetManagement::AssetUser GetWeatherFile () const =0
 Get the name of the weather file that is in use in the daylight system. More...
 
virtual void SetWeatherFile (const MaxSDK::AssetManagement::AssetUser &val)=0
 Set the name of the weather file. More...
 
virtual void OpenWeatherFileDlg ()=0
 Opens the weather file dialog. More...
 
virtual bool GetTemps (float &dryBulbTemperature, float &dewPointTemperature)=0
 Get temperature values. More...
 
virtual bool GetExtraTerrestialRadiation (float &extraterrestrialHorizontalRadiation, float &extraterrestrialDirectNormalRadiation)=0
 Get extraterrestrial radiation values. More...
 
virtual bool GetRadiation (float &globalHorizontalRadiation, float &directNormalRadiation, float &diffuseHorizontalRadiation)=0
 Get the radiation values. More...
 
virtual bool GetIlluminance (float &globalHorizontalIlluminance, float &directNormalIlluminance, float &diffuseHorizontalIlluminance, float &zenithIlluminance)=0
 Get the illuminance values. More...
 
- Public Member Functions inherited from IDaylightSystem
virtual LightObjectGetSun () const =0
 Returns the sun component of the daylight system. More...
 
virtual LightObjectGetSky () const =0
 Returns the sky component of the daylight system. More...
 
virtual void SetPosition (const Point3 &position)=0
 Sets the position of the compass of the daylight system. More...
 
virtual Point3 GetPosition () const =0
 Returns the position of the compass of the daylight system. More...
 
virtual void SetOrbitalScale (float orbScale)=0
 Sets the orbital scale of the system. More...
 
virtual float GetOrbitalScale () const =0
 Returns the orbital scale of the system. More...
 
virtual void SetNorthDirection (float angle)=0
 Sets the value of the north direction. More...
 
virtual float GetNorthDirection () const =0
 Returns the value of the north direction. More...
 
virtual void SetCompassDiameter (float compassDiameter)=0
 Sets the compass diameter of this daylight. More...
 
virtual float GetCompassDiameter () const =0
 Returns the compass diameter of this daylight system. More...
 
virtual void SetTimeOfDay (const Point3 &time)=0
 Sets the current time associated with this daylight system. More...
 
virtual Point3 GetTimeOfDay () const =0
 Returns the current time associated with this daylight system. More...
 
virtual void SetDate (const Point3 &date)=0
 Sets the current date associated to this daylight system. More...
 
virtual Point3 GetDate () const =0
 Returns the current date associated to this daylight system. More...
 
virtual void SetLatLong (float latitude, float longitude)=0
 Set the latitude and longitude of this daylight system, note that the time zone, city, azimuth and altitude are automatically calculated. More...
 
virtual float GetLatitude () const =0
 Returns latitude value of this daylight system. More...
 
virtual float GetLongitude () const =0
 Longitude value of this daylight system. More...
 
virtual void SetDaylightSavingTime (BOOL isDaylightSavingTime)=0
 Set the daylight saving time parameter. More...
 
virtual BOOL GetDaylightSavingTime () const =0
 Returns the daylight saving time parameter. More...
 
- 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)
 
- 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...
 

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

Member Enumeration Documentation

Remarks
The DaylightControlType enumeration is for specifying how the daylight system is controlled,manually, from a specified date and time or via a weather file.
Enumerator
eDateAndTime 
eManual 
eWeatherFile 
263  {
264  eDateAndTime = 0, eManual = 1, eWeatherFile = 2
265  };
Definition: IDaylightSystem.h:264
Definition: IDaylightSystem.h:264
Definition: IDaylightSystem.h:264

Member Function Documentation

virtual Interface_ID GetID ( )
inlinevirtual
Remarks
This method overrides GetID() in those interfaces that do not publish metadata but instead have a unique Interface_ID for quick internal identification in implementation code that might be shared by a bunch of mixin interfaces.
Returns
The Interface_ID.
Default Implementation:
{ return GetDesc()->ID; }

Reimplemented from FPMixinInterface.

234 { return IID_DAYLIGHT_SYSTEM2; }
#define IID_DAYLIGHT_SYSTEM2
Definition: IDaylightSystem.h:218
virtual int GetTimeZone ( float  longitude) const
pure virtual

Computes the approximate time zone from a longitude.

Parameters
[in]longitudeThe longitude from which the time zone is computed. The longitude is expected to be in the [-180.0, 180.0] range. It it isn't, it's converted to this range.
Returns
The approximate time zone corresponding to a given longitude The time zone will be in the [-12, 12] range.
virtual LightObject* SetSun ( const Class_ID sunClassID)
pure virtual

Sets the sun object of the daylight system.

Parameters
[in]sunClassIDClass ID of new sun. The supper class id of the sun is assumed to be LIGHT_CLASS_ID.
Returns
A pointer to the new sun object or NULL if the operation failed
virtual LightObject* SetSky ( const Class_ID skyClassID)
pure virtual

Sets the sun object of the daylight system.

Parameters
[in]skyClassIDClass ID of new sky. The supper class id of the sky is assumed to be LIGHT_CLASS_ID.
Returns
A pointer to the new sky object or NULL if the operation failed
virtual DaylightControlType GetDaylightControlType ( ) const
pure virtual

Returns how the location of the sun in the daylight system is being controlled.

Returns
Returns how the location of the sun in the daylight system is being controlled. If the return value is eDataAndTime, the daylight system is controlled by a specified date and time. If the return value is eManual, then the postion of the sun is controlled manually, if the value is eWeather File then the postion of the sun is driven by a weather file.
virtual void SetDaylightControlType ( DaylightControlType  val)
pure virtual

Specify how the location of the sun in the daylight system will be controlled.

Parameters
[in]valSpecifies how the location of the sun in the daylight system is being controlled. If the value is eDataAndTime, the daylight system will be controlled by a specified date and time. If the value is eManual, then the postion of the sun will be controlled manually, if the value is eWeather File then the position of the sun will be driven by a weather file.
virtual MSTR GetLocation ( )
pure virtual

Returns the name of the location of the daylight system.

Usually this is the city name.

Returns
Returns the name of the location, usually a city name. If no location is specified in the Daylight System an empty string will be returned.
virtual void GetAltitudeAzimuth ( TimeValue  t,
float &  altitude,
float &  azimuth 
)
pure virtual

Get the alititude and the azimuth angles of the sun at that particular time.

Parameters
[in]tThe time at which to get the alitude and azimuth of the sun.
[out]altitudeThe angle of the sun above the horizon. In radians, ranges from 0 at the horizon to PI/2 at the zenith.
[out]azimuthThe angle of the sun about north. In radians, ranges from 0 at due north, PI/2 at due east, etc..
virtual MaxSDK::AssetManagement::AssetUser GetWeatherFile ( ) const
pure virtual

Get the name of the weather file that is in use in the daylight system.

Returns
Returns an AssetUser pointing on the weather file. Note that a valid name may be returned even if the weather file isn't being used to drive the sun position.
See also
GetDaylightControlType.
virtual void SetWeatherFile ( const MaxSDK::AssetManagement::AssetUser val)
pure virtual

Set the name of the weather file.

Parameters
[in]valThe AssetUser containing the weather file name that may be used to drive the daylight system.
virtual void OpenWeatherFileDlg ( )
pure virtual

Opens the weather file dialog.

Opens the Weather File Dialog. Note that if the daylight system isn't being controlled by the weather file,

See also
GetDaylightControlType, then this operation will do nothing.
virtual bool GetTemps ( float &  dryBulbTemperature,
float &  dewPointTemperature 
)
pure virtual

Get temperature values.

Get temperature values usually from a weather file based upon the current time.

Parameters
[out]dryBulbTemperatureThe dry bulb temperature usually stored in the weather file at the current time.
[out]dewPointTemperatureThe dew point temperatureusually stored in the weather file at the current time.
Returns
Will return false if the daylight system isn't being controlled by a weather file of the weather file can't be opened correctly or if the weather file doesn't contain these values accurately otherwise if it gets the values correctly it will return true. In the future these values may be stored elsehwhere besides weather files.
virtual bool GetExtraTerrestialRadiation ( float &  extraterrestrialHorizontalRadiation,
float &  extraterrestrialDirectNormalRadiation 
)
pure virtual

Get extraterrestrial radiation values.

Get extraterrestrial radiation values usually from a weather file based upon the current time.

Parameters
[out]extraterrestrialHorizontalRadiationThe extraterrestrial horizontal radiation usually stored in the weather file at the current time.
[out]extraterrestrialDirectNormalRadiationThe extraterrestrial direct normal radiation usually stored in the weather file at the current time.
Returns
Will return false if the daylight system isn't being controlled by a weather file of the weather file can't be opened correctly or if the weather file doesn't contain these values accurately otherwise if it gets the values correctly it will return true. In the future these values may be stored elsehwhere besides weather files.
virtual bool GetRadiation ( float &  globalHorizontalRadiation,
float &  directNormalRadiation,
float &  diffuseHorizontalRadiation 
)
pure virtual

Get the radiation values.

Get radiation values usually from a weather file based upon the current time.

Parameters
[out]globalHorizontalRadiationThe global horizontal radiation usually stored in the weather file at the current time.
[out]directNormalRadiationThe direct normal radiation usually stored in the weather file at the current time.
[out]diffuseHorizontalRadiationThe diffuse horizontal radiation usually stored in the weather file at the current time.
Returns
Will return false if the daylight system isn't being controlled by a weather file of the weather file can't be opened correctly or if the weather file doesn't contain these values accurately otherwise if it gets the values correctly it will return true. In the future these values may be stored elsehwhere besides weather files.
virtual bool GetIlluminance ( float &  globalHorizontalIlluminance,
float &  directNormalIlluminance,
float &  diffuseHorizontalIlluminance,
float &  zenithIlluminance 
)
pure virtual

Get the illuminance values.

Get illuminance values usually from a weather file based upon the current time.

Parameters
[out]globalHorizontalIlluminanceThe global horizontal illuminance usually stored in the weather file at the current time.
[out]directNormalIlluminanceThe direct normal illuminance usually stored in the weather file at the current time.
[out]diffuseHorizontalIlluminanceThe diffuse horizontal illuminance usually stored in the weather file at the current time.
[out]zenithIlluminanceThe zenith illuminance usually stored in the weather file at the current time.
Returns
Will return false if the daylight system isn't being controlled by a weather file of the weather file can't be opened correctly or if the weather file doesn't contain these values accurately otherwise if it gets the values correctly it will return true. In the future these values may be stored elsehwhere besides weather files.