mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-12 06:52:57 +00:00
Move many third-party components' source codes from the src folder to a new folder called deps_src. The goal is to make the code structure clearer and easier to navigate.
63 lines
1.5 KiB
C++
63 lines
1.5 KiB
C++
/****************************************************************************
|
|
**
|
|
** Copyright (c) 2009-2015 C.B. Barber. All rights reserved.
|
|
** $Id: //main/2015/qhull/src/libqhullcpp/QhullPointSet.cpp#2 $$Change: 2066 $
|
|
** $DateTime: 2016/01/18 19:29:17 $$Author: bbarber $
|
|
**
|
|
****************************************************************************/
|
|
|
|
#include "libqhullcpp/QhullPointSet.h"
|
|
|
|
#include <iostream>
|
|
#include <algorithm>
|
|
|
|
#ifdef _MSC_VER // Microsoft Visual C++ -- warning level 4
|
|
#endif
|
|
|
|
namespace orgQhull {
|
|
|
|
// Implemented via QhullSet.h
|
|
|
|
}//namespace orgQhull
|
|
|
|
#//!\name Global functions
|
|
|
|
using std::endl;
|
|
using std::ostream;
|
|
using orgQhull::QhullPoint;
|
|
using orgQhull::QhullPointSet;
|
|
using orgQhull::QhullPointSetIterator;
|
|
|
|
ostream &
|
|
operator<<(ostream &os, const QhullPointSet::PrintIdentifiers &pr)
|
|
{
|
|
os << pr.print_message;
|
|
const QhullPointSet s= *pr.point_set;
|
|
QhullPointSetIterator i(s);
|
|
while(i.hasNext()){
|
|
if(i.hasPrevious()){
|
|
os << " ";
|
|
}
|
|
const QhullPoint point= i.next();
|
|
countT id= point.id();
|
|
os << "p" << id;
|
|
|
|
}
|
|
os << endl;
|
|
return os;
|
|
}//PrintIdentifiers
|
|
|
|
ostream &
|
|
operator<<(ostream &os, const QhullPointSet::PrintPointSet &pr)
|
|
{
|
|
os << pr.print_message;
|
|
const QhullPointSet s= *pr.point_set;
|
|
for(QhullPointSet::const_iterator i=s.begin(); i != s.end(); ++i){
|
|
const QhullPoint point= *i;
|
|
os << point;
|
|
}
|
|
return os;
|
|
}//printPointSet
|
|
|
|
|