Quantum GIS API Documentation  1.7.4
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 #include <iostream>
00022 
00024 class ANALYSIS_EXPORT Point3D
00025 {
00026   protected:
00028     double mX;
00030     double mY;
00032     double mZ;
00033   public:
00034     Point3D();
00036     Point3D( double x, double y, double z );
00037     Point3D( const Point3D& p );
00038     ~Point3D();
00039     Point3D& operator=( const Point3D& p );
00040     bool operator==( const Point3D& p );
00041     bool operator!=( const Point3D& p );
00043     double dist3D( Point3D* p ) const;
00045     double getX() const;
00047     double getY() const;
00049     double getZ() const;
00051     void setX( double x );
00053     void setY( double y );
00055     void setZ( double z );
00056 };
00057 
00058 inline Point3D::Point3D() : mX( 0 ), mY( 0 ), mZ( 0 )
00059 {
00060 
00061 }
00062 
00063 inline Point3D::Point3D( double x, double y, double z ) : mX( x ), mY( y ), mZ( z )
00064 {
00065 
00066 }
00067 
00068 inline Point3D::Point3D( const Point3D& p ): mX( p.mX ), mY( p.mY ), mZ( p.mZ )
00069 {
00070 
00071 }
00072 
00073 inline Point3D::~Point3D()
00074 {
00075 
00076 }
00077 
00078 inline double Point3D::getX() const
00079 {
00080   return mX;
00081 }
00082 
00083 inline double Point3D::getY() const
00084 {
00085   return mY;
00086 }
00087 
00088 inline double Point3D::getZ() const
00089 {
00090   return mZ;
00091 }
00092 
00093 inline void Point3D::setX( double x )
00094 {
00095   mX = x;
00096 }
00097 
00098 inline void Point3D::setY( double y )
00099 {
00100   mY = y;
00101 }
00102 
00103 inline void Point3D::setZ( double z )
00104 {
00105   mZ = z;
00106 }
00107 
00108 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines