Rhino C++ API
8.13
|
Class ON_SunEngine is a sun astronomical calculation engine. More...
#include <opennurbs_sun.h>
Public Types | |
enum | Accuracy { Accuracy::Minimum, Accuracy::Maximum } |
Public Member Functions | |
ON_SunEngine (Accuracy a) | |
ON_SunEngine (const ON_SunEngine &) | |
virtual | ~ON_SunEngine () |
virtual double | Altitude (void) const |
Returns The altitude of the sun in degrees. More... | |
virtual double | Azimuth (void) const |
Returns The azimuth of the sun in degrees. More... | |
virtual int | DaylightSavingMinutes (void) const |
Returns The daylight saving of the observer in minutes. More... | |
virtual double | JulianDay (void) const |
Returns The Julian Day corresponding to Universal Time (UT ~ GMT). More... | |
virtual double | Latitude (void) const |
Return the latitude of the observer in degrees. More... | |
virtual void | LocalDateTime (int &year, int &month, int &day, double &hours) const |
virtual double | LocalJulianDay (void) const |
Returns The Julian Day corresponding to local time. More... | |
virtual double | Longitude (void) const |
Return the longitude of the observer in degrees. More... | |
bool | operator!= (const ON_SunEngine &e) |
const ON_SunEngine & | operator= (const ON_SunEngine &) |
bool | operator== (const ON_SunEngine &e) |
virtual bool | SetDaylightSavingMinutes (int iMinutes) |
virtual bool | SetLatitude (double dLat) |
virtual bool | SetLocalDateTime (int iYear, int iMonth, int iDay, double dHours) |
virtual bool | SetLocalJulianDay (double dLocalJulianDay) |
virtual bool | SetLongitude (double dLong) |
virtual bool | SetTimeZoneHours (double dHours) |
virtual double | TimeZoneHours (void) const |
Returns The time zone of the observer in hours. More... | |
Static Public Member Functions | |
static void | ConvertHorizonCoordsToSolarVector (double dAzimuth, double dAltitude, double *dVector) |
Helper function; converts azimuth and altitude to unit vector. More... | |
static void | ConvertSolarVectorToHorizonCoords (const double *dVector, double &dAzimuth, double &dAltitude) |
Helper function; converts unit vector to azimuth and altitude. More... | |
static int | DaysInMonth (int month, int year) |
Helper function; returns the number of days in a month for a specific year. More... | |
static void | GetCurrentLocalDateTime (int &y, int &m, int &d, double &h) |
Helper function; gets the current local date and time. More... | |
static void | GetDefaultLocalDateTime (int &y, int &m, int &d, double &h) |
Class ON_SunEngine is a sun astronomical calculation engine.
Copyright (c) 1993-2022 Robert McNeel & Associates. All rights reserved. OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert McNeel & Associates.
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.
For complete openNURBS copyright information see http://www.opennurbs.org.
|
strong |
ON_SunEngine::ON_SunEngine | ( | Accuracy | a | ) |
ON_SunEngine::ON_SunEngine | ( | const ON_SunEngine & | ) |
|
virtual |
|
virtual |
Returns The altitude of the sun in degrees.
|
virtual |
Returns The azimuth of the sun in degrees.
|
static |
Helper function; converts azimuth and altitude to unit vector.
|
static |
Helper function; converts unit vector to azimuth and altitude.
|
virtual |
Returns The daylight saving of the observer in minutes.
|
static |
Helper function; returns the number of days in a month for a specific year.
|
static |
Helper function; gets the current local date and time.
|
static |
Helper function; gets the default local date and time. This is March 21st of the current year at 12:00 noon local time.
|
virtual |
Returns The Julian Day corresponding to Universal Time (UT ~ GMT).
|
virtual |
Return the latitude of the observer in degrees.
|
virtual |
Gets the local date and time of the observer. Param year accepts the year in the range 1800 to 2199. 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 hour in the range 0 to 24.
|
virtual |
Returns The Julian Day corresponding to local time.
|
virtual |
Return the longitude of the observer in degrees.
bool ON_SunEngine::operator!= | ( | const ON_SunEngine & | e | ) |
const ON_SunEngine& ON_SunEngine::operator= | ( | const ON_SunEngine & | ) |
bool ON_SunEngine::operator== | ( | const ON_SunEngine & | e | ) |
|
virtual |
Set the daylight saving of the observer in minutes. Must be in the range 0 to 120. Returns true if minutes is valid, else false.
|
virtual |
Set the latitude of the observer in degrees. Must be in the range -90 to +90. This value is used by the calculation of the sun's azimuth and altitude. Returns true if latitude is valid, else false.
|
virtual |
Set the local date and time of the observer. The date must lie between 1800 and 2199 inclusive. The time is supplied as decimal hours which must be in the range 0 to 24. Returns true if date and time are valid, else false.
|
virtual |
Set the local Julian Day of the observer. Optional alternative to calling SetLocalDateTime(). Returns true if Julian Day is valid, else false.
|
virtual |
Set the longitude of the observer in degrees. Must be in the range -180 to +180. This value is used by the calculation of the sun's azimuth and altitude. Returns true if longitude is valid, else false.
|
virtual |
Set the time zone of the observer in hours. Must be in the range -12 to +13. Returns true if hours is valid, else false.
|
virtual |
Returns The time zone of the observer in hours.