Files
envi-code/SourceCode/Code2026/Dimension/GePlane.h
T
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

65 lines
1.6 KiB
C++

#pragma once
#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;
// 3点确定一平面方程
virtual BOOL SetFrom3p(const ADSGePoint3d &pt1, const ADSGePoint3d &pt2, const ADSGePoint3d &pt3);
// 平面与线求交,考虑了线是否为无限长
virtual BOOL Intersect(const GeLine &ln, ADSGePoint3d &ptInt) const;
// 平面与平面求交,求交线(无限长)
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);