Rhino C++ API
8.13
|
#include <opennurbs_sun.h>
Public Member Functions | |
ON_Sun () | |
ON_Sun (const ON_Sun &sun) | |
ON_Sun (ON_EarthAnchorPoint &eap) | |
ON_Sun (ON_XMLNode &model_node) | |
virtual | ~ON_Sun () |
virtual ON_SunEngine::Accuracy | Accuracy (void) const |
Get the accuracy of the sun calculations. The default is minimum accuracy (for more speed). More... | |
virtual double | Altitude (void) const |
Returns the altitude of the sun in degrees. More... | |
virtual double | Azimuth (void) const |
virtual ON_3dVector | CalculateVectorFromAzimuthAndAltitude (void) const |
virtual ON__UINT32 | DataCRC (ON__UINT32 current_remainder) const |
Returns the CRC of the sun state. More... | |
virtual int | DaylightSavingMinutes (void) const |
Returns the daylight saving offset of the observer in minutes. More... | |
virtual bool | DaylightSavingOn (void) const |
Returns true if daylight saving is on, else false. More... | |
virtual bool | EnableAllowed (void) const |
Returns true if enabling/disabling the sun is allowed, else false. More... | |
virtual bool | EnableOn (void) const |
Returns true if the sun is enabled, else false. More... | |
virtual void * | EVF (const wchar_t *func, void *data) |
Emergency virtual function for future expansion. More... | |
virtual double | Intensity (void) const |
Returns the intensity to be used for the sun. This is 1.0 by default. More... | |
virtual bool | IsValid (void) const |
Returns true if all the sun parameters are valid, or false if any value is invalid. More... | |
virtual double | Latitude (void) const |
Returns the latitude of the observer. More... | |
virtual ON_Light | Light (void) const |
< These utility methods are provided for convenience and perform calculations by using ON_SunEngine. More... | |
virtual void | LoadFromXMLNode (const ON_XMLNode &node) |
Load the sun properties from a 'sun' XML node. More... | |
virtual void | LocalDateTime (int &year, int &month, int &day, double &hours) const |
virtual double | Longitude (void) const |
Returns the longitude of the observer. More... | |
virtual bool | ManualControlAllowed (void) const |
Returns true if manual control of the sun position is allowed, else false. More... | |
virtual bool | ManualControlOn (void) const |
Returns true if manual control of the sun position is in effect, else false. More... | |
virtual double | North (void) const |
virtual void | OnInternalXmlChanged (const ON_Sun *) |
For internal use only. More... | |
virtual bool | operator!= (const ON_Sun &sun) const |
virtual const ON_Sun & | operator= (const ON_Sun &sun) |
virtual bool | operator== (const ON_Sun &sun) const |
virtual bool | ReadFromArchive (ON_BinaryArchive &archive) |
Read the sun properties from an archive that was created by WriteToArchive(). More... | |
virtual void | SaveToXMLNode (ON_XMLNode &node) const |
Save the sun properties to a 'sun' XML node. More... | |
virtual void | SetAccuracy (ON_SunEngine::Accuracy acc) |
Set the accuracy of the sun calculations. The default is minimum accuracy (for more speed). More... | |
virtual void | SetAltitude (double altitude) |
virtual void | SetAzimuth (double azimuth) |
virtual void | SetAzimuthAndAltitudeFromVector (const ON_3dVector &v) |
Calculates and sets the sun's azimuth and altitude taking into account the direction of north. More... | |
virtual void | SetDaylightSavingMinutes (int minutes) |
Set the daylight saving of the observer in minutes, in the range 0 to 120. More... | |
virtual void | SetDaylightSavingOn (bool on) |
Set whether or not the observer is using daylight saving time. More... | |
virtual void | SetEnableAllowed (bool allowed) |
Set whether or not enabling/disabling the sun is allowed. More... | |
virtual void | SetEnableOn (bool on) |
Set whether or not the sun is enabled. More... | |
virtual void | SetIntensity (double intensity) |
Set the intensity to be used for the sun. This is 1.0 by default. More... | |
virtual void | SetLatitude (double latitude) |
virtual bool | SetLocalDateTime (int year, int month, int day, double hours) |
virtual void | SetLongitude (double longitude) |
virtual void | SetManualControlAllowed (bool allowed) |
Set whether or not manual control of the sun position is allowed. More... | |
virtual void | SetManualControlOn (bool manual) |
Set whether or not manual control of the sun position is in effect. More... | |
virtual void | SetNorth (double north) |
virtual void | SetShadowIntensity (double intensity) |
This is currently unused. More... | |
virtual void | SetTimeZone (double hours) |
Set the time zone of the observer in hours, in the range -12 to +13. More... | |
virtual bool | SetUTCDateTime (int year, int month, int day, double hours) |
virtual double | ShadowIntensity (void) const |
This is currently unused. More... | |
virtual double | TimeZone (void) const |
Returns the time zone of the observer in decimal hours. More... | |
virtual void | UTCDateTime (int &year, int &month, int &day, double &hours) const |
virtual bool | WriteToArchive (ON_BinaryArchive &archive) const |
Write the sun properties to an archive. More... | |
Static Public Member Functions | |
static bool | IsValidDateTime (int year, int month, int day, int hour, int min, int sec) |
Returns true if the specified time is within the range supported by ON_Sun. More... | |
static int | MaxYear (void) |
Returns the maximum allowed year for sun methods. More... | |
static int | MinYear (void) |
Returns the minimum allowed year for sun methods. More... | |
static ON_4fColor | SunColorFromAltitude (double altitude) |
Get a color for rendering a sun light when the sun is at a particular altitude in the sky. More... | |
Friends | |
class | ON_3dmRenderSettingsPrivate |
< For internal use only. More... | |
class | ONX_Model |
Class ON_Sun represents a 'sun'. It can calculate the apparent position of the sun in the sky at a particular instant for a particular location on the Earth's surface. It can also be used to get the sun's color, a light representing the sun, or to generate an ephemeris.
ON_Sun::ON_Sun | ( | ) |
ON_Sun::ON_Sun | ( | ON_EarthAnchorPoint & | eap | ) |
ON_Sun::ON_Sun | ( | ON_XMLNode & | model_node | ) |
ON_Sun::ON_Sun | ( | const ON_Sun & | sun | ) |
|
virtual |
|
virtual |
Get the accuracy of the sun calculations. The default is minimum accuracy (for more speed).
|
virtual |
Returns the altitude of the sun in degrees.
|
virtual |
Returns the azimuth of the sun in degrees. The value increases Eastwards with North as zero. Note: This value is not affected by the direction of north. See North().
|
virtual |
Returns The sun's direction vector in world space, taking into account the sun's azimuth and altitude and the direction of north. Note that this does not actually calculate the azimuth or altitude from the place and time; it merely uses the stored azimuth and altitude values.
|
virtual |
Returns the CRC of the sun state.
|
virtual |
Returns the daylight saving offset of the observer in minutes.
|
virtual |
Returns true if daylight saving is on, else false.
|
virtual |
Returns true if enabling/disabling the sun is allowed, else false.
|
virtual |
Returns true if the sun is enabled, else false.
|
virtual |
Emergency virtual function for future expansion.
|
virtual |
Returns the intensity to be used for the sun. This is 1.0 by default.
|
virtual |
Returns true if all the sun parameters are valid, or false if any value is invalid.
|
static |
Returns true if the specified time is within the range supported by ON_Sun.
|
virtual |
Returns the latitude of the observer.
|
virtual |
< These utility methods are provided for convenience and perform calculations by using ON_SunEngine.
Get an ON_Light which represents the sun. Note that this does not actually calculate the sun's azimuth or altitude from the place and time. It merely uses the stored azimuth and altitude values.
|
virtual |
Load the sun properties from a 'sun' XML node.
|
virtual |
Retrieves the local date and time of the observer. Param year accepts the year in the range MinYear() to MaxYear(). Param month accepts the month in the range 1 to 12. Param day accepts the day in the range 1 to 31. Param hours accepts the time expressed as decimal hours in the range 0 to 24. Returns The local date and time of the observer.
|
virtual |
Returns the longitude of the observer.
|
virtual |
Returns true if manual control of the sun position is allowed, else false.
|
virtual |
Returns true if manual control of the sun position is in effect, else false.
|
static |
Returns the maximum allowed year for sun methods.
|
static |
Returns the minimum allowed year for sun methods.
|
virtual |
Returns The world angle corresponding to North in degrees. This angle is zero along the x-axis and increases anticlockwise.
|
virtual |
For internal use only.
|
virtual |
|
virtual |
|
virtual |
Read the sun properties from an archive that was created by WriteToArchive().
|
virtual |
Save the sun properties to a 'sun' XML node.
|
virtual |
Set the accuracy of the sun calculations. The default is minimum accuracy (for more speed).
|
virtual |
Set the sun's altitude when manual control is in effect. Param altitude is the sun's altitude in degrees in the range -90 to +90.
|
virtual |
Set the azimuth of the sun when manual control is in effect. Param azimuth is the sun's azimuth in degrees. The value increases Eastwards with North as zero. Note: This value is not affected by the direction of north.
|
virtual |
Calculates and sets the sun's azimuth and altitude taking into account the direction of north.
|
virtual |
Set the daylight saving of the observer in minutes, in the range 0 to 120.
|
virtual |
Set whether or not the observer is using daylight saving time.
|
virtual |
Set whether or not enabling/disabling the sun is allowed.
|
virtual |
Set whether or not the sun is enabled.
|
virtual |
Set the intensity to be used for the sun. This is 1.0 by default.
|
virtual |
Set the latitude of the observer. Param latitude is the observer's latitude in degrees in the range -90 to +90.
|
virtual |
Set the local date and time of the observer. Param year is the year which must lie between MinYear() to MaxYear() inclusive. Param month is the month in the range 1 to 12. Param day is the day in the range 1 to 31. Param hours is the time expressed as decimal hours in the range 0 to 24. Returns true if successful, false if the date is out of range.
|
virtual |
Set the longitude of the observer. Param longitude is the observer's longitude in degrees in the range -180 to +180.
|
virtual |
Set whether or not manual control of the sun position is allowed.
|
virtual |
Set whether or not manual control of the sun position is in effect.
|
virtual |
Set the azimuth corresponding to North. north is the world angle corresponding to North in degrees in the range 0 to 360. This angle is zero along the x-axis and increases anticlockwise.
|
virtual |
This is currently unused.
|
virtual |
Set the time zone of the observer in hours, in the range -12 to +13.
|
virtual |
Set the date and time of the observer expressed in Coordinated Universal Time. This is the same as the local date and time adjusted for the observer's time zone and daylight saving. Param year is the year which must lie between MinYear() to MaxYear() inclusive. Param month is the month in the range 1 to 12. Param day is the day in the range 1 to 31. Param hours is the time expressed as decimal hours in the range 0 to 24. Returns true if successful, false if the date is out of range.
|
virtual |
This is currently unused.
|
static |
Get a color for rendering a sun light when the sun is at a particular altitude in the sky.
|
virtual |
Returns the time zone of the observer in decimal hours.
|
virtual |
Retrieves the date and time of the observer expressed in Coordinated Universal Time. This is the same as the local date and time adjusted for the observer's time zone and daylight saving. Param year accepts the year in the range MinYear() to MaxYear(). Param month accepts the month in the range 1 to 12. Param day accepts the day in the range 1 to 31. Param hours accepts the time expressed as decimal hours in the range 0 to 24. Returns The UTC date and time of the observer.
|
virtual |
Write the sun properties to an archive.
|
friend |
< For internal use only.
|
friend |