qt-qhull.cpp
Go to the documentation of this file.
00001 /****************************************************************************
00002 **
00003 ** Copyright (c) 2009-2011 C.B. Barber. All rights reserved.
00004 ** $Id: //main/2011/qhull/src/libqhullcpp/qt-qhull.cpp#2 $$Change: 1342 $
00005 ** $DateTime: 2011/03/07 21:55:47 $$Author: bbarber $
00006 **
00007 ****************************************************************************/
00008 
00009 #include <QList>
00010 
00011 #ifndef QHULL_USES_QT
00012 #define QHULL_USES_QT 1
00013 #endif
00014 
00015 #include "Coordinates.h"
00016 #include "QhullFacetList.h"
00017 #include "QhullFacetSet.h"
00018 #include "QhullHyperplane.h"
00019 #include "QhullPoint.h"
00020 #include "QhullPoints.h"
00021 #include "QhullPointSet.h"
00022 #include "QhullVertex.h"
00023 #include "QhullVertexSet.h"
00024 
00025 namespace orgQhull {
00026 
00027 #//Conversions
00028 
00029 QList<coordT> Coordinates::
00030 toQList() const
00031 {
00032     CoordinatesIterator i(*this);
00033     QList<coordT> cs;
00034     while(i.hasNext()){
00035         cs.append(i.next());
00036     }
00037     return cs;
00038 }//toQList
00039 
00040 QList<QhullFacet> QhullFacetList::
00041 toQList() const
00042 {
00043     QhullLinkedListIterator<QhullFacet> i(*this);
00044     QList<QhullFacet> vs;
00045     while(i.hasNext()){
00046         QhullFacet f= i.next();
00047         if(isSelectAll() || f.isGood()){
00048             vs.append(f);
00049         }
00050     }
00051     return vs;
00052 }//toQList
00053 
00055 QList<QhullVertex> QhullFacetList::
00056 vertices_toQList(int qhRunId) const
00057 {
00058     QList<QhullVertex> vs;
00059     QhullVertexSet qvs(qhRunId, first().getFacetT(), NULL, isSelectAll());
00060     for(QhullVertexSet::iterator i=qvs.begin(); i!=qvs.end(); ++i){
00061         vs.push_back(*i);
00062     }
00063     return vs;
00064 }//vertices_toQList
00065 
00066 QList<QhullFacet> QhullFacetSet::
00067 toQList() const
00068 {
00069     QhullSetIterator<QhullFacet> i(*this);
00070     QList<QhullFacet> vs;
00071     while(i.hasNext()){
00072         QhullFacet f= i.next();
00073         if(isSelectAll() || f.isGood()){
00074             vs.append(f);
00075         }
00076     }
00077     return vs;
00078 }//toQList
00079 
00080 #ifdef QHULL_USES_QT
00081 QList<coordT> QhullHyperplane::
00082 toQList() const
00083 {
00084     QhullHyperplaneIterator i(*this);
00085     QList<coordT> fs;
00086     while(i.hasNext()){
00087         fs.append(i.next());
00088     }
00089     fs.append(hyperplane_offset);
00090     return fs;
00091 }//toQList
00092 #endif //QHULL_USES_QT
00093 
00094 QList<coordT> QhullPoint::
00095 toQList() const
00096 {
00097     QhullPointIterator i(*this);
00098     QList<coordT> vs;
00099     while(i.hasNext()){
00100         vs.append(i.next());
00101     }
00102     return vs;
00103 }//toQList
00104 
00105 QList<QhullPoint> QhullPoints::
00106 toQList() const
00107 {
00108     QhullPointsIterator i(*this);
00109     QList<QhullPoint> vs;
00110     while(i.hasNext()){
00111         vs.append(i.next());
00112     }
00113     return vs;
00114 }//toQList
00115 
00116 QList<QhullPoint> QhullPointSet::
00117 toQList() const
00118 {
00119     QhullPointSetIterator i(*this);
00120     QList<QhullPoint> vs;
00121     while(i.hasNext()){
00122         vs.append(i.next());
00123     }
00124     return vs;
00125 }//toQList
00126 
00127 }//orgQhull
00128 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


libqhull
Author(s): Robert Krug
autogenerated on Tue Jun 18 2013 12:38:50