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.
AppFlow/FITK_Interface/FITKInterfaceMesh/FITKUnstructuredMeshVTK.h

183 lines
5.1 KiB
C

/**
*
* @file FITKUnstructuredMeshVTK.h
* @brief vtk
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-02-28
*
*/
#ifndef _FITKUNSTRUCTUREDMESH_VTK_H__
#define _FITKUNSTRUCTUREDMESH_VTK_H__
#include "FITK_Interface/FITKInterfaceModel/FITKUnstructuredMesh.h"
#include "FITKInterfaceMeshAPI.h"
//class QColor;
class vtkUnstructuredGrid;
class vtkPoints;
namespace Interface
{
class FITKMeshFeatureVTK;
/**
* @brief vtk
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-02-28
*/
class FITKInterfaceMeshAPI FITKUnstructuredMeshVTK : public FITKUnstructuredMesh
{
// FITKSafeDownCastA(FITKUnstructuredMeshVTK, Core::FITKAbstractDataObject);
public:
explicit FITKUnstructuredMeshVTK();
virtual ~FITKUnstructuredMeshVTK();
/**
* @brief
* @return AbsModelType
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-02-27
*/
virtual FITKModelEnum::AbsModelType getAbsModelType() override;
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-02-27
*/
virtual void update() override;
/**
* @brief
* @param[i] x x
* @param[i] y y
* @param[i] z z
* @return int ID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-02-28
*/
virtual int addNode(const double x, const double y, const double z) override;
/**
* @brief
* @param[i] id ID
* @param[i] x x
* @param[i] y y
* @param[i] z z
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-02-28
*/
virtual void addNode(const int id, const double x, const double y, const double z) override;
/**
* @brief
* @param[i] element
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-02-28
*/
virtual void appendElement(FITKAbstractElement* element) override;
/**
* @brief
* @param[i] file
* @return true
* @return false
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-02-28
*/
virtual bool writeToFile(const QString & file) override;
/**
* @brief
* @param id ID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-03
*/
virtual void reverseEleByID(const int id) override;
/**
* @brief
* @param index
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-03
*/
virtual void reverseEleByIndex(const int index) override;
/**
* @brief
* @return FITKMeshFeatureVTK*
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-22
*/
FITKMeshFeatureVTK* getMeshFeature();
/**
* @brief
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-04-03
*/
vtkUnstructuredGrid* getGrid();
/**
* @brief
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-04-07
*/
int getNumberOfCells();
/**
* @brief
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-04-08
*/
void reConstructure();
/**
* @brief vtk
* @param[i] grid vtk
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-03
*/
void transformVTKMesh(vtkUnstructuredGrid* grid);
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-26
*/
void clearMesh();
private:
/**
* @brief VTK
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-08
*/
vtkUnstructuredGrid* _vtkDataSet{};
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-08
*/
// vtkPoints* _vtkPoints{};
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-21
*/
FITKMeshFeatureVTK* _feature{};
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-03
*/
bool _modified{ false };
};
}
#endif