You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
835 B
C++
34 lines
835 B
C++
#include "FITKGeoModelManager.h"
|
|
|
|
namespace Interface
|
|
{
|
|
FITKGeoModelManager::FITKGeoModelManager()
|
|
{
|
|
//构造函数
|
|
}
|
|
FITKGeoModelManager::~FITKGeoModelManager()
|
|
{
|
|
//析构函数
|
|
}
|
|
|
|
void FITKGeoModelManager::getBoundaryBox(double* minPt, double* maxPt)
|
|
{
|
|
const int n = this->getDataCount();
|
|
for (int i=0;i<n; ++i)
|
|
{
|
|
FITKAbstractGeoModel* m = this->getDataByIndex(i);
|
|
if(m == nullptr) continue;
|
|
double min[3] = { 9e66,9e66,9e66 }, max[3] = { -9e66, -9e66, -9e66 };
|
|
m->getBoundaryBox(min, max);
|
|
|
|
for (int j =0; j < 3; ++j)
|
|
{
|
|
minPt[j] = minPt[j] < min[j] ? minPt[j] : min[j];
|
|
maxPt[j] = maxPt[j] < max[j] ? maxPt[j] : max[j];
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|