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/FITKGeometryMeshEntity.h

257 lines
6.4 KiB
C

/**
*
* @file FITKGeometryMeshEntity.h
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*
*/
#ifndef _FITKGEOMETRY_MESHVS_ENTITY_H___
#define _FITKGEOMETRY_MESHVS_ENTITY_H___
#include "FITKInterfaceGeometryAPI.h"
#include <QList>
namespace Interface
{
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
class FITKInterfaceGeometryAPI FITKGeoMeshVSPt
{
public:
/**
* @brief Construct a new FITKGeoMeshVSPt object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
FITKGeoMeshVSPt() = default;
/**
* @brief Construct a new FITKGeoMeshVSPt object
* @param[i] x y z
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
FITKGeoMeshVSPt(const float& x, const float& y, const float& z);
/**
* @brief Construct a new FITKGeoMeshVSPt object
* @param[i] coor
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
FITKGeoMeshVSPt(double* coor);
/**
* @brief Destroy the FITKGeoMeshVSPt object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
~FITKGeoMeshVSPt() = default;
/**
* @brief xyz
* @param[i] x y z
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
void setXYZ(const float& x, const float& y, const float& z);
/**
* @brief x
* @return float
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
float x();
/**
* @brief y
* @return float
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
float y();
/**
* @brief z
* @return float
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
float z();
private:
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
float _coor[3] = { 0,0,0 };
};
typedef FITKGeoMeshVSPt FITKGeoMeshTriNor;
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
class FITKInterfaceGeometryAPI FITKGeoMeshVSTri
{
public:
/**
* @brief Construct a new FITKGeoMeshVSTri object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
FITKGeoMeshVSTri(const int p1, const int p2, const int p3);
/**
* @brief Destroy the FITKGeoMeshVSTri object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
~FITKGeoMeshVSTri() = default;
/**
* @brief
* @param[i] index 0-2
* @return int
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
int getNode(const int index);
/**
* @brief
* @return int*
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
const int* getNode() const;
private:
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
int _p[3] = { -1,-1,-1 };
};
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
class FITKInterfaceGeometryAPI FITKGeoMeshVSEdgeEntity
{
public:
/**
* @brief Construct a new FITKGeoMeshVSEdgeEntity object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
explicit FITKGeoMeshVSEdgeEntity() = default;
/**
* @brief Destroy the FITKGeoMeshVSEdgeEntity object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
virtual ~FITKGeoMeshVSEdgeEntity();
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
void clear();
/**
* @brief
* @param[i] pt
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
void appendPoint(FITKGeoMeshVSPt* pt);
/**
* @brief
* @return int
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
int getPointCount();
/**
* @brief
* @return const QList<FITKGeoMeshVSPt*>&
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
const QList<FITKGeoMeshVSPt*>& getPoints() const;
private:
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
QList<FITKGeoMeshVSPt*> _ptList{};
};
class FITKInterfaceGeometryAPI FITKGeoMeshVSFaceEntity :
public FITKGeoMeshVSEdgeEntity
{
public:
/**
* @brief Construct a new FITKGeoMeshVSFaceEntity object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
explicit FITKGeoMeshVSFaceEntity() = default;
/**
* @brief Destroy the FITKGeoMeshVSFaceEntity object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
virtual ~FITKGeoMeshVSFaceEntity();
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
void clear();
/**
* @brief
* @param[i] tri
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
void appendMeshTri(FITKGeoMeshVSTri* tri);
/**
* @brief
* @return int
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
int getTriangleCount();
/**
* @brief
* @return FITKGeoMeshVSTri*
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
const QList<FITKGeoMeshVSTri*>& getTriangles() const;
private:
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-04
*/
QList<FITKGeoMeshVSTri*> _triList{};
};
}
#endif