Files
envi-code/SourceCode/Code2026/tg_shs/inc/geo/TGGePlane.h
T

86 lines
2.2 KiB
C++
Raw Normal View History

2026-10-04 00:04:20 +08:00
//-----------------------------------------------------------------------------+
2026-09-28 15:28:50 +08:00
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
2026-10-04 00:04:20 +08:00
// = FileName : TGGePlane类
2026-09-28 15:28:50 +08:00
// = Version : ver2.0
// = Author : wlw
// = CreateDate : 2002-09-09
2026-10-04 00:04:20 +08:00
// = Description: TGGePlane类声明
2026-09-28 15:28:50 +08:00
// = Maintainers:
//
//-----------------------------------------------------------------------------+
#ifndef _TGGEPLANE_H_
#define _TGGEPLANE_H_
#ifndef _TGGEENTITY_H_
#include "TGGeEntity.h"
#endif
#ifndef _TADSGEPOINT3D_H_
#include "TADSGePoint3d.h"
#endif
#ifndef _TGGELINE_H_
#include "TGGeLine.h"
#endif
class GEOAPI TGGePlane : public TGGeEntity
{
public:
TGGePlane();
TGGePlane(double aa, double bb, double cc, double dd);
TGGePlane(const TADSGePoint3d &ptOrg, const TVector3D &vtNorm);
TGGePlane(const TGGePlane &src);
virtual ~TGGePlane();
virtual bool IsKindOf(TEntityId entType) const;
virtual TEntityId Type() const;
virtual void CopyFrom(const TGGeEntity* 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 TADSGePoint3d &pt1, const TADSGePoint3d &pt2, const TADSGePoint3d &pt3);
2026-10-04 00:04:20 +08:00
// 平面与线求交,考虑了线是否为无限长
2026-09-28 15:28:50 +08:00
virtual BOOL Intersect(const TGGeLine &ln, TADSGePoint3d &ptInt) const;
2026-10-04 00:04:20 +08:00
// 平面与平面求交,求交线(无限长)
2026-09-28 15:28:50 +08:00
virtual BOOL Intersect(const TGGePlane &plan, TGGeLine &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);
TGGePlane & operator = (const TGGePlane &src);
BOOL operator !() const;
public:
double m_dParaA, m_dParaB, m_dParaC, m_dParaD;
};
extern GEOAPI BOOL GetShadowMatrix(const TGGePlane&plane, const TVector3D &vtLight, AcGeMatrix3d &mShadowMatrix);
#endif