20static void ZMpvAxisAngleRep(
const HepAxisAngle & aa,
double array[] ) {
22 register double sinDelta = std::sin( aa.delta() );
23 register double cosDelta = std::cos( aa.delta() );
24 register double oneMinusCosDelta = 1.0 - cosDelta;
26 register double uX = aa.getAxis().getX();
27 register double uY = aa.getAxis().getY();
28 register double uZ = aa.getAxis().getZ();
30 array[0] = oneMinusCosDelta * uX * uX + cosDelta;
31 array[1] = oneMinusCosDelta * uX * uY - sinDelta * uZ;
32 array[2] = oneMinusCosDelta * uX * uZ + sinDelta * uY;
34 array[3] = oneMinusCosDelta * uY * uX + sinDelta * uZ;
35 array[4] = oneMinusCosDelta * uY * uY + cosDelta;
36 array[5] = oneMinusCosDelta * uY * uZ - sinDelta * uX;
38 array[6] = oneMinusCosDelta * uZ * uX - sinDelta * uY;
39 array[7] = oneMinusCosDelta * uZ * uY + sinDelta * uX;
40 array[8] = oneMinusCosDelta * uZ * uZ + cosDelta;
50 ZMpvAxisAngleRep( *
this, thisRep );
51 ZMpvAxisAngleRep( aa, aaRep );
54 for (
int i = 0; i < 9; i++ ) {
55 sum += thisRep[i] * aaRep[i];
59 return (d >= 0) ? d : 0;
66 return distance( aa ) <= epsilon * epsilon;
86 os <<
'(' << aa.
axis() <<
", " << aa.
delta() <<
')';
92 double & x,
double & y,
double & z,
101 aa.
set ( axis, delta );
void set(double x, double y, double z)
bool isNear(const AA &aa, Scalar epsilon=tolerance) const
double distance(const HepAxisAngle &aa) const
double howNear(const AA &aa) const
AA & set(const Hep3Vector axis, Scalar delta)
std::istream & operator>>(std::istream &is, HepRandom &dist)
void ZMinputAxisAngle(std::istream &is, double &x, double &y, double &z, double &delta)
std::ostream & operator<<(std::ostream &os, const HepRandom &dist)