X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FNavaids%2Fpositioned.hxx;h=088955fdca8c0c5a9586b63881e66346b83b238c;hb=76958a038251a697ad798bce630e7d793797cf78;hp=4a0bd4c204e73977f554b7e3dc056ad049a125e0;hpb=e2bf85e67ebe9d53a6d9b3664988d263b3cc412a;p=flightgear.git diff --git a/src/Navaids/positioned.hxx b/src/Navaids/positioned.hxx index 4a0bd4c20..088955fdc 100644 --- a/src/Navaids/positioned.hxx +++ b/src/Navaids/positioned.hxx @@ -82,6 +82,11 @@ public: const SGGeod& geod() const { return mPosition; } + /** + * Compute the cartesian position associated with this object + */ + SGVec3d cart() const; + SGBucket bucket() const; double latitude() const @@ -108,6 +113,22 @@ public: virtual bool pass(FGPositioned* aPos) const { return true; } + virtual Type minType() const + { return INVALID; } + + virtual Type maxType() const + { return INVALID; } + + /** + * Test if this filter has a non-empty type range + */ + bool hasTypeRange() const; + + /** + * Assuming hasTypeRange is true, test if a given type passes the range + */ + bool passType(Type aTy) const; + bool operator()(FGPositioned* aPos) const { return pass(aPos); } }; @@ -173,14 +194,15 @@ public: */ static const char* nameForType(Type aTy); protected: - FGPositioned(Type ty, const std::string& aIdent, double aLat, double aLon, double aElev); - FGPositioned(Type ty, const std::string& aIdent, const SGGeod& aPos); + FGPositioned(Type ty, const std::string& aIdent, const SGGeod& aPos, bool aIndex = true); - SGGeod mPosition; // can't be const right now + // can't be const right now, navrecord at least needs to fix up the position + // after navaids are parsed + SGGeod mPosition; - Type mType; - std::string mIdent; + const Type mType; + const std::string mIdent; }; #endif // of FG_POSITIONED_HXX