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.
nmWTAI-Platform/Include/nmNum/nmSubWxs/nmPebiGridViewData.h

48 lines
1.3 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#ifndef NMPEBIGRIDVIEWDATA_H
#define NMPEBIGRIDVIEWDATA_H
#include "nmSubWxs_global.h"
#include "nmGridDefine.h"
#include <vtkSmartPointer.h>
#include <vtkType.h>
class nmPebiGridViewDataBuilder;
class vtkUnstructuredGrid;
/**
* @brief 已提交 PEBI 网格及其预览元数据的只读载体。
*
* VTK 网格通过 vtkSmartPointer 共享引用,不执行 DeepCopy也不保存
* nmDataAnalyzeManager 或其他 QObject 裸指针。
*/
class NM_SUB_WXS_EXPORT nmPebiGridViewData
{
public:
nmPebiGridViewData();
/** @brief 释放共享网格并清空与该版本对应的预览元数据。 */
void clear();
/** @brief 网格、点和单元均存在时返回 true。 */
bool isValid() const;
/** 以下访问函数均不转移所有权。 */
vtkUnstructuredGrid* getGrid() const;
NM_Grid_Type getGridType() const;
quint64 getGridInputRevision() const;
vtkIdType getValidCellCount() const;
bool hasMaterial() const;
private:
friend class nmPebiGridViewDataBuilder;
vtkSmartPointer<vtkUnstructuredGrid> m_pGrid; ///< 共享已提交网格的 VTK 引用。
NM_Grid_Type m_eGridType;
quint64 m_nGridInputRevision;
vtkIdType m_nValidCellCount;
bool m_bHasMaterial; ///< 仅表示存在维度正确的 CellData/Material。
};
#endif // NMPEBIGRIDVIEWDATA_H