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.

281 lines
9.4 KiB
C

/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-06
*/
#ifndef __FITKINTERFACESTRUPOSTVTK_H_ABS_
#define __FITKINTERFACESTRUPOSTVTK_H_ABS_
#include "FITKInterfaceCFDPostAPI.h"
#include "FITKCFDPostEnum.h"
#include "FITK_Kernel/FITKCore/FITKAbstractNDataObject.h"
#include "FITK_Kernel/FITKCore/FITKVarientParams.h"
#include "FITK_Kernel/FITKCore/FITKCoreMacros.h"
class vtkMapper;
class vtkDataSet;
class vtkTextProperty;
class vtkScalarBarWidget;
class vtkLookupTable;
class vtkAssembly;
class vtkActor;
class vtkRenderWindowInteractor;
class vtkAlgorithmOutput;
namespace Interface
{
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-06
*/
class FITKInterfaceCFDPostAPI FITKAbstractCFDPostData : public Core::FITKAbstractNDataObject, public Core::FITKVarientParams
{
FITKCLASS(Interface, FITKAbstractCFDPostData);
public:
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-06
*/
explicit FITKAbstractCFDPostData();
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-06
*/
virtual ~FITKAbstractCFDPostData();
/**
* @brief
* @return FITKPostDataType
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-14
*/
virtual FITKPostDataType getPostDataType() = 0;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-06
*/
virtual void update();
/**
* @brief mapper
* @return QList<vtkDataSetMapper*> mapper
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-14
*/
QList<vtkMapper*> getMappers();
/**
* @brief
* @return vtkDataSet*
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-07
*/
virtual vtkDataSet* getOutput();
/**
* @brief
* @return vtkAlgorithmOutput*
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-14
*/
virtual vtkAlgorithmOutput* getOutputPort();
/**
* @brief id
* @return int id
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-07
*/
virtual int getCFDPostParentID();
/**
* @brief
* @param[i] interactor
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-18
*/
virtual void setInteractor(vtkRenderWindowInteractor* interactor);
/**
* @brief
* @param[i] interactor
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-11
*/
void setScalarBarWidgetInteractor(vtkRenderWindowInteractor* interactor);
/**
* @brief
* @return QStringList
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-11
*/
QStringList getPointDataArray();
/**
* @brief
* @return QStringList
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-11
*/
QStringList getCellDataArray();
/**
* @brief
* @param[i] fieldType /
* @param[i] fieldName
* @return VariabelType
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-11
*/
FITKPostVariableType getVariableType(FITKPostFieldType fieldType, QString fieldName);
/**
* @brief
* @param[i] fieldType /
* @param[i] fieldName
* @return int
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-11
*/
int getVariableComponentCount(FITKPostFieldType fieldType, QString fieldName);
/**
* @brief
* @return vtkScalarBarWidget*
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-11
*/
vtkScalarBarWidget* getScalarBarWidget();
/**
* @brief
* @return int
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-12
*/
int getScalaraBarColorNum();
/**
* @brief
* @param[i] count
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-12
*/
void setScalarBarColorNum(int count);
/**
* @brief
* @param[o] range
* @param[i] type
* @param[i] fieldName
* @param[i] componentIndex
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-12
*/
void getRange(double* range, FITKPostFieldType type, QString fieldName, int componentIndex = -1);
/**
* @brief
* @param[0] range [2](MinMax)
* @param[0] point [6](MinXMaxXMinYMaxYMinZMaxZ)
* @param[i] type
* @param[i] fieldName
* @param[i] componentIndex
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-12
*/
void getExtremum(double* range, double* point, FITKPostFieldType type, QString fieldName, int componentIndex = -1);
/**
* @brief
* @param[i] minRange
* @param[i] maxRange
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-12
*/
void setScalarRange(double minRange, double maxRange);
/**
* @brief
* @param[i] maxColor 0-1
* @param[i] buleColro 0-1
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-12
*/
void setHueRange(double maxColor, double minColor);
/**
* @brief
* @return double*
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-12
*/
void getHueRange(double* range);
/**
* @brief
* @return int
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-13
*/
int getPointNumber();
/**
* @brief
* @return int
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-13
*/
int getCellNumber();
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-13
*/
FITKPostGridType getGridType();
/**
* @brief
* @param[o] bounds [6]
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-18
*/
void getBounds(double* bounds);
/**
* @brief
* @param[o] origin [3]
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-08
*/
void getOrigin(double* origin);
protected:
/**
* @brief vtkMapper
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-11
*/
QList<vtkMapper*> _mappers = {};
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-11
*/
vtkTextProperty* _textProperty = nullptr;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-11
*/
vtkScalarBarWidget* _scalarBarWidget = nullptr;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-08
*/
vtkLookupTable* _lookUpTable = nullptr;
/**
* @brief ScalarBarWidget
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-12
*/
const int _defaultScalarBarNum = 5;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-12
*/
const QPair<double, double> _defaultHue = { 0.67,0.0 };
/**
* @brief id
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-12
*/
int _CFDPostParentID = -1;
};
}
#endif