49 bool delete_it =
false;
50 if (i->
isA(
"transformation")) {
61 vector<EGS_Float> tmp;
62 int err = input->
getInput(
"translation",tmp);
63 if (!err && tmp.size() == 3) {
67 err = input->
getInput(
"rotation vector",tmp);
68 if (!err && tmp.size() == 3)
72 err = input->
getInput(
"rotation",tmp);
78 else if (tmp.size() == 4) {
85 else if (tmp.size() == 9) {
88 tmp[6],tmp[7],tmp[8]);
90 egsWarning(
"getTransformation: the rotation specified by\n"
91 " %g %g %g\n %g %g %g\n %g %g %g\n"
92 " is not a rotation\n",tmp[0],tmp[1],tmp[2],
93 tmp[3],tmp[4],tmp[5],tmp[6],tmp[7],tmp[8]);
121 if (translation.size()!=3 || (rotation.size()!=2 && rotation.size()!=3)) {
122 egsWarning(
"getTransformation: invalid transformation parameters\n");
134 if (rotation.size() == 2) {
137 else if (rotation.size() == 3) {
A class for vector rotations.
bool isRotation() const
Is this object a real rotation matrix?
static EGS_RotationMatrix rotZ(EGS_Float cphi, EGS_Float sphi)
Returns a rotation around the z-axis by the angle with cphi, sphi = .
EGS_RotationMatrix inverse() const
Returns the inverse matrix.
A class representing 3D vectors.
EGS_InfoFunction EGS_EXPORT egsWarning
Always use this function for reporting warnings.