16#ifndef ROOT_Math_GenVector_Transform3D
17#define ROOT_Math_GenVector_Transform3D 1
79template <
typename T =
double>
132 template <
class ARotation,
class CoordSystem,
class Tag>
144 template <
class ARotation>
201 template<
class CoordSystem,
class Tag>
225 template <
class ARotation,
class CoordSystem,
class Tag>
263 if (std::fabs(T(1) -
cos1) <= T(0.000001) || std::fabs(T(1) -
cos2) <= T(0.000001)) {
264 std::cerr <<
"Transform3D: Error : zero angle between axes" << std::endl;
267 if (std::fabs(
cos1 -
cos2) > T(0.000001)) {
268 std::cerr <<
"Transform3D: Warning: angles between axes are not equal" << std::endl;
357 const auto m1 = (abs(T(1) -
cos1) <= T(0.000001) || abs(T(1) -
cos2) <= T(0.000001));
359 const auto m2 = (abs(
cos1 -
cos2) > T(0.000001));
361 std::cerr <<
"Transform3D: Warning: angles between axes are not equal" << std::endl;
421 std::cerr <<
"Transform3D: Error : zero angle between axes" << std::endl;
434 template<
class ForeignMatrix>
442 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)
444 SetComponents (
xx,
xy, xz,
dx,
yx,
yy, yz,
dy,
zx,
zy,
zz,
dz);
454 template <
class ForeignMatrix>
471 for (
int i = 0; i <12; ++i) {
485 for (
int i = 0; i <12; ++i) {
498 std::copy(
fM,
fM + 12, begin);
507 template<
class ForeignMatrix>
520 template<
class ForeignMatrix>
532 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)
542 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
554 template<
class AnyRotation,
class V>
581 template <
class AnyRotation>
589 template <
class AnyRotation>
603 template <
class AnyVector>
637 template <
class CoordSystem>
645 template <
class CoordSystem>
654 template<
class CoordSystem >
661 template <
class CoordSystem>
698 template <
class CoordSystem>
709 template <
class CoordSystem>
718 template <
class CoordSystem,
class Tag1,
class Tag2>
729 template <
class CoordSystem,
class Tag1,
class Tag2>
739 template <
class CoordSystem >
747 template <
class CoordSystem>
756 template <
typename TYPE>
760 const auto n =
plane.Normal();
763 const auto d =
plane.HesseDistance();
769 template <
typename TYPE>
804 std::cerr <<
"Transform3D::inverse error: zero determinant" << std::endl;
840 std::cerr <<
"Transform3D::inverse error: zero determinant" << std::endl;
910 for (
int i = 0; i < 3; ++i)
fM[i] =
rotData[i];
912 for (
int i = 0; i < 3; ++i)
fM[
kYX + i] =
rotData[3 + i];
914 for (
int i = 0; i < 3; ++i)
fM[
kZX + i] =
rotData[6 + i];
932 for (
int i = 0; i < 3; ++i) {
935 fM[4 * i + 3] = T(0);
1018 fM[
kXX]*t.fM[kDX]+fM[
kXY]*t.fM[kDY]+fM[
kXZ]*t.fM[kDZ]+fM[kDX],
1023 fM[
kYX]*t.fM[kDX]+fM[
kYY]*t.fM[kDY]+fM[
kYZ]*t.fM[kDZ]+fM[kDY],
1028 fM[
kZX]*t.fM[kDX]+fM[
kZY]*t.fM[kDY]+fM[
kZZ]*t.fM[kDZ]+fM[kDZ]);
1041 fM[
kXX] * t.fM[kDX] + fM[
kXY] * t.fM[kDY] + fM[
kXZ] * t.fM[kDZ] + fM[kDX],
1046 fM[
kYX] * t.fM[kDX] + fM[
kYY] * t.fM[kDY] + fM[
kYZ] * t.fM[kDZ] + fM[kDY],
1051 fM[
kZX] * t.fM[kDX] + fM[
kZY] * t.fM[kDY] + fM[
kZZ] * t.fM[kDZ] + fM[kDZ]);
1182 return Transform3D<T>(t.Rotation(), t.Translation().Vect() +
d.Vect());
1301 t.GetComponents(
m,
m + 12);
1302 os <<
"\n" <<
m[0] <<
" " <<
m[1] <<
" " <<
m[2] <<
" " <<
m[3];
1303 os <<
"\n" <<
m[4] <<
" " <<
m[5] <<
" " <<
m[6] <<
" " <<
m[7];
1304 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.
SVector< T, D > Unit(const SVector< T, D > &rhs)
Unit.
Namespace for new Math classes and functions.
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