Last change
on this file since 10207 was
10207,
checked in by ascheibe, 11 years ago
|
#1886 added a unit test for volume calculation and the qhull library
|
File size:
1.3 KB
|
Rev | Line | |
---|
[10207] | 1 | /****************************************************************************
|
---|
| 2 | **
|
---|
| 3 | ** Copyright (c) 2008-2012 C.B. Barber. All rights reserved.
|
---|
| 4 | ** $Id: //main/2011/qhull/src/libqhullcpp/QhullSet.cpp#4 $$Change: 1464 $
|
---|
| 5 | ** $DateTime: 2012/01/25 22:58:41 $$Author: bbarber $
|
---|
| 6 | **
|
---|
| 7 | ****************************************************************************/
|
---|
| 8 |
|
---|
| 9 | #//! QhullSet -- Qhull's facet structure, facetT, as a C++ class
|
---|
| 10 |
|
---|
| 11 | #include "QhullError.h"
|
---|
| 12 | #include "QhullSet.h"
|
---|
| 13 |
|
---|
| 14 | #ifdef _MSC_VER // Microsoft Visual C++ -- warning level 4
|
---|
| 15 | #endif
|
---|
| 16 |
|
---|
| 17 | namespace orgQhull {
|
---|
| 18 |
|
---|
| 19 | #//static members
|
---|
| 20 |
|
---|
| 21 | setT QhullSetBase::
|
---|
| 22 | s_empty_set;
|
---|
| 23 |
|
---|
| 24 | // Same code for qh_setsize [qset.c] and QhullSetBase::count
|
---|
| 25 | int QhullSetBase::count(const setT *set)
|
---|
| 26 | {
|
---|
| 27 | int size;
|
---|
| 28 | const setelemT *sizep;
|
---|
| 29 |
|
---|
| 30 | if (!set)
|
---|
| 31 | return(0);
|
---|
| 32 | sizep= SETsizeaddr_(set);
|
---|
| 33 | if ((size= sizep->i)) {
|
---|
| 34 | size--;
|
---|
| 35 | if (size > set->maxsize) {
|
---|
| 36 | // FIXUP QH11022 How to add additional output to a error? -- qh_setprint(qhmem.ferr, "set: ", set);
|
---|
| 37 | throw QhullError(10032, "QhullSet internal error: current set size %d is greater than maximum size %d\n",
|
---|
| 38 | size, set->maxsize);
|
---|
| 39 | }
|
---|
| 40 | }else
|
---|
| 41 | size= set->maxsize;
|
---|
| 42 | return size;
|
---|
| 43 | }
|
---|
| 44 |
|
---|
| 45 |
|
---|
| 46 | }//namespace orgQhull
|
---|
| 47 |
|
---|
Note: See
TracBrowser
for help on using the repository browser.