16#ifndef ROOT_MathX_GenVectorX_Transform3D
17#define ROOT_MathX_GenVectorX_Transform3D 1
78template <
typename T =
double>
132 template <
class ARotation,
class CoordSystem,
class Tag>
144 template <
class ARotation>
184 template <
class CoordSystem,
class Tag>
209 template <
class ARotation,
class CoordSystem,
class Tag>
247 if (std::fabs(T(1) -
cos1) <= T(0.000001) || std::fabs(T(1) -
cos2) <= T(0.000001)) {
248 std::cerr <<
"Transform3D: Error : zero angle between axes" << std::endl;
251 if (std::fabs(
cos1 -
cos2) > T(0.000001)) {
252 std::cerr <<
"Transform3D: Warning: angles between axes are not equal" << std::endl;
341 const auto m1 = (abs(T(1) -
cos1) <= T(0.000001) || abs(T(1) -
cos2) <= T(0.000001));
343 const auto m2 = (abs(
cos1 -
cos2) > T(0.000001));
345 std::cerr <<
"Transform3D: Warning: angles between axes are not equal" << std::endl;
405 std::cerr <<
"Transform3D: Error : zero angle between axes" << std::endl;
418 template <
class ForeignMatrix>
427 Transform3D(T
xx, T
xy, T xz, T
dx, T
yx, T
yy, T yz, T
dy, T
zx, T
zy, T
zz, T
dz)
429 SetComponents(
xx,
xy, xz,
dx,
yx,
yy, yz,
dy,
zx,
zy,
zz,
dz);
438 template <
class ForeignMatrix>
454 for (
int i = 0; i < 12; ++i) {
469 for (
int i = 0; i < 12; ++i) {
483 std::copy(
fM,
fM + 12, begin);
492 template <
class ForeignMatrix>
514 template <
class ForeignMatrix>
534 void SetComponents(T
xx, T
xy, T xz, T
dx, T
yx, T
yy, T yz, T
dy, T
zx, T
zy, T
zz, T
dz)
553 void GetComponents(T &
xx, T &
xy, T &xz, T &
dx, T &
yx, T &
yy, T &yz, T &
dy, T &
zx, T &
zy, T &
zz, T &
dz)
const
573 template <
class AnyRotation,
class V>
600 template <
class AnyRotation>
609 template <
class AnyRotation>
624 template <
class AnyVector>
657 template <
class CoordSystem>
665 template <
class CoordSystem>
674 template <
class CoordSystem>
682 template <
class CoordSystem>
719 template <
class CoordSystem>
730 template <
class CoordSystem>
739 template <
class CoordSystem,
class Tag1,
class Tag2>
749 template <
class CoordSystem,
class Tag1,
class Tag2>
759 template <
class CoordSystem>
768 template <
class CoordSystem>
777 template <
typename TYPE>
781 const auto n =
plane.Normal();
784 const auto d =
plane.HesseDistance();
790 template <
typename TYPE>
825 std::cerr <<
"Transform3D::inverse error: zero determinant" << std::endl;
861 std::cerr <<
"Transform3D::inverse error: zero determinant" << std::endl;
930 for (
int i = 0; i < 3; ++i)
933 for (
int i = 0; i < 3; ++i)
936 for (
int i = 0; i < 3; ++i)
955 for (
int i = 0; i < 3; ++i) {
956 for (
int j = 0;
j < 3; ++
j)
959 fM[4 * i + 3] = T(0);
1039 fM[
kXX] * t.fM[kDX] + fM[
kXY] * t.fM[kDY] + fM[
kXZ] * t.fM[kDZ] + fM[kDX],
1044 fM[
kYX] * t.fM[kDX] + fM[
kYY] * t.fM[kDY] + fM[
kYZ] * t.fM[kDZ] + fM[kDY],
1049 fM[
kZX] * t.fM[kDX] + fM[
kZY] * t.fM[kDY] + fM[
kZZ] * t.fM[kDZ] + fM[kDZ]);
1062 fM[
kXX] * t.fM[kDX] + fM[
kXY] * t.fM[kDY] + fM[
kXZ] * t.fM[kDZ] + fM[kDX],
1067 fM[
kYX] * t.fM[kDX] + fM[
kYY] * t.fM[kDY] + fM[
kYZ] * t.fM[kDZ] + fM[kDY],
1072 fM[
kZX] * t.fM[kDX] + fM[
kZY] * t.fM[kDY] + fM[
kZZ] * t.fM[kDZ] + fM[kDZ]);
1198 return Transform3D<T>(t.Rotation(), t.Translation().Vect() +
d.Vect());
1313 t.GetComponents(
m,
m + 12);
1314 os <<
"\n" <<
m[0] <<
" " <<
m[1] <<
" " <<
m[2] <<
" " <<
m[3];
1315 os <<
"\n" <<
m[4] <<
" " <<
m[5] <<
" " <<
m[6] <<
" " <<
m[7];
1316 os <<
"\n" <<
m[8] <<
" " <<
m[9] <<
" " <<
m[10] <<
" " <<
m[11] <<
"\n";
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint xy
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t TPoint TPoint const char y1
AxisAngle class describing rotation represented with direction axis (3D Vector) and an angle of rotat...
DefaultCoordinateSystemTag Default tag for identifying any coordinate system.
EulerAngles class describing rotation as three angles (Euler Angles).
Rotation class with the (3D) rotation represented by a unit quaternion (u, i, j, k).
Rotation class with the (3D) rotation represented by a 3x3 orthogonal matrix.
Rotation class representing a 3D rotation about the X axis by the angle of rotation.
Rotation class representing a 3D rotation about the Y axis by the angle of rotation.
Rotation class with the (3D) rotation represented by angles describing first a rotation of an angle p...
Rotation class representing a 3D rotation about the Z axis by the angle of rotation.
Transform3D< T > operator*(const Rotation3D &r, const Translation3D< T > &t)
combine a translation and a rotation to give a transform3d First the translation then the rotation
std::ostream & operator<<(std::ostream &os, const Plane3D< T > &p)
Stream Output and Input.
Impl::Transform3D< float > Transform3DF
Impl::Transform3D< double > Transform3D