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

ippAlignToolCommand.cpp

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 #include "stdafx.h"
00012 #include "ippdme/Command/ippAlignToolCommand.h"
00013 #include "ippdme/misc/ippStringBuilder.h"
00014 
00015 
00016 ippAlignToolCommand::ippAlignToolCommand(
00017   unsigned int tgNum, 
00018    double i1, double j1, double k1,
00019    double i2, double j2, double k2,
00020    double inAlpha, double inBeta
00021  )
00022   :  ippCommand(tgNum, CommandTag, AlignTool)
00023   , _has2(true)
00024 {
00025   _vector1.setValues(i1, j1, k1);
00026   _vector2.setValues(i2, j2, k2);
00027   _alpha = inAlpha;
00028   _beta = inBeta;
00029 }
00030 ippAlignToolCommand::ippAlignToolCommand(
00031   unsigned int tgNum, 
00032   double i1, double j1, double k1,
00033   double inAlpha
00034  )
00035   :  ippCommand(tgNum, CommandTag, AlignTool)
00036   , _has2(false)
00037 {
00038   _vector1.setValues(i1, j1, k1);
00039   _vector2.setValues(0, 0, 0);
00040   _alpha = inAlpha;
00041   _beta = 0.0;
00042 }
00043 
00044 std::string ippAlignToolCommand::getCommandString() const
00045 {
00046   ippStringBuilder builder(_tag);
00047   builder.StartFunc("AlignTool");
00048  
00049   //x IPP_ASSERT(_vector1.hasData());
00050 
00051   builder.AppendParam(_vector1.getI());
00052   builder.AppendParam(_vector1.getJ());
00053   builder.AppendParam(_vector1.getK());
00054 
00055   if (_has2 && _vector2.hasData()) {
00056     builder.AppendParam(_vector2.getI());
00057     builder.AppendParam(_vector2.getJ());
00058     builder.AppendParam(_vector2.getK());
00059     builder.AppendParam(_alpha);
00060     builder.AppendParam(_beta);
00061 
00062   } else {
00063     builder.AppendParam(_alpha);
00064   }
00065   builder.EndFunc();
00066 
00067   return builder.ToString();
00068 }

Generated on Wed Nov 8 00:20:01 2006 for IPPDME by  doxygen 1.4.1