Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ippCsyTransform.h

Go to the documentation of this file.
00001 // 
00002 // DISCLAIMER: 
00003 //  This software was produced by the National Institute of Standards 
00004 //  and Technology (NIST), an agency of the U.S. government, and by statute is 
00005 //  not subject to copyright in the United States.  Recipients of this 
00006 //  software assume all responsibility associated with its operation,
00007 //  modification,maintenance, and subsequent redistribution. 
00008 //
00009 //  See NIST Administration Manual 4.09.07 b and Appendix I. 
00010 //
00011 
00012 #include "ippdme/ippdme.h"
00013 
00014 const double IPP_NORMAL_ERROR =  0.0001;
00015 const double IPP_PI  = 3.14159265358979323846;
00016 
00017 
00019 class IPPDME_EXT_CLASS ippCsyTransform
00020 {
00021 private:
00022   double x0;
00023   double y0;
00024   double z0;
00025   double theta;
00026   double psi;
00027   double phi;
00028   double M11;
00029   double M12;
00030   double M13;
00031   double M21;
00032   double M22;
00033   double M23;
00034   double M31;
00035   double M32;
00036   double M33;
00037 
00038 public:
00039   ippCsyTransform() {
00040     x0 = 0; y0 = 0; z0 = 0; theta = 0; psi = 0; phi = 0;
00041     M11 = 1; M12 = 0; M13 = 0;
00042                 M21 = 0; M22 = 1; M23 = 0;
00043                 M31 = 0; M32 = 0; M33 = 1;
00044  }
00045  ~ippCsyTransform(){};
00046  
00047  void update(double x0In, double y0In, double z0In,
00048             double thetaIn, double psiIn, double phiIn);
00049 
00050   double fwdPointX(double xIn, double yIn, double zIn) const
00051     {return ((M11 * xIn) + (M12 * yIn) + (M13 * zIn) + x0);}
00052   double fwdPointY(double xIn, double yIn, double zIn) const
00053     {return ((M21 * xIn) + (M22 * yIn) + (M23 * zIn) + y0);}
00054   double fwdPointZ(double xIn, double yIn, double zIn) const
00055     {return ((M31 * xIn) + (M32 * yIn) + (M33 * zIn) + z0);}
00056   double invPointX(double xIn, double yIn, double zIn) const
00057     {return ((M11 * (xIn - x0)) + (M21 * (yIn - y0)) + (M31 * (zIn - z0)));}
00058   double invPointY(double xIn, double yIn, double zIn) const
00059     {return ((M12 * (xIn - x0)) + (M22 * (yIn - y0)) + (M32 * (zIn - z0)));}
00060   double invPointZ(double xIn, double yIn, double zIn) const
00061     {return ((M13 * (xIn - x0)) + (M23 * (yIn - y0)) + (M33 * (zIn - z0)));}
00062 
00063   double fwdDirectionX(double xIn, double yIn, double zIn) const
00064     {return ((M11 * xIn) + (M12 * yIn) + (M13 * zIn));}
00065   double fwdDirectionY(double xIn, double yIn, double zIn) const
00066     {return ((M21 * xIn) + (M22 * yIn) + (M23 * zIn));}
00067   double fwdDirectionZ(double xIn, double yIn, double zIn) const
00068     {return ((M31 * xIn) + (M32 * yIn) + (M33 * zIn));}
00069   double invDirectionX(double xIn, double yIn, double zIn) const
00070     {return ((M11 * xIn) + (M21 * yIn) + (M31 * zIn));}
00071   double invDirectionY(double xIn, double yIn, double zIn) const
00072     {return ((M12 * xIn) + (M22 * yIn) + (M32 * zIn));}
00073   double invDirectionZ(double xIn, double yIn, double zIn) const
00074     {return ((M13 * xIn) + (M23 * yIn) + (M33 * zIn));}
00075 
00076 
00077   double getX()const {return x0;}
00078   double getY()const {return y0;}
00079   double getZ()const {return z0;}
00080   double getTheta()const {return theta;}
00081   double getPsi()const {return psi;}
00082   double getPhi()const {return phi;}
00083 
00084 };
00085 
00086 

Generated on Wed Nov 8 00:19:58 2006 for IPPDME by  doxygen 1.4.1