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.
48 lines
1.1 KiB
C++
48 lines
1.1 KiB
C++
#pragma once
|
|
#include "MLVector.h"
|
|
#include "MLPoint.h"
|
|
|
|
class MLPlNode;
|
|
class MLMICROSTRUCTURE_EXPORT MLPlNode : public MLVector
|
|
{
|
|
public:
|
|
MLPlNode(void);
|
|
MLPlNode(double x, double y);
|
|
MLPlNode(double x, double y, double z);
|
|
MLPlNode(const MLPlNode& point);
|
|
MLPlNode(const MLPoint& point);
|
|
explicit MLPlNode(const QPointF& point);
|
|
~MLPlNode(void);
|
|
|
|
// 元素数
|
|
__declspec(property(get=getL, put = setL)) double l;
|
|
__declspec(property(get = getA, put = setA)) double a;
|
|
|
|
public:
|
|
// 当前节点长度
|
|
double getL() const;
|
|
double& getL();
|
|
void setL(double l);
|
|
|
|
// 当前节点角度
|
|
double getA() const;
|
|
double& getA();
|
|
void setA(double a);
|
|
|
|
|
|
// 转点坐标
|
|
MLPoint toPoint() const;
|
|
QPoint toQPoint() const;
|
|
QPointF toQPointF() const;
|
|
|
|
MLPlNode &operator =(const MLPlNode &);
|
|
|
|
friend MLMICROSTRUCTURE_EXPORT bool operator==(const MLPlNode &p1, const MLPlNode &p2);
|
|
friend MLMICROSTRUCTURE_EXPORT bool operator>(const MLPlNode &p1, const MLPlNode &p2);
|
|
friend MLMICROSTRUCTURE_EXPORT double operator^(const MLPlNode &p1, const MLPlNode &p2);
|
|
|
|
private:
|
|
double m_l; // 长度
|
|
double m_a; // 角度
|
|
};
|