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
1.3 KiB
C++
34 lines
1.3 KiB
C++
#include "nmVolumeData.h"
|
|
#include <vtkUnstructuredGrid.h>
|
|
|
|
nmVolumeData::nmVolumeData()
|
|
: m_pGrid(vtkSmartPointer<vtkUnstructuredGrid>::New())
|
|
{
|
|
for(int nIndex = 0; nIndex < 6; ++nIndex) m_dBounds[nIndex] = 0.0;
|
|
}
|
|
|
|
nmVolumeData::~nmVolumeData() {}
|
|
QString nmVolumeData::getDataId() const { return m_sDataId; }
|
|
QString nmVolumeData::getSourceName() const { return m_sSourceName; }
|
|
vtkIdType nmVolumeData::getPointCount() const { return m_pGrid->GetNumberOfPoints(); }
|
|
vtkIdType nmVolumeData::getCellCount() const { return m_pGrid->GetNumberOfCells(); }
|
|
void nmVolumeData::getBounds(double dBounds[6]) const
|
|
{
|
|
if(dBounds != nullptr) {
|
|
for(int nIndex = 0; nIndex < 6; ++nIndex) dBounds[nIndex] = m_dBounds[nIndex];
|
|
}
|
|
}
|
|
const QVector<nmVolumePropertyDescriptor>& nmVolumeData::getProperties() const
|
|
{
|
|
return m_vecProperties;
|
|
}
|
|
const nmVolumePropertyDescriptor* nmVolumeData::findProperty(const QString& sPropertyId) const
|
|
{
|
|
for(int nIndex = 0; nIndex < m_vecProperties.size(); ++nIndex) {
|
|
if(m_vecProperties[nIndex].m_sPropertyId == sPropertyId) return &m_vecProperties[nIndex];
|
|
}
|
|
return nullptr;
|
|
}
|
|
QString nmVolumeData::getInitialPropertyId() const { return m_sInitialPropertyId; }
|
|
QStringList nmVolumeData::getDiagnostics() const { return m_listDiagnostics; }
|