00001 /*************************************************************************** 00002 * Copyright (C) 2007 by Universidad Nacional de Colombia * 00003 * http://www.unal.edu.co * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License * 00016 * along with this program; if not, write to the * 00017 * Free Software Foundation, Inc., * 00018 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00019 ***************************************************************************/ 00020 #include "Point.h" 00021 00022 Point::Point() 00023 { 00024 this->id = -1 ; 00025 this->x = 0.0 ; 00026 this->y = 0.0 ; 00027 this->z = 0.0 ; 00028 processed = false ; 00029 } 00030 00031 Point::Point( int id, double x, double y, double z ) 00032 { 00033 this->id = id ; 00034 this->x = x ; 00035 this->y = y ; 00036 this->z = z ; 00037 processed = false ; 00038 } 00039 00040 Point::Point( double x, double y, double z ) 00041 { 00042 this->id = -1 ; 00043 this->x = x ; 00044 this->y = y ; 00045 this->z = z ; 00046 processed = false ; 00047 } 00048 00049 Point::Point( const Point& p ) 00050 { 00051 this->id = p.getId() ; 00052 this->x = p.getX() ; 00053 this->y = p.getY() ; 00054 this->z = p.getZ() ; 00055 this->processed = p.isProcessed() ; 00056 } 00057 00058 void Point::operator = ( const Point& p ) 00059 { 00060 this->id = p.getId() ; 00061 this->x = p.getX() ; 00062 this->y = p.getY() ; 00063 this->z = p.getZ() ; 00064 this->processed = p.isProcessed() ; 00065 } 00066 00072 bool Point::operator == ( const Point& p ) 00073 { 00074 return ( this->id == p.getId() ) ? true : false ; 00075 } 00076 00077 Point::~Point() 00078 { 00079 } 00080 00081 int Point::getId() const 00082 { 00083 return id; 00084 } 00085 00086 void Point::setId( int id ) 00087 { 00088 this->id = id; 00089 } 00090 00091 double Point::getX() const 00092 { 00093 return x; 00094 } 00095 00096 void Point::setX( double x ) 00097 { 00098 this->x = x; 00099 } 00100 00101 double Point::getY() const 00102 { 00103 return y; 00104 } 00105 00106 void Point::setY( double y ) 00107 { 00108 this->y = y; 00109 } 00110 00111 double Point::getZ() const 00112 { 00113 return z; 00114 } 00115 00116 void Point::setZ( double z ) 00117 { 00118 this->z = z; 00119 } 00120 00121 00122 bool Point::isProcessed() const 00123 { 00124 return processed; 00125 } 00126 00127 00128 void Point::setProcessed( bool processed ) 00129 { 00130 this->processed = processed; 00131 } 00132 00133