#include <fconstsphereregion.h>
Public Member Functions | |
FConstSphereRegion (double constValue, double outsideValue, double radius, double center1, double center2, double center3) | |
virtual double | operator() (const VecDouble &p, const unsigned int component=0) const |
virtual | ~FConstSphereRegion () |
Private Attributes | |
double | m_constValue |
double | m_radius |
double | m_center1 |
double | m_center2 |
double | m_center3 |
double | m_outsideValue |
Implements the following function
x = constValue for |x-centerPoint| < radius 0 otherwise.
Where constValue, the centerPoint and the radius are passes as argumentos to the constructor of the class
Definition at line 17 of file fconstsphereregion.h.
FConstSphereRegion::FConstSphereRegion | ( | double | constValue, | |
double | outsideValue, | |||
double | radius, | |||
double | center1, | |||
double | center2, | |||
double | center3 | |||
) |
Definition at line 5 of file fconstsphereregion.cpp.
00006 { 00007 m_constValue = constValue; 00008 m_outsideValue = outsideValue; 00009 m_radius = radius; 00010 m_center1 = center1; 00011 m_center2 = center2; 00012 m_center3 = center3; 00013 }
virtual FConstSphereRegion::~FConstSphereRegion | ( | ) | [inline, virtual] |
Definition at line 28 of file fconstsphereregion.h.
double FConstSphereRegion::operator() | ( | const VecDouble & | p, | |
const unsigned int | component = 0 | |||
) | const [virtual] |
Implements GeneralFunctionInterface.
Definition at line 15 of file fconstsphereregion.cpp.
00016 { 00017 Point3D P; 00018 P[0] = p(0) - m_center1; 00019 P[1] = p(1) - m_center2; 00020 P[2] = p(2) - m_center3; 00021 00022 if (sqrt(P[0]*P[0] + P[1]*P[1] + P[2]*P[2]) < m_radius) 00023 { 00024 return m_constValue; 00025 } 00026 else 00027 return m_outsideValue; 00028 }
double FConstSphereRegion::m_center1 [private] |
Definition at line 21 of file fconstsphereregion.h.
double FConstSphereRegion::m_center2 [private] |
Definition at line 21 of file fconstsphereregion.h.
double FConstSphereRegion::m_center3 [private] |
Definition at line 21 of file fconstsphereregion.h.
double FConstSphereRegion::m_constValue [private] |
Definition at line 21 of file fconstsphereregion.h.
double FConstSphereRegion::m_outsideValue [private] |
Definition at line 21 of file fconstsphereregion.h.
double FConstSphereRegion::m_radius [private] |
Definition at line 21 of file fconstsphereregion.h.