46 const double &
dx3,
const double &alpha,
const double &beta,
61 this->
setTransformationValues(transformation->Tx1, transformation->Tx2, transformation->Tx3, transformation->Sx1,
62 transformation->Sx2, transformation->Sx3, transformation->alpha, transformation->beta,
63 transformation->gamma);
102 const double &
dx3,
const double &alpha,
const double &beta,
129 double divisor = (Sx1 * Sx2 * Sx3);
154 this->fromX1factorX1 =
cosB *
cosA * Sx1;
157 this->fromX1delta = Tx1;
159 this->fromX2factorX1 = -
cosB *
sinA * Sx2;
162 this->fromX2delta = Tx2;
164 this->fromX3factorX1 =
sinB * Sx3;
165 this->fromX3factorX2 = -
sinG *
cosB * Sx3;
166 this->fromX3factorX3 =
cosG *
cosB * Sx3;
167 this->fromX3delta = Tx3;
171 this->transformation =
true;
180 if (this->active == active)
182 if (this->transformation)
183 this->active = active;
193 const double &x3)
const
196 return this->toX1factorX1 * x1 + this->toX1factorX2 * x2 + this->toX1factorX3 * x3 + this->toX1delta;
202 const double &x3)
const
205 return this->toX2factorX1 * x1 + this->toX2factorX2 * x2 + this->toX2factorX3 * x3 + this->toX2delta;
211 const double &x3)
const
214 return this->toX3factorX1 * x1 + this->toX3factorX2 * x2 + this->toX3factorX3 * x3 + this->toX3delta;
226 return (x1 - this->Tx1) / this->Sx1;
234 return (x2 - this->Tx2) / this->Sx2;
242 return (x3 - this->Tx3) / this->Sx3;
254 const double &x3)
const
257 return this->fromX1factorX1 * x1 + this->fromX1factorX2 * x2 + this->fromX1factorX3 * x3 + this->fromX1delta;
263 const double &x3)
const
266 return this->fromX2factorX1 * x1 + this->fromX2factorX2 * x2 + this->fromX2factorX3 * x3 + this->fromX2delta;
272 const double &x3)
const
275 return this->fromX3factorX1 * x1 + this->fromX3factorX2 * x2 + this->fromX3factorX3 * x3 + this->fromX3delta;
287 return x1 * this->Sx1 + this->Tx1;
295 return x2 * this->Sx2 + this->Tx2;
303 return x3 * this->Sx3 + this->Tx3;
315 ss <<
" CoordinateTransformation3D\n";
318 ss <<
" ,a=" << this->Tx1 <<
", b=" << this->Tx2 <<
", c=" << this->Tx3 <<
endl;
319 ss <<
" , dx1=" << this->Sx1 <<
", dx2=" << this->Sx2 <<
", dx2=" << this->Sx3 <<
endl;
std::shared_ptr< T > SPtr
double transformForwardToX3Coordinate(const double &x1, const double &x2, const double &x3) const
double transformBackwardToX2CoordinateIgnoringRotation(const double &x2) const
void setActive(const bool &active)
double transformForwardToX2CoordinateIgnoringRotation(const double &x2) const
double transformBackwardToX2Coordinate(const double &x1, const double &x2, const double &x3) const
double transformBackwardToX3Coordinate(const double &x1, const double &x2, const double &x3) const
double transformBackwardToX1Coordinate(const double &x1, const double &x2, const double &x3) const
double transformForwardToX3CoordinateIgnoringRotation(const double &x3) const
CoordinateTransformation3D()
double transformBackwardToX1CoordinateIgnoringRotation(const double &x1) const
double transformBackwardToX3CoordinateIgnoringRotation(const double &x3) const
std::string toString() const
double transformForwardToX1Coordinate(const double &x1, const double &x2, const double &x3) const
double transformForwardToX2Coordinate(const double &x1, const double &x2, const double &x3) const
void setTransformationValues(const double &originX1, const double &originX2, const double &originX3, const double &dx1, const double &dx2, const double &dx3, const double &alpha, const double &beta, const double &gamma)
Set transformation values.
double transformForwardToX1CoordinateIgnoringRotation(const double &x1) const
bool zero(const T &value)