9 #ifndef MsiChart_Point3D_h 10 #define MsiChart_Point3D_h 12 #include "PDCHeader/PDCvector" 13 #include "PDCHeader/PDCcmath" 20 template <
typename T =
double>
30 Point3D(T iX = T(), T iY = T(), T iZ = T()):
x(iX),
y(iY),
z(iZ){}
49 void Reset(T iX, T iY, T iZ);
124 return (x - irPoint.
x) * (x - irPoint.
x)
125 + (y - irPoint.
y) * (y - irPoint.
y)
126 + (z - irPoint.
z) * (z - irPoint.
z);
132 return std::sqrt(DistanceSquared(irPoint));
138 return ((x != irPoint.
x) || (y != irPoint.
y) || (z != irPoint.
z));
150 return Point3D<T>((x + irPoint.
x) / 2, (y + irPoint.
y) / 2, (z + irPoint.
z) / 2);
156 return Point3D<T>(x + irOffset.
x, y + irOffset.
y, z + irOffset.
z);
162 std::swap(x, iorPoint.
x);
163 std::swap(y, iorPoint.
y);
164 std::swap(z, iorPoint.
z);
Point3D(T iX=T(), T iY=T(), T iZ=T())
Definition: Point3D.h:30
Point3D(const Point3D< T > &irPoint)
Definition: Point3D.h:35
Point3D< Int32 > SPoint3D
Definition: Point3D.h:166
void Reset(T iX, T iY, T iZ)
Definition: Point3D.h:114
double Distance(const Point3D< T > &irPoint) const
Definition: Point3D.h:130
Point3D< T > operator-() const
Definition: Point3D.h:142
Point3D< T > Shifted(const Point3D< T > &irOffset) const
Definition: Point3D.h:154
T x
X-coordinate of current Point3D.
Definition: Point3D.h:99
bool operator!=(const Point3D< T > &irPoint) const
Definition: Point3D.h:136
T y
Y-coordinate of current Point3D.
Definition: Point3D.h:100
double DistanceSquared(const Point3D< T > &irPoint) const
Definition: Point3D.h:122
void Swap(Point3D< T > &iorPoint)
Definition: Point3D.h:160
Point3D< T > MiddleTo(const Point3D< T > &irPoint) const
Definition: Point3D.h:148
T z
Z-coordinate of current Point3D.
Definition: Point3D.h:101
Point3D< double > DPoint3D
Definition: Point3D.h:168
Point3D< float > FPoint3D
Definition: Point3D.h:167