00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include "stdafx.h"
00012 #include "ippdme/ippCsyTransform.h"
00013
00014 #include <math.h>
00015
00016
00017 void ippCsyTransform::update(
00018 double x0_in,
00019 double y0_in,
00020 double z0_in,
00021 double theta_in,
00022 double psi_in,
00023 double phi_in)
00024 {
00025 double c1;
00026 double s1;
00027 double c2;
00028 double s2;
00029 double c3;
00030 double s3;
00031
00032 x0 = x0_in;
00033 y0 = y0_in;
00034 z0 = z0_in;
00035 theta = theta_in;
00036 psi = psi_in;
00037 phi = phi_in;
00038 c1 = cos((theta * IPP_PI) / 180.0);
00039 s1 = sin((theta * IPP_PI) / 180.0);
00040 c2 = cos((psi * IPP_PI) / 180.0);
00041 s2 = sin((psi * IPP_PI) / 180.0);
00042 c3 = cos((phi * IPP_PI) / 180.0);
00043 s3 = sin((phi * IPP_PI) / 180.0);
00044 M11 = ((c2 * c3) - (c1 * s2 * s3));
00045 M12 = ((s2 * c3) + (c1 * c2 * s3));
00046 M13 = (s1 * s3);
00047 M21 = (-(c2 * s3) - (c1 * s2 * c3));
00048 M22 = (-(s2 * s3) + (c1 * c2 * c3));
00049 M23 = (s1 * c3);
00050 M31 = (s1 * s2);
00051 M32 = -(s1 * c2);
00052 M33 = c1;
00053 }