u_global_retriever.h

Go to the documentation of this file.
00001 
00005 /* Copyright, 2001 Nevrax Ltd.
00006  *
00007  * This file is part of NEVRAX NEL.
00008  * NEVRAX NEL is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2, or (at your option)
00011  * any later version.
00012 
00013  * NEVRAX NEL is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016  * General Public License for more details.
00017 
00018  * You should have received a copy of the GNU General Public License
00019  * along with NEVRAX NEL; see the file COPYING. If not, write to the
00020  * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
00021  * MA 02111-1307, USA.
00022  */
00023 
00024 #ifndef NL_U_GLOBAL_RETRIEVER_H
00025 #define NL_U_GLOBAL_RETRIEVER_H
00026 
00027 #include "nel/misc/types_nl.h"
00028 
00029 #include "u_retriever_bank.h"
00030 #include "u_global_position.h"
00031 
00032 namespace NLMISC
00033 {
00034 class CVector;
00035 class CVectorD;
00036 class CAABBox;
00037 class CLine;
00038 }
00039 
00040 namespace NLPACS
00041 {
00042 
00043 class UGlobalPosition;
00044 
00052 class UGlobalRetriever
00053 {
00054 public:
00055     virtual ~UGlobalRetriever() {}
00056 
00058     virtual bool                    testRaytrace (const NLMISC::CVectorD &v0, const NLMISC::CVectorD &v1) =0;
00059 
00063     virtual const NLMISC::CAABBox   &getBBox() const=0;
00064 
00068     virtual float                   getMeanHeight(const UGlobalPosition &pos) const =0;
00069 
00074     virtual sint32                  getIdentifier(const std::string &id) const =0;
00075 
00079     virtual const std::string       &getIdentifier(const UGlobalPosition &pos) const =0;
00080 
00082     virtual sint32                  getLocalRetrieverId(const UGlobalPosition &position) const =0;
00083 
00090     virtual bool                    buildInstance(const std::string &id, const NLMISC::CVectorD &position, sint32 &instanceId) =0;
00091 
00095     virtual void                    removeInstance(sint32 instanceId) =0;
00096 
00100     virtual uint32                  getMaterial(const UGlobalPosition &pos) const =0;
00101 
00106     UGlobalPosition                 retrievePosition(const NLMISC::CVectorD &estimated, double threshold, UGlobalPosition::TType retrieveSpec) const;
00107 
00111     virtual UGlobalPosition         retrievePosition(const NLMISC::CVector &estimated) const =0;
00112 
00116     virtual UGlobalPosition         retrievePosition(const NLMISC::CVectorD &estimated) const =0;
00117 
00121     virtual UGlobalPosition         retrievePosition(const NLMISC::CVector &estimated, float threshold) const =0;
00122 
00126     virtual UGlobalPosition         retrievePosition(const NLMISC::CVectorD &estimated, double threshold) const =0;
00127 
00131     virtual bool                    testPosition(UGlobalPosition &pos) const =0;
00132 
00136     virtual bool                    insurePosition(UGlobalPosition &pos) const =0;
00137 
00141     virtual bool                    isInterior(const UGlobalPosition &pos) const =0;
00145     virtual bool                    isWaterPosition(const UGlobalPosition &pos, float &waterHeight) const =0;
00146 
00148     virtual float                   distanceToBorder(const UGlobalPosition &pos) const =0;
00150     virtual void                    getBorders(const UGlobalPosition &pos, std::vector<std::pair<NLMISC::CLine, uint8> > &edges) =0;
00151     virtual void                    getBorders(const NLMISC::CAABBox &box, std::vector<std::pair<NLMISC::CLine, uint8> > &edges) =0;
00152 
00156 //  virtual void                    snapToInteriorGround(UGlobalPosition &pos) const = 0;
00157 
00161     virtual NLMISC::CVector         getGlobalPosition(const UGlobalPosition &global) const =0;
00162 
00166     virtual NLMISC::CVectorD        getDoubleGlobalPosition(const UGlobalPosition &global) const =0;
00167 
00171     virtual void                    refreshLrAround(const NLMISC::CVector &position, float radius) =0;
00172 
00176     virtual void                    refreshLrAroundNow(const NLMISC::CVector &position, float radius) =0;
00177 
00185     static UGlobalRetriever *       createGlobalRetriever (const char* globalRetriever, const URetrieverBank* retrieverBank);
00186 
00190     static void                     deleteGlobalRetriever (UGlobalRetriever *retriever);
00191 };
00192 
00193 
00194 } // NLPACS
00195 
00196 
00197 #endif // NL_U_GLOBAL_RETRIEVER_H
00198 
00199 /* End of u_global_retriever.h */

Generated on Thu Jan 7 08:26:24 2010 for NeL by  doxygen 1.6.1