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.
56 lines
1.1 KiB
C++
56 lines
1.1 KiB
C++
#include "nmPebiGridViewData.h"
|
|
|
|
#include <vtkUnstructuredGrid.h>
|
|
|
|
nmPebiGridViewData::nmPebiGridViewData()
|
|
: m_pGrid(NULL),
|
|
m_eGridType(NM_Grid_UNKNWON),
|
|
m_nGridInputRevision(0),
|
|
m_nValidCellCount(0),
|
|
m_bHasMaterial(false)
|
|
{
|
|
}
|
|
|
|
void nmPebiGridViewData::clear()
|
|
{
|
|
// 只解除共享的 VTK 引用,不删除 DataManager 持有的实时网格。
|
|
m_pGrid = NULL;
|
|
m_eGridType = NM_Grid_UNKNWON;
|
|
m_nGridInputRevision = 0;
|
|
m_nValidCellCount = 0;
|
|
m_bHasMaterial = false;
|
|
}
|
|
|
|
bool nmPebiGridViewData::isValid() const
|
|
{
|
|
return m_pGrid != NULL &&
|
|
m_pGrid->GetNumberOfPoints() > 0 &&
|
|
m_pGrid->GetNumberOfCells() > 0 &&
|
|
m_nValidCellCount > 0;
|
|
}
|
|
|
|
vtkUnstructuredGrid* nmPebiGridViewData::getGrid() const
|
|
{
|
|
return m_pGrid;
|
|
}
|
|
|
|
NM_Grid_Type nmPebiGridViewData::getGridType() const
|
|
{
|
|
return m_eGridType;
|
|
}
|
|
|
|
quint64 nmPebiGridViewData::getGridInputRevision() const
|
|
{
|
|
return m_nGridInputRevision;
|
|
}
|
|
|
|
vtkIdType nmPebiGridViewData::getValidCellCount() const
|
|
{
|
|
return m_nValidCellCount;
|
|
}
|
|
|
|
bool nmPebiGridViewData::hasMaterial() const
|
|
{
|
|
return m_bHasMaterial;
|
|
}
|