#include <deepskyobj.h>
Inheritance diagram for DeepSkyObject:


Public Types | |
| enum | { InvalidCatalogNumber = 0xffffffff } |
Public Member Functions | |
| DeepSkyObject () | |
| float | getAbsoluteMagnitude () const |
| uint32 | getCatalogNumber () const |
| virtual size_t | getDescription (char *buf, size_t bufLength) const |
| std::string | getInfoURL () const |
| virtual unsigned int | getLabelMask () const |
| Quatf | getOrientation () const |
| Point3d | getPosition () const |
| float | getRadius () const |
| virtual unsigned int | getRenderMask () const |
| virtual const char * | getType () const =0 |
| virtual bool | load (AssociativeArray *, const std::string &resPath) |
| virtual void | render (const GLContext &context, const Vec3f &offset, const Quatf &viewerOrientation, float brightness, float pixelSize)=0 |
| void | setAbsoluteMagnitude (float) |
| void | setCatalogNumber (uint32) |
| void | setInfoURL (const std::string &) |
| void | setOrientation (const Quatf &) |
| void | setPosition (const Point3d &) |
| void | setRadius (float) |
| virtual void | setType (const std::string &)=0 |
| virtual | ~DeepSkyObject () |
Private Attributes | |
| float | absMag |
| uint32 | catalogNumber |
| std::string * | infoURL |
| Quatf | orientation |
| Point3d | position |
| float | radius |
|
|
Definition at line 70 of file deepskyobj.h. 00071 {
00072 InvalidCatalogNumber = 0xffffffff
00073 };
|
|
|
Definition at line 28 of file deepskyobj.cpp. References DSO_DEFAULT_ABS_MAGNITUDE. 00028 : 00029 catalogNumber(InvalidCatalogNumber), 00030 position(0, 0, 0), 00031 orientation(1), 00032 radius(1), 00033 absMag(DSO_DEFAULT_ABS_MAGNITUDE), 00034 infoURL(NULL) 00035 { 00036 }
|
|
|
Definition at line 38 of file deepskyobj.cpp. 00039 {
00040 }
|
|
|
Definition at line 77 of file deepskyobj.cpp. References absMag. Referenced by DSODatabase::calcAvgAbsMag(). 00078 {
00079 return absMag;
00080 }
|
|
|
Definition at line 34 of file deepskyobj.h. References catalogNumber. Referenced by DSODatabase::find(). 00035 {
00036 return catalogNumber;
00037 }
|
|
||||||||||||
|
Reimplemented in Galaxy, Nebula, and OpenCluster. Definition at line 87 of file deepskyobj.cpp. 00088 {
00089 if (bufLength > 0)
00090 buf[0] = '\0';
00091 return 0;
00092 }
|
|
|
Definition at line 94 of file deepskyobj.cpp. References infoURL. 00095 {
00096 if (infoURL == NULL)
00097 return "";
00098 else
00099 return *infoURL;
00100 }
|
|
|
Reimplemented in Galaxy, Nebula, and OpenCluster. Definition at line 68 of file deepskyobj.h. 00068 { return 0; }
|
|
|
Definition at line 57 of file deepskyobj.cpp. References orientation. Referenced by CelestiaCore::mouseMove(), Nebula::render(), Galaxy::renderGalaxyEllipsoid(), and Galaxy::renderGalaxyPointSprites(). 00058 {
00059 return orientation;
00060 }
|
|
|
Definition at line 47 of file deepskyobj.cpp. References position. Referenced by Selection::getPosition(). 00048 {
00049 return position;
00050 }
|
|
|
Definition at line 67 of file deepskyobj.cpp. References radius. Referenced by object_getinfo(), Nebula::render(), Galaxy::renderGalaxyEllipsoid(), Galaxy::renderGalaxyPointSprites(), and CelestiaCore::renderOverlay(). 00068 {
00069 return radius;
00070 }
|
|
|
Reimplemented in Galaxy, Nebula, and OpenCluster. Definition at line 67 of file deepskyobj.h. 00067 { return 0; }
|
|
|
Implemented in Galaxy, Nebula, and OpenCluster. |
|
||||||||||||
|
Reimplemented in Galaxy, Nebula, and OpenCluster. Definition at line 110 of file deepskyobj.cpp. References absMag, degToRad(), distance(), astro::equatorialToCelestialCart(), infoURL, position, radius, setAbsoluteMagnitude(), Quaternion< T >::setAxisAngle(), setInfoURL(), setOrientation(), setPosition(), setRadius(), Vector3< T >::x, Vector3< T >::y, and Vector3< T >::z. Referenced by OpenCluster::load(), Nebula::load(), Galaxy::load(), and DSODatabase::load(). 00111 {
00112 // Get position
00113 Vec3d position(0.0, 0.0, 0.0);
00114 if (params->getVector("Position", position))
00115 {
00116 setPosition(Point3d(position.x, position.y, position.z));
00117 }
00118 else
00119 {
00120 double distance = 1.0;
00121 double RA = 0.0;
00122 double dec = 0.0;
00123 params->getNumber("Distance", distance);
00124 params->getNumber("RA", RA);
00125 params->getNumber("Dec", dec);
00126 Point3d p = astro::equatorialToCelestialCart(RA, dec, distance);
00127 setPosition(p);
00128 }
00129
00130 // Get orientation
00131 Vec3d axis(1.0, 0.0, 0.0);
00132 double angle = 0.0;
00133 params->getVector("Axis", axis);
00134 params->getNumber("Angle", angle);
00135 Quatf q(1);
00136 q.setAxisAngle(Vec3f((float) axis.x, (float) axis.y, (float) axis.z),
00137 (float) degToRad(angle));
00138 setOrientation(q);
00139
00140 double radius = 1.0;
00141 params->getNumber("Radius", radius);
00142 setRadius((float) radius);
00143
00144 double absMag = 0.0;
00145 if (params->getNumber("AbsMag", absMag))
00146 setAbsoluteMagnitude((float) absMag);
00147
00148 string infoURL;
00149 if (params->getString("InfoURL", infoURL))
00150 setInfoURL(infoURL);
00151
00152 return true;
00153 }
|
|
||||||||||||||||||||||||
|
Implemented in Galaxy, Nebula, and OpenCluster. |
|
|
Definition at line 82 of file deepskyobj.cpp. References absMag. Referenced by load(). 00083 {
00084 absMag = _absMag;
00085 }
|
|
|
Definition at line 42 of file deepskyobj.cpp. References catalogNumber. Referenced by DSODatabase::find(), and DSODatabase::load(). 00043 {
00044 catalogNumber = n;
00045 }
|
|
|
Definition at line 102 of file deepskyobj.cpp. References infoURL. Referenced by load(). 00103 {
00104 if (infoURL == NULL)
00105 infoURL = new string(s);
00106 else
00107 *infoURL = s;
00108 }
|
|
|
Definition at line 62 of file deepskyobj.cpp. References orientation. Referenced by load(), and CelestiaCore::mouseMove(). 00063 {
00064 orientation = q;
00065 }
|
|
|
Definition at line 52 of file deepskyobj.cpp. References position. Referenced by load(). 00053 {
00054 position = p;
00055 }
|
|
|
Definition at line 72 of file deepskyobj.cpp. References radius. Referenced by load().
|
|
|
Implemented in Galaxy, Nebula, and OpenCluster. |
|
|
Definition at line 80 of file deepskyobj.h. Referenced by getAbsoluteMagnitude(), load(), and setAbsoluteMagnitude(). |
|
|
Definition at line 76 of file deepskyobj.h. Referenced by getCatalogNumber(), and setCatalogNumber(). |
|
|
Definition at line 81 of file deepskyobj.h. Referenced by getInfoURL(), load(), and setInfoURL(). |
|
|
Definition at line 78 of file deepskyobj.h. Referenced by getOrientation(), and setOrientation(). |
|
|
Definition at line 77 of file deepskyobj.h. Referenced by getPosition(), load(), and setPosition(). |
|
|
Definition at line 79 of file deepskyobj.h. Referenced by getRadius(), load(), and setRadius(). |
1.4.1