3ds Max C++ API Reference
IDaylightSystem Class Referenceabstract

Use this interface to access the sun and sky components of a daylight system created by IDaylightSystemFactory. More...

#include <IDaylightSystem.h>

+ Inheritance diagram for IDaylightSystem:

Public Member Functions

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)
 
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=nullptr)
 
- 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

Use this interface to access the sun and sky components of a daylight system created by IDaylightSystemFactory.

This interface can be obtained when the daylight system is created. See IDaylightSystemFactory::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(DAYLIGHT_SYSTEM_INTERFACE);
IDaylightSystem* ds = dynamic_cast<IDaylightSystem*>(bi);
#define DAYLIGHT_SYSTEM_INTERFACE
Definition: IDaylightSystem.h:89
Use this interface to access the sun and sky components of a daylight system created by IDaylightSyst...
Definition: IDaylightSystem.h:104
The object class is the base class for all objects.
Definition: object.h:1428
CoreExport void * GetInterface(ULONG id) override
Inherited from Animatable.
See also
IDaylightSystemFactory

Member Function Documentation

◆ GetSun()

virtual LightObject* GetSun ( ) const
pure virtual

Returns the sun component of the daylight system.

It can be directional light, IES sun or MR sun depending on the market defaults.

Returns
pointer on the sun.

◆ GetSky()

virtual LightObject* GetSky ( ) const
pure virtual

Returns the sky component of the daylight system.

It can be standard sky, IES sky or MR sky depending on the market defaults.

Returns
pointer on the sky.

◆ SetPosition()

virtual void SetPosition ( const Point3 position)
pure virtual

Sets the position of the compass of the daylight system.

Parameters
[in]positionOrigin position of the system

◆ GetPosition()

virtual Point3 GetPosition ( ) const
pure virtual

Returns the position of the compass of the daylight system.

Returns
position of the compass of the daylight system.

◆ SetOrbitalScale()

virtual void SetOrbitalScale ( float  orbScale)
pure virtual

Sets the orbital scale of the system.

Parameters
[in]orbScaledistance of the sun (the directional light) from the compass rose (orbital scale in the UI) Note that the orbital scale does not have an effect on the sun's precision or how it's rendered.

◆ GetOrbitalScale()

virtual float GetOrbitalScale ( ) const
pure virtual

Returns the orbital scale of the system.

Returns
orbital scale value. Note that the orbital scale does not have an effect on the sun's precision or how it's rendered.

◆ SetNorthDirection()

virtual void SetNorthDirection ( float  angle)
pure virtual

Sets the value of the north direction.

Parameters
[in]anglerotational direction of the compass rose in the scene (north direction in the UI) The angle is in degree. The value is expected to be >=0.

◆ GetNorthDirection()

virtual float GetNorthDirection ( ) const
pure virtual

Returns the value of the north direction.

Returns
the value of the north direction. The angle is in degree. The value is expected to be >=0.

◆ SetCompassDiameter()

virtual void SetCompassDiameter ( float  compassDiameter)
pure virtual

Sets the compass diameter of this daylight.

Parameters
[in]compassDiameterthis parameter controls the diameter of the compass rose. Note that the compass diameter does not have an effect on the sun's precision or how it's rendered. The value is expected to be >=0.

◆ GetCompassDiameter()

virtual float GetCompassDiameter ( ) const
pure virtual

Returns the compass diameter of this daylight system.

Note that the compass diameter does not have an effect on the sun's precision or how it's rendered.

Returns
compass diameter.

◆ SetTimeOfDay()

virtual void SetTimeOfDay ( const Point3 time)
pure virtual

Sets the current time associated with this daylight system.

Parameters
[in]timetime of day. The expected format is : (hour,minute,second)

◆ GetTimeOfDay()

virtual Point3 GetTimeOfDay ( ) const
pure virtual

Returns the current time associated with this daylight system.

Returns
current time of the daylight system. The format is : (hour,minute,second).

◆ SetDate()

virtual void SetDate ( const Point3 date)
pure virtual

Sets the current date associated to this daylight system.

Parameters
[in]datedate of the year. The expected format is : (month,day,year)

◆ GetDate()

virtual Point3 GetDate ( ) const
pure virtual

Returns the current date associated to this daylight system.

Returns
the current date associated to this daylight system. The format is (month,day,year).

◆ SetLatLong()

virtual void SetLatLong ( float  latitude,
float  longitude 
)
pure virtual

Set the latitude and longitude of this daylight system, note that the time zone, city, azimuth and altitude are automatically calculated.

Parameters
[in]latitudelatitude of the location (used to determine city)
[in]longitudelongitude of the location (used to determine city)

◆ GetLatitude()

virtual float GetLatitude ( ) const
pure virtual

Returns latitude value of this daylight system.

Returns
Latitude value of this daylight system.

◆ GetLongitude()

virtual float GetLongitude ( ) const
pure virtual

Longitude value of this daylight system.

Returns
Longitude value of this daylight system.

◆ SetDaylightSavingTime()

virtual void SetDaylightSavingTime ( BOOL  isDaylightSavingTime)
pure virtual

Set the daylight saving time parameter.

Parameters
[in]isDaylightSavingTimeWhen on, calculates daylight savings by adjusting azimuth and altitude during the summer months.

◆ GetDaylightSavingTime()

virtual BOOL GetDaylightSavingTime ( ) const
pure virtual

Returns the daylight saving time parameter.

Returns
isDaylightSavingTime When on, calculates daylight savings by adjusting azimuth and altitude during the summer months.