00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef POINT3D_H
00018 #define POINT3D_H
00019
00020 #ifndef Q_OS_MACX
00021 #include <cmath>
00022 #else
00023 #include <math.h>
00024 #endif
00025 #include <iostream>
00026
00028 class ANALYSIS_EXPORT Point3D
00029 {
00030 protected:
00032 double mX;
00034 double mY;
00036 double mZ;
00037 public:
00038 Point3D();
00040 Point3D( double x, double y, double z );
00041 Point3D( const Point3D& p );
00042 ~Point3D();
00043 Point3D& operator=( const Point3D& p );
00044 bool operator==( const Point3D& p );
00045 bool operator!=( const Point3D& p );
00047 double dist3D( Point3D* p ) const;
00049 double getX() const;
00051 double getY() const;
00053 double getZ() const;
00055 void setX( double x );
00057 void setY( double y );
00059 void setZ( double z );
00060 };
00061
00062 inline Point3D::Point3D() : mX( 0 ), mY( 0 ), mZ( 0 )
00063 {
00064
00065 }
00066
00067 inline Point3D::Point3D( double x, double y, double z ) : mX( x ), mY( y ), mZ( z )
00068 {
00069
00070 }
00071
00072 inline Point3D::Point3D( const Point3D& p ): mX( p.mX ), mY( p.mY ), mZ( p.mZ )
00073 {
00074
00075 }
00076
00077 inline Point3D::~Point3D()
00078 {
00079
00080 }
00081
00082 inline double Point3D::getX() const
00083 {
00084 return mX;
00085 }
00086
00087 inline double Point3D::getY() const
00088 {
00089 return mY;
00090 }
00091
00092 inline double Point3D::getZ() const
00093 {
00094 return mZ;
00095 }
00096
00097 inline void Point3D::setX( double x )
00098 {
00099 mX = x;
00100 }
00101
00102 inline void Point3D::setY( double y )
00103 {
00104 mY = y;
00105 }
00106
00107 inline void Point3D::setZ( double z )
00108 {
00109 mZ = z;
00110 }
00111
00112 #endif