6 using namespace mathfce;
37 coors[ 0 ] = P2.
X() - P1.
X();
38 coors[ 1 ] = P2.
Y() - P1.
Y();
39 coors[ 2 ] = P2.
Z() - P1.
Z();
64 length = sqrt(pow(this->coors[ 0 ], 2.0) + pow(this->coors[ 1 ], 2.0) + pow(this->coors[ 2 ], 2.0));
68 this->coors[ 0 ] = P.
X();
69 this->coors[ 1 ] = P.
Y();
70 this->coors[ 2 ] = P.
Z();
80 for (
int i = 0; i < 3; i++) {
92 for (
int i = 0; i < 3; i++) {
93 res.
coors[ i ] = coors[i] + P.
Get(i + 1);
104 for (
int i = 0; i < 3; i++) {
152 for (
int i = 0; i < 3; i++) {
160 return coors[ i - 1 ];
171 x1 = u2 * v3 - u3 * v2;
172 x2 = u3 * v1 - u1 * v3;
173 x3 = u1 * v2 - u2 * v1;
187 double product = u1 * v1 + u2 * v2 + u3 * v3;
193 for (
int i = 0; i < 3; i++) {
194 if ((fabs(coors[ i ]) - fabs(U.
coors[ i ])) >
epsilon) {
TVector Cross(const TVector &U, const TVector &V)
TVector & operator=(const TPoint &)
bool operator==(const TVector &)
bool AreParallel(const TVector &U, const TVector &V)
bool ArePerpendicular(const TVector &U, const TVector &V)
TVector operator+(const TVector &)
TVector operator*(const TVector &U, double x)
void SetVector(double, double, double)
TVector operator-(const TVector &)
void Get(double &, double &, double &) const
double Dot(const TVector &U, const TVector &V)
static int numberInstance