#include <SbRotation.h>
|
| | SbRotation () |
| | SbRotation (const SbVec3d &axis, double radians) |
| | SbRotation (double a11, double a12, double a13, double a14, double a21, double a22, double a23, double a24, double a31, double a32, double a33, double a34, double a41, double a42, double a43, double a44) |
| void | multVec (const SbVec3d &src, SbVec3d &dst) const |
Definition at line 35 of file SbRotation.h.
◆ SbRotation() [1/3]
| HEPVis::SbRotation::SbRotation |
( |
| ) |
|
◆ SbRotation() [2/3]
| HEPVis::SbRotation::SbRotation |
( |
const SbVec3d & | axis, |
|
|
double | radians ) |
Definition at line 55 of file SbRotation.cxx.
55 {
56
57 m_quat[3] = ::cos(radians/2);
58 double sineval = ::sin(radians/2);
64}
◆ SbRotation() [3/3]
| HEPVis::SbRotation::SbRotation |
( |
double | a11, |
|
|
double | a12, |
|
|
double | a13, |
|
|
double | a14, |
|
|
double | a21, |
|
|
double | a22, |
|
|
double | a23, |
|
|
double | a24, |
|
|
double | a31, |
|
|
double | a32, |
|
|
double | a33, |
|
|
double | a34, |
|
|
double | a41, |
|
|
double | a42, |
|
|
double | a43, |
|
|
double | a44 ) |
Definition at line 68 of file SbRotation.cxx.
73 {
74
75 double m[4][4] = { { a11, a12, a13, a14 },
76 { a21, a22, a23, a24 },
77 { a31, a32, a33, a34 },
78 { a41, a42, a43, a44 } };
79
80 double scalerow =
m[0][0] +
m[1][1] +
m[2][2];
81
82 if (scalerow > 0.0) {
83 double s = ::sqrt(scalerow + m[3][3]);
86
90 }
91 else {
93 if (m[1][1] > m[0][0])
i = 1;
94 if (m[2][2] > m[i][i])
i = 2;
95
98
99 double s = ::sqrt((m[i][i] - (m[j][j] + m[k][k])) + m[3][3]);
100
103
107 }
108
109 if (m[3][3] != 1.0) {
110 m_quat *= (1.0/::sqrt(m[3][3]));
111 }
112}
◆ multVec()
| void HEPVis::SbRotation::multVec |
( |
const SbVec3d & | src, |
|
|
SbVec3d & | dst ) const |
Definition at line 119 of file SbRotation.cxx.
119 {
120
121
122
127
133
138
143
148
149
150
151
156
158
159 double W =
s[0]*
t0[3] +
s[1]*
t1[3] +
s[2]*
t2[3] +
t3[3];
160
161 dst[0] = (
s[0]*
t0[0] +
s[1]*
t1[0] +
s[2]*
t2[0] +
t3[0])/W;
162 dst[1] = (
s[0]*
t0[1] +
s[1]*
t1[1] +
s[2]*
t2[1] +
t3[1])/W;
163 dst[2] = (
s[0]*
t0[2] +
s[1]*
t1[2] +
s[2]*
t2[2] +
t3[2])/W;
164}
std::vector< ALFA_RawDataContainer_p1 > t2
std::vector< ALFA_RawDataCollection_p1 > t1
std::vector< LUCID_RawData_p1 > t3
◆ m_quat
| SbVec4d HEPVis::SbRotation::m_quat |
|
private |
The documentation for this class was generated from the following files: