#include "FITKMeshSurface.h" #include "FITKModelSet.h" #include "FITKAbstractModel.h" #include "FITK_Kernel/FITKCore/FITKDataRepo.h" namespace Interface { FITKMeshSurface::~FITKMeshSurface() { } FITKMeshSurface::MeshSurfaceType FITKMeshSurface::getMeshSurfaceType() { //错误值 return FITKMeshSurface::SurNone; } bool FITKMeshSurface::isInternal() const { return _internal; } void FITKMeshSurface::isInternal(bool internal) { _internal = internal; } int FITKMeshSurface::getMeshSetCount() const { //集合长度 return _modelSetIDs.size(); } Interface::FITKModelSet* FITKMeshSurface::getMeshSetAt(const int index) const { //错误判断 if (index < 0 || index >= _modelSetIDs.size()) return nullptr; const int id = _modelSetIDs.at(index).second; //类型转换 return FITKDATAREPO->getTDataByID(id); } FITKAbstractModel* FITKMeshSurface::getModelAt(const int index) const { if (index < 0 || index >= _modelSetIDs.size()) return nullptr; const int id = _modelSetIDs.at(index).first; //类型转换 FITKAbstractModel* model = FITKDATAREPO->getTDataByID(id); if (model == nullptr) { auto set = this->getMeshSetAt(index); if (set) model = set->getAbstractModel(); } return model; } QList FITKMeshSurface::getAbsoluteSetInfo() { return QList(); } int FITKMeshSurface::indexOf(int modelID, int setID) { QPair p(modelID, setID); return _modelSetIDs.indexOf(p); } }