#include <location.h>
Collaboration diagram for Location:

Public Types | |
| enum | FeatureType { City = 0x00000001, Observatory = 0x00000002, LandingSite = 0x00000004, Crater = 0x00000008, Vallis = 0x00000010, Mons = 0x00000020, Planum = 0x00000040, Chasma = 0x00000080, Patera = 0x00000100, Mare = 0x00000200, Rupes = 0x00000400, Tessera = 0x00000800, Regio = 0x00001000, Chaos = 0x00002000, Terra = 0x00004000, Astrum = 0x00008000, Corona = 0x00010000, Dorsum = 0x00020000, Fossa = 0x00040000, Catena = 0x00080000, Mensa = 0x00100000, Rima = 0x00200000, Undae = 0x00400000, Reticulum = 0x01000000, Planitia = 0x02000000, Linea = 0x04000000, Fluctus = 0x08000000, Farrum = 0x10000000, Other = 0x80000000 } |
Public Member Functions | |
| uint32 | getFeatureType () const |
| Point3d | getHeliocentricPosition (double) const |
| float | getImportance () const |
| std::string | getInfoURL () const |
| std::string | getName (bool i18n=false) const |
| Body * | getParentBody () const |
| Point3d | getPlanetocentricPosition (double) const |
| Vec3f | getPosition () const |
| float | getSize () const |
| Location () | |
| void | setFeatureType (uint32) |
| void | setImportance (float) |
| void | setInfoURL (const std::string &) |
| void | setName (const std::string &) |
| void | setParentBody (Body *) |
| void | setPosition (const Vec3f &) |
| void | setSize (float) |
| virtual | ~Location () |
Static Public Member Functions | |
| static uint32 | parseFeatureType (const std::string &) |
Private Attributes | |
| uint32 | featureType |
| std::string | i18nName |
| float | importance |
| std::string * | infoURL |
| std::string | name |
| Body * | parent |
| Vec3f | position |
| float | size |
|
|
Definition at line 52 of file location.h. 00053 {
00054 City = 0x00000001,
00055 Observatory = 0x00000002,
00056 LandingSite = 0x00000004,
00057 Crater = 0x00000008,
00058 Vallis = 0x00000010,
00059 Mons = 0x00000020,
00060 Planum = 0x00000040,
00061 Chasma = 0x00000080,
00062 Patera = 0x00000100,
00063 Mare = 0x00000200,
00064 Rupes = 0x00000400,
00065 Tessera = 0x00000800,
00066 Regio = 0x00001000,
00067 Chaos = 0x00002000,
00068 Terra = 0x00004000,
00069 Astrum = 0x00008000,
00070 Corona = 0x00010000,
00071 Dorsum = 0x00020000,
00072 Fossa = 0x00040000,
00073 Catena = 0x00080000,
00074 Mensa = 0x00100000,
00075 Rima = 0x00200000,
00076 Undae = 0x00400000,
00077 Reticulum = 0x01000000,
00078 Planitia = 0x02000000,
00079 Linea = 0x04000000,
00080 Fluctus = 0x08000000,
00081 Farrum = 0x10000000,
00082 Other = 0x80000000,
00083 };
|
|
|
Definition at line 62 of file location.cpp. 00062 : 00063 parent(NULL), 00064 position(0.0f, 0.0f, 0.0f), 00065 size(0.0f), 00066 importance(-1.0f), 00067 featureType(Other), 00068 infoURL(NULL) 00069 { 00070 }
|
|
|
Definition at line 72 of file location.cpp. References infoURL. 00073 {
00074 if (infoURL != NULL)
00075 delete infoURL;
00076 }
|
|
|
Definition at line 141 of file location.cpp. References featureType. Referenced by object_getinfo(). 00142 {
00143 return featureType;
00144 }
|
|
|
Definition at line 196 of file location.cpp. References Body::getHeliocentricPosition(), getPlanetocentricPosition(), parent, position, Vector3< T >::x, Vector3< T >::y, and Vector3< T >::z. 00197 {
00198 if (parent == NULL)
00199 return Point3d(position.x, position.y, position.z);
00200
00201 return parent->getHeliocentricPosition(t) +
00202 (getPlanetocentricPosition(t) - Point3d(0.0, 0.0, 0.0));
00203 }
|
|
|
Definition at line 118 of file location.cpp. References importance. Referenced by object_getinfo(). 00119 {
00120 return importance;
00121 }
|
|
|
Definition at line 130 of file location.cpp. Referenced by object_getinfo(). 00131 {
00132 return "";
00133 }
|
|
|
Definition at line 79 of file location.cpp. References i18nName, and name. Referenced by Selection::getName(), object_getinfo(), object_name(), and CelestiaCore::renderOverlay(). 00080 {
00081 if (!i18n || i18nName == "") return name;
00082 return i18nName;
00083 }
|
|
|
Definition at line 174 of file location.cpp. References parent. Referenced by FrameOfReference::fromUniversal(), Simulation::getObjectCompletion(), Selection::getPosition(), object_getinfo(), and FrameOfReference::toUniversal(). 00175 {
00176 return parent;
00177 }
|
|
|
Definition at line 186 of file location.cpp. References Body::getEclipticalToGeographic(), parent, position, Quaternion< T >::toMatrix3(), Vector3< T >::x, Vector3< T >::y, and Vector3< T >::z. Referenced by getHeliocentricPosition(). 00187 {
00188 if (parent == NULL)
00189 return Point3d(position.x, position.y, position.z);
00190
00191 Quatd q = parent->getEclipticalToGeographic(t);
00192 return Point3d(position.x, position.y, position.z) * q.toMatrix3();
00193 }
|
|
|
Definition at line 94 of file location.cpp. References position. 00095 {
00096 return position;
00097 }
|
|
|
Definition at line 106 of file location.cpp. References size. Referenced by object_getinfo(), and Selection::radius(). 00107 {
00108 return size;
00109 }
|
|
|
Definition at line 164 of file location.cpp. References FeatureNameToFlag, featureTableInitialized, initFeatureTypeTable(), and Other. 00165 {
00166 if (!featureTableInitialized)
00167 initFeatureTypeTable();
00168
00169 int flag = FeatureNameToFlag[s];
00170 return flag != 0 ? flag : (uint32) Other;
00171 }
|
|
|
Definition at line 147 of file location.cpp. References featureType. Referenced by CreateLocation(). 00148 {
00149 featureType = _featureType;
00150 }
|
|
|
Definition at line 124 of file location.cpp. References importance. Referenced by CreateLocation(). 00125 {
00126 importance = _importance;
00127 }
|
|
|
Definition at line 136 of file location.cpp. 00137 {
00138 }
|
|
|
Definition at line 86 of file location.cpp. References _, i18nName, and name. Referenced by LoadSolarSystemObjects(). 00087 {
00088 name = _name;
00089 i18nName = _(_name.c_str());
00090 if (name == i18nName) i18nName = "";
00091 }
|
|
|
Definition at line 180 of file location.cpp. References parent. 00181 {
00182 parent = _parent;
00183 }
|
|
|
Definition at line 100 of file location.cpp. References position. Referenced by CreateLocation(). 00101 {
00102 position = _position;
00103 }
|
|
|
Definition at line 112 of file location.cpp. References size. Referenced by CreateLocation(). 00113 {
00114 size = _size;
00115 }
|
|
|
Definition at line 92 of file location.h. Referenced by getFeatureType(), and setFeatureType(). |
|
|
Definition at line 88 of file location.h. |
|
|
Definition at line 91 of file location.h. Referenced by getImportance(), and setImportance(). |
|
|
Definition at line 93 of file location.h. Referenced by ~Location(). |
|
|
Definition at line 87 of file location.h. |
|
|
Definition at line 86 of file location.h. Referenced by getHeliocentricPosition(), getParentBody(), getPlanetocentricPosition(), and setParentBody(). |
|
|
Definition at line 89 of file location.h. Referenced by getHeliocentricPosition(), getPlanetocentricPosition(), getPosition(), and setPosition(). |
|
|
Definition at line 90 of file location.h. |
1.4.1