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

ippOnePropertyCollisionVolume.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/Property/ippOnePropertyCollisionVolume.h"
00013 #include "ippdme/misc/ippStringBuilder.h"
00014 #include "ippdme/ippBox.h"
00015 #include "ippdme/ippProp.h"
00016 
00017 
00018 //=============================================================================
00019 ippOnePropertyCollisionVolume::ippOnePropertyCollisionVolume(
00020  ippOtherKeyType keyword // should be Tool or FoundTool
00021  )
00022 //-----------------------------------------------------------------------------
00023 : ippOneProperty(ippProp(keyword,CollisionVolume))
00024 {
00025 }
00026 
00027 //=============================================================================
00028 ippOnePropertyCollisionVolume::ippOnePropertyCollisionVolume(
00029   ippOtherKeyType keyword, // should be Tool or FoundTool
00030   const std::vector<ippBox>& boxes
00031 )
00032 //-----------------------------------------------------------------------------
00033 : ippOneProperty(ippProp(keyword,CollisionVolume))
00034 {
00035   setBoxes(boxes);
00036 }
00037 
00038 
00039 //=============================================================================
00040 void ippOnePropertyCollisionVolume::propString(ippStringBuilder& builder) const
00041 //-----------------------------------------------------------------------------
00042 {
00043 
00044   builder.StartFunc(_prop.toString().c_str());
00045 
00046   for (size_t j = 0; j < _boxes.size(); j++) {
00047   
00048     const ippBox& b = _boxes[j];
00049       builder.Append("OBB,");
00050 
00051       builder.AppendParam(b.Cx);
00052       builder.AppendParam(b.Cy);
00053       builder.AppendParam(b.Cz);
00054       builder.AppendParam(b.Ex);
00055       builder.AppendParam(b.Ey);
00056       builder.AppendParam(b.Ez);
00057       builder.AppendParam(b.Ix);
00058       builder.AppendParam(b.Iy);
00059       builder.AppendParam(b.Iz);
00060       builder.AppendParam(b.Jx);
00061       builder.AppendParam(b.Jy);
00062       builder.AppendParam(b.Jz);
00063       builder.AppendParam(b.Kx);
00064       builder.AppendParam(b.Ky);
00065       builder.AppendParam(b.Kz);
00066 
00067   }
00068   builder.EndFunc();
00069 }
00070 
00071 //=============================================================================
00072 ippOnePropertyCollisionVolume::~ippOnePropertyCollisionVolume()
00073 //-----------------------------------------------------------------------------
00074 {
00075 }
00076 
00077 //=============================================================================
00078 void ippOnePropertyCollisionVolume::setBoxes(
00079   const std::vector<ippBox>& inBoxes
00080 )
00081 //-----------------------------------------------------------------------------
00082 {
00083    _boxes = inBoxes; 
00084 }
00085 //=============================================================================
00086 void ippOnePropertyCollisionVolume::addBox(const ippBox& box)
00087 //-----------------------------------------------------------------------------
00088 {
00089   _boxes.push_back(box);
00090 }
00091 
00092 
00093 //=============================================================================
00094 const ippBox& ippOnePropertyCollisionVolume::getBox(int i) const 
00095 //-----------------------------------------------------------------------------
00096 {
00097   return _boxes[i];
00098 }
00099 
00100 

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