00001 #include "fcylinderregion.h" 00002 00003 00012 FCylinderRegion::FCylinderRegion(Point3D C0,double radius, double height,double value) 00013 :C0(C0),radius(radius),height(height),_value(value) 00014 { 00015 00016 } 00017 00018 00019 00020 double FCylinderRegion::operator()(const VecDouble &p, const unsigned int component) const 00021 { 00022 return _value; 00023 } 00024 00025 bool FCylinderRegion::isInDomain(const VecDouble &p, const unsigned int component) const 00026 { 00027 if (hypot(p(0)-C0[0],p(1)-C0[1]) <=radius) 00028 { 00029 if ( (p(2) >= C0[2]) && (p(2) <= (C0[2]+height))) 00030 return true; 00031 else 00032 return false; 00033 } 00034 else 00035 return false; 00036 }