![]() |
00001 // Copyright (C) 2002 Johan Hoffman and Anders Logg. 00002 // Licensed under the GNU GPL Version 2. 00003 00004 #ifndef __POINT_H 00005 #define __POINT_H 00006 00007 #include <dolfin/dolfin_log.h> 00008 #include <dolfin/constants.h> 00009 00010 namespace dolfin { 00011 00012 class Point { 00013 public: 00014 00015 Point(); 00016 Point(real x); 00017 Point(real x, real y); 00018 Point(real x, real y, real z); 00019 00021 real dist(Point p) const; 00022 00024 real dist(real x, real y = 0.0, real z = 0.0) const; 00025 00027 Point midpoint(Point p) const; 00028 00030 void operator= (real x); 00031 00033 operator real() const; 00034 00036 Point operator+= (const Point& p); 00037 00039 Point operator*= (real a); 00040 00042 Point operator/= (real a); 00043 00045 real x; 00046 real y; 00047 real z; 00048 00050 friend LogStream& operator<<(LogStream& stream, const Point& p); 00051 00052 }; 00053 00054 } 00055 00056 #endif
Documentation automatically generated with Doxygen on 10 Sep 2004.