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/FITKInterfaceGeometry/FITKAbsGeoSketch2D.h

219 lines
6.5 KiB
C

/*****************************************************************//**
* @file FITKAbsGeoSketch2D.h
* @brief 2D
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-03
*********************************************************************/
#ifndef FITKABSGEOSKETCH2D_H
#define FITKABSGEOSKETCH2D_H
#include "FITK_Kernel/FITKCore/FITKAbstractNDataObject.h"
#include "FITKGeoEnum.h"
#include "FITKAbsGeoCommand.h"
#include "FITKInterfaceGeometryAPI.h"
namespace Interface
{
/**
* @brief 2D
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-03
*/
class FITKInterfaceGeometryAPI FITKAbsGeoSketch2D : public Interface::FITKAbsGeoCommand, public FITKGeoCommandManager
{
FITKCLASS(Interface, FITKAbsGeoSketch2D);
public:
/**
* @brief
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-03
*/
FITKAbsGeoSketch2D();
/**
* @brief []
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-03
*/
virtual ~FITKAbsGeoSketch2D();
/**
* @brief []
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-04
*/
FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override;
/**
* @brief []
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-04
*/
bool update() override;
/**
* @brief
* @param pos
* @param normal
* @param up
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-20
*/
void setPlane(double* pos, double* normal, double* up);
/**
* @brief
* @param pos
* @param normal
* @param up
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-20
*/
void getPlane(double* pos, double* normal, double* up);
/**
* @brief
* @param pos
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-05
*/
void setPosition(double* pos);
/**
* @brief
* @param pos
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-05
*/
void getPosition(double* pos);
/**
* @brief
* @param nor
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-05
*/
void setNormal(double* nor);
/**
* @brief
* @param nor
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-05
*/
void getNormal(double* nor);
/**
* @brief
* @param up
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-05
*/
void setUp(double* up);
/**
* @brief
* @param up
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-05
*/
void getUp(double* up);
/**
* @brief
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-20
*/
bool undoInternal();
/**
* @brief
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-20
*/
bool redoInternal();
/**
* @brief RedoList[][]
* @param obj
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-20
*/
virtual void appendDataObj(Core::FITKAbstractDataObject* obj) override;
/**
* @brief []
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-20
*/
virtual bool canUndo();
/**
* @brief []
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-20
*/
virtual bool canRedo();
/**
* @brief
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-20
*/
FITKGeoCommandManager* getUndoList();
/**
* @brief
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-20
*/
FITKGeoCommandManager* getRedoList();
protected:
/**
* @brief
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-05
*/
double m_pos[3]{ 0., 0., 0. };
/**
* @brief
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-05
*/
double m_nor[3]{ 0., 0., 1. };
/**
* @brief
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-05
*/
double m_up[3]{ 0., 1., 0. };
/**
* @brief
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-20
*/
FITKGeoCommandManager* m_redoList{ nullptr };
};
}
#endif // !FITKABSGEOSKETCH2D_H