00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _CELENGINE_LOCATION_H_
00011 #define _CELENGINE_LOCATION_H_
00012
00013 #include <string>
00014 #include <celutil/basictypes.h>
00015 #include <celmath/vecmath.h>
00016
00017
00018 class Body;
00019
00020 class Location
00021 {
00022 public:
00023 Location();
00024 virtual ~Location();
00025
00026 std::string getName(bool i18n = false) const;
00027 void setName(const std::string&);
00028
00029 Vec3f getPosition() const;
00030 void setPosition(const Vec3f&);
00031
00032 float getSize() const;
00033 void setSize(float);
00034
00035 float getImportance() const;
00036 void setImportance(float);
00037
00038 uint32 getFeatureType() const;
00039 void setFeatureType(uint32);
00040
00041 std::string getInfoURL() const;
00042 void setInfoURL(const std::string&);
00043
00044 void setParentBody(Body*);
00045 Body* getParentBody() const;
00046
00047 Point3d getPlanetocentricPosition(double) const;
00048 Point3d getHeliocentricPosition(double) const;
00049
00050 static uint32 parseFeatureType(const std::string&);
00051
00052 enum FeatureType
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 };
00084
00085 private:
00086 Body* parent;
00087 std::string name;
00088 std::string i18nName;
00089 Vec3f position;
00090 float size;
00091 float importance;
00092 uint32 featureType;
00093 std::string* infoURL;
00094 };
00095
00096 #endif // _CELENGINE_LOCATION_H_