Files
envi-code/SourceCode/Code2026/Dimension/GePlane.h
T

64 lines
1.6 KiB
C++
Raw Normal View History

2026-10-04 00:04:20 +08:00
#pragma once
2026-09-28 15:28:50 +08:00
#include "GeEntity.h"
#include "ADSGePoint3d.h"
#include "GeLine.h"
class GePlane : public GeEntity
{
public:
GePlane();
GePlane(double aa, double bb, double cc, double dd);
GePlane(const ADSGePoint3d &ptOrg, const TVector3D &vtNorm);
GePlane(const GePlane &src);
virtual ~GePlane();
virtual bool IsKindOf(TEntityId entType) const;
virtual TEntityId Type() const;
virtual void CopyFrom(const GeEntity* pImpSrc);
virtual BOOL IsValid() const;
2026-10-04 00:04:20 +08:00
// 3点确定一平面方程
2026-09-28 15:28:50 +08:00
virtual BOOL SetFrom3p(const ADSGePoint3d &pt1, const ADSGePoint3d &pt2, const ADSGePoint3d &pt3);
2026-10-04 00:04:20 +08:00
// 平面与线求交,考虑了线是否为无限长
2026-09-28 15:28:50 +08:00
virtual BOOL Intersect(const GeLine &ln, ADSGePoint3d &ptInt) const;
2026-10-04 00:04:20 +08:00
// 平面与平面求交,求交线(无限长)
2026-09-28 15:28:50 +08:00
virtual BOOL Intersect(const GePlane &plan, GeLine &ln) const;
virtual TVector3D GetNormal() const;
virtual double GetAngle(TVector3D vtLight)const;
virtual bool IsReflect(TVector3D vtLight)const;
virtual bool Reflect(TVector3D vtLight,TVector3D& vtRes)const;
virtual double GetParaA()const;
virtual void SetParaA(const double dVal);
virtual double GetParaB()const;
virtual void SetParaB(const double dVal);
virtual double GetParaC()const;
virtual void SetParaC(const double dVal);
virtual double GetParaD()const;
virtual void SetParaD(const double dVal);
GePlane & operator = (const GePlane &src);
BOOL operator !() const;
public:
double m_dParaA, m_dParaB, m_dParaC, m_dParaD;
};
extern BOOL GetShadowMatrix(const GePlane&plane, const TVector3D &vtLight, AcGeMatrix3d &mShadowMatrix);