Commit bafa3470 authored by kraus's avatar kraus
Browse files

Merge branch 'use_more_suitable_name_instead_of_getCoordTransformTo_v2' into 'master'

Missed some getCoordTransformationTo. Fixing this

See merge request OPAL/src!74
parents 6987642e 998d773c
......@@ -161,7 +161,7 @@ ParallelTTracker::~ParallelTTracker() {
void ParallelTTracker::visitBeamline(const Beamline &bl) {
const FlaggedBeamline* fbl = static_cast<const FlaggedBeamline*>(&bl);
if (fbl->getRelativeFlag()) {
OpalBeamline stash(fbl->getOrigin3D(), fbl->getCoordTransformationTo());
OpalBeamline stash(fbl->getOrigin3D(), fbl->getInitialDirection());
stash.swap(itsOpalBeamline_m);
fbl->iterate(*this, false);
itsOpalBeamline_m.prepareSections();
......
......@@ -147,9 +147,8 @@ public:
void setOrigin3D(const Vector_t& ori);
Vector_t getOrigin3D() const;
void setCoordTransformationTo(const Quaternion& trafoTo);
Quaternion getCoordTransformationTo() const;
void setInitialDirection(const Quaternion& rot);
Quaternion getInitialDirection() const;
void setRelativeFlag(bool flag);
bool getRelativeFlag() const;
......@@ -453,12 +452,12 @@ Vector_t TBeamline<T>::getOrigin3D() const {
}
template <class T> inline
void TBeamline<T>::setCoordTransformationTo(const Quaternion& trafoTo) {
void TBeamline<T>::setInitialDirection(const Quaternion& trafoTo) {
itsCoordTrafoTo_m = trafoTo;
}
template <class T> inline
Quaternion TBeamline<T>::getCoordTransformationTo() const {
Quaternion TBeamline<T>::getInitialDirection() const {
return itsCoordTrafoTo_m;
}
......
......@@ -232,9 +232,9 @@ void Line::parse(Statement &stat) {
Quaternion rotTheta(cos(0.5 * theta), 0, -sin(0.5 * theta), 0);
Quaternion rotPhi(cos(0.5 * phi), -sin(0.5 * phi), 0, 0);
Quaternion rotPsi(cos(0.5 * psi), 0, 0, -sin(0.5 * psi));
line->setCoordTransformationTo(rotPsi * rotPhi * rotTheta);
line->setInitialDirection(rotPsi * rotPhi * rotTheta);
} else {
line->setCoordTransformationTo(Quaternion(1, 0, 0, 0));
line->setInitialDirection(Quaternion(1, 0, 0, 0));
if (itsAttr[ORIENTATION]) {
throw OpalException("Line::parse","Parameter orientation is array of 3 values (theta, phi, psi);\n" +
std::to_string(direction.size()) + " values provided");
......@@ -256,7 +256,7 @@ void Line::parse(Statement &stat) {
Quaternion rotPsi(cos(0.5 * psi), 0, 0, -sin(0.5 * psi));
line->setOrigin3D(origin);
line->setCoordTransformationTo(rotPsi * rotPhi * rotTheta);
line->setInitialDirection(rotPsi * rotPhi * rotTheta);
line->setRelativeFlag(!itsAttr[X].defaultUsed() ||
!itsAttr[Y].defaultUsed() ||
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment