u_global_position.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_POSITION_H
00025 #define NL_U_GLOBAL_POSITION_H
00026 
00027 #include "nel/misc/types_nl.h"
00028 #include "nel/misc/vector.h"
00029 
00030 
00031 namespace NLPACS
00032 {
00033 
00034 
00042 class ULocalPosition
00043 {
00044 public:
00046     sint32                          Surface;
00047 
00049     NLMISC::CVector                 Estimation;
00050 
00051     // set this global position from another global position, but keep the old z coordinate
00052     void                                setKeepZ(const ULocalPosition &other)
00053     {
00054         Surface = other.Surface;
00055         Estimation.set(other.Estimation.x,
00056                        other.Estimation.y,
00057                        Estimation.z);
00058     }
00059 };
00060 
00061 
00069 class UGlobalPosition
00070 {
00071 public:
00072 
00073     enum TType
00074     {
00075         Unspecified = 0,
00076         Landscape,
00077         Interior
00078     };
00079 
00081     sint32                              InstanceId;
00082 
00084     ULocalPosition                      LocalPosition;
00085 
00087     UGlobalPosition()
00088     {
00089         InstanceId = -1;
00090     }
00091 
00092     // set this global position from another global position, but keep the old z coordinate
00093     void                                setKeepZ(const UGlobalPosition &other)
00094     {
00095         InstanceId = other.InstanceId;
00096         LocalPosition.setKeepZ(other.LocalPosition);
00097     }
00098 };
00099 
00100 
00101 } // NLPACS
00102 
00103 
00104 #endif // NL_U_GLOBAL_POSITION_H
00105 
00106 /* End of u_global_position.h */

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