# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

u_global_retriever.h

Go to the documentation of this file.
00001 
00007 /* Copyright, 2001 Nevrax Ltd.
00008  *
00009  * This file is part of NEVRAX NEL.
00010  * NEVRAX NEL is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2, or (at your option)
00013  * any later version.
00014 
00015  * NEVRAX NEL is distributed in the hope that it will be useful, but
00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00018  * General Public License for more details.
00019 
00020  * You should have received a copy of the GNU General Public License
00021  * along with NEVRAX NEL; see the file COPYING. If not, write to the
00022  * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
00023  * MA 02111-1307, USA.
00024  */
00025 
00026 #ifndef NL_U_GLOBAL_RETRIEVER_H
00027 #define NL_U_GLOBAL_RETRIEVER_H
00028 
00029 #include "nel/misc/types_nl.h"
00030 
00031 #include "nel/pacs/u_retriever_bank.h"
00032 
00033 namespace NLMISC
00034 {
00035 class CVector;
00036 class CVectorD;
00037 class CAABBox;
00038 class CLine;
00039 }
00040 
00041 namespace NLPACS 
00042 {
00043 
00044 class UGlobalPosition;
00045 
00053 class UGlobalRetriever
00054 {
00055 public:
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 
00087         virtual bool                                    buildInstance(const std::string &id, const NLMISC::CVectorD &position, sint32 &instanceId) =0;
00088 
00092         virtual void                                    removeInstance(sint32 instanceId) =0;
00093 
00097         virtual uint32                                  getMaterial(const UGlobalPosition &pos) const =0;
00098 
00102         virtual UGlobalPosition                 retrievePosition(const NLMISC::CVector &estimated) const =0;
00103 
00107         virtual UGlobalPosition                 retrievePosition(const NLMISC::CVectorD &estimated) const =0;
00108 
00112         virtual UGlobalPosition                 retrievePosition(const NLMISC::CVector &estimated, float threshold) const =0;
00113 
00117         virtual UGlobalPosition                 retrievePosition(const NLMISC::CVectorD &estimated, double threshold) const =0;
00121         virtual bool                                    isInterior(const UGlobalPosition &pos) const =0;
00125         virtual bool                                    isWaterPosition(const UGlobalPosition &pos, float &waterHeight) const =0;
00126 
00128         virtual float                                   distanceToBorder(const UGlobalPosition &pos) const =0;
00130         virtual void                                    getBorders(const UGlobalPosition &pos, std::vector<NLMISC::CLine> &edges) =0;
00131 
00135 //      virtual void                                    snapToInteriorGround(UGlobalPosition &pos) const = 0;
00136 
00140         virtual NLMISC::CVector                 getGlobalPosition(const UGlobalPosition &global) const =0;
00141 
00145         virtual NLMISC::CVectorD                getDoubleGlobalPosition(const UGlobalPosition &global) const =0;
00146 
00154         static UGlobalRetriever *               createGlobalRetriever (const char* globalRetriever, const URetrieverBank* retrieverBank);
00155 
00159         static void                                             deleteGlobalRetriever (UGlobalRetriever *retriever);
00160 };
00161 
00162 
00163 } // NLPACS
00164 
00165 
00166 #endif // NL_U_GLOBAL_RETRIEVER_H
00167 
00168 /* End of u_global_retriever.h */