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

ippTargetVector.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 
00014 #pragma once
00015 #include <math.h>
00016 #include "ippdme/ippdme.h"
00017 
00018 class ippStringBuilder;
00019 
00020 class IPPDME_EXT_CLASS ippTargetVector {
00021   
00022   
00023 public:
00024   ippTargetVector()
00025     {
00026       _value[0] = 0.0;
00027       _value[1] = 0.0;
00028       _value[2] = 0.0;
00029       _isSet = false;
00030     }
00031   ippTargetVector(double i, double j, double k)
00032     {
00033       _value[0] = i;
00034       _value[1] = j;
00035       _value[2] = k;
00036       _isSet = true;
00037     }
00038   ippTargetVector(double ijk[3])
00039     {
00040       _value[0] = ijk[0];
00041       _value[1] = ijk[1];
00042       _value[2] = ijk[2];
00043       _isSet = true;
00044     }
00045 
00046 
00047   void operator =(const ippTargetVector& rhs)
00048     {
00049        _value[0] = rhs._value[0];
00050        _value[1] = rhs._value[1];
00051        _value[2] = rhs._value[2];
00052        _isSet = rhs._isSet;
00053 
00054     }
00055 
00056   ippTargetVector(const ippTargetVector& rhs)
00057     {
00058        *this = rhs;
00059     }
00060 
00061   ~ippTargetVector(){}
00062   
00063   void setValues(double i, double j, double k)
00064     {
00065       _value[0] = i;
00066       _value[1] = j;
00067       _value[2] = k; 
00068       _isSet = true;
00069     }
00070   void setValues(double ijk[3])
00071     {
00072       _value[0] = ijk[0];
00073       _value[1] = ijk[1];
00074       _value[2] = ijk[2];
00075       _isSet = true;
00076     }
00077   double getI()const{ return _value[0]; }
00078   double getJ()const{ return _value[1]; }
00079   double getK()const{ return _value[2]; }
00080   double length()const
00081     { return sqrt((_value[0] * _value[0]) +
00082                   (_value[1] * _value[1]) +
00083                   (_value[2] * _value[2]));
00084     }
00085 
00086   bool hasData()const { return _isSet; }
00087 
00088   void build(ippStringBuilder& string_builder) const;
00089 
00090 
00091 private:
00092   double _value[3];
00093   bool _isSet; 
00094 };

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