Quantum GIS API Documentation  1.8
src/analysis/interpolation/Point3D.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                           Point3D.h  -  description
00003                              -------------------
00004     copyright            : (C) 2004 by Marco Hugentobler
00005     email                : mhugent@geo.unizh.ch
00006  ***************************************************************************/
00007 
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program 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 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 
00017 #ifndef POINT3D_H
00018 #define POINT3D_H
00019 
00020 #include <cmath>
00021 
00023 class ANALYSIS_EXPORT Point3D
00024 {
00025   protected:
00027     double mX;
00029     double mY;
00031     double mZ;
00032   public:
00033     Point3D();
00035     Point3D( double x, double y, double z );
00036     Point3D( const Point3D& p );
00037     ~Point3D();
00038     Point3D& operator=( const Point3D& p );
00039     bool operator==( const Point3D& p );
00040     bool operator!=( const Point3D& p );
00042     double dist3D( Point3D* p ) const;
00044     double getX() const;
00046     double getY() const;
00048     double getZ() const;
00050     void setX( double x );
00052     void setY( double y );
00054     void setZ( double z );
00055 };
00056 
00057 inline Point3D::Point3D() : mX( 0 ), mY( 0 ), mZ( 0 )
00058 {
00059 
00060 }
00061 
00062 inline Point3D::Point3D( double x, double y, double z ) : mX( x ), mY( y ), mZ( z )
00063 {
00064 
00065 }
00066 
00067 inline Point3D::Point3D( const Point3D& p ): mX( p.mX ), mY( p.mY ), mZ( p.mZ )
00068 {
00069 
00070 }
00071 
00072 inline Point3D::~Point3D()
00073 {
00074 
00075 }
00076 
00077 inline double Point3D::getX() const
00078 {
00079   return mX;
00080 }
00081 
00082 inline double Point3D::getY() const
00083 {
00084   return mY;
00085 }
00086 
00087 inline double Point3D::getZ() const
00088 {
00089   return mZ;
00090 }
00091 
00092 inline void Point3D::setX( double x )
00093 {
00094   mX = x;
00095 }
00096 
00097 inline void Point3D::setY( double y )
00098 {
00099   mY = y;
00100 }
00101 
00102 inline void Point3D::setZ( double z )
00103 {
00104   mZ = z;
00105 }
00106 
00107 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines