00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef FILE_INITIALCURVES_CIRCLE_HXX
00021
00022
00023 #include "../errors.cxx"
00024 #include <stdio.h>
00025 #include <math.h>
00026
00027
00028 namespace Multivac
00029 {
00030
00031
00032
00034
00036
00038 template <class T>
00039 class CCircle: public CInitialCurve<T>
00040 {
00041
00042
00043
00044
00045
00046
00047 protected:
00048
00049 T CenterX;
00050 T CenterY;
00051
00052 T Radius;
00053
00054
00055
00056
00057
00058
00059 public:
00060
00061 CCircle() throw();
00062 CCircle(T CenterX_, T CenterY_, T Radius_,
00063 bool reversed_ = false) throw();
00064
00065 ~CCircle() throw();
00066
00067
00068
00069
00070
00071
00072 public:
00073
00074 virtual void SetDistances(CMesh<T>& Mesh, CLevelSet<T>& Phi);
00075 virtual T GetDistance(T x, T y);
00076
00077 virtual void GetProjectionOnMesh(T& x, T& y, CMesh<T>& Mesh);
00078
00079 virtual void Save(string CurveFile) const;
00080
00081 private:
00082
00083 bool Intersection(T x_A, T y_A, T& x_B, T& y_B) const;
00084
00085 };
00086
00087
00088 }
00089
00090
00091 #define FILE_INITIALCURVES_CIRCLE_HXX
00092 #endif