40 double phi,
double theta,
double psi)
65 if (&other ==
this)
return *
this;
82 double sinphi = std::sin(degrad * phi);
83 double cosphi = std::cos(degrad * phi);
84 double sinthe = std::sin(degrad * theta);
85 double costhe = std::cos(degrad * theta);
86 double sinpsi = std::sin(degrad * psi);
87 double cospsi = std::cos(degrad * psi);
89 fRot[0] = cospsi * cosphi - costhe * sinphi * sinpsi;
90 fRot[1] = -sinpsi * cosphi - costhe * sinphi * cospsi;
91 fRot[2] = sinthe * sinphi;
92 fRot[3] = cospsi * sinphi + costhe * cosphi * sinpsi;
93 fRot[4] = -sinpsi * sinphi + costhe * cosphi * cospsi;
94 fRot[5] = -sinthe * cosphi;
95 fRot[6] = sinpsi * sinthe;
96 fRot[7] = cospsi * sinthe;
105 double c = std::cos(phi);
106 double s = std::sin(phi);
112 v[4] = c * fRot[4] - s * fRot[7];
113 v[5] = c * fRot[5] - s * fRot[8];
114 v[6] = s * fRot[3] + c * fRot[6];
115 v[7] = s * fRot[4] + c * fRot[7];
116 v[8] = s * fRot[5] + c * fRot[8];
117 std::memcpy(fRot, v,
sizeof(
kIdRot));
127 double c = std::cos(phi);
128 double s = std::sin(phi);
131 v[1] = c * fRot[1] + s * fRot[7];
132 v[2] = c * fRot[2] + s * fRot[8];
136 v[6] = -s * fRot[0] + c * fRot[6];
137 v[7] = -s * fRot[1] + c * fRot[7];
138 v[8] = -s * fRot[2] + c * fRot[8];
139 std::memcpy(fRot, v,
sizeof(
kIdRot));
149 double c = std::cos(phi);
150 double s = std::sin(phi);
153 v[1] = c * fRot[1] - s * fRot[4];
154 v[2] = c * fRot[2] - s * fRot[5];
155 v[3] = s * fRot[0] + c * fRot[3];
156 v[4] = s * fRot[1] + c * fRot[4];
157 v[5] = s * fRot[2] + c * fRot[5];
161 std::memcpy(&fRot[0], v,
sizeof(
kIdRot));
230 for (
int i = 0; i < 3; i++)
232 for (
int j = 0; j < 3; j++)
234 newrot[3 * i + j] =
fRot[3 * i] * other.
fRot[j] +
235 fRot[3 * i + 1] * other.
fRot[3 + j] +
236 fRot[3 * i + 2] * other.
fRot[6 + j];
static const double kDegToRad
void Set(double xx, double yy, double zz)