86 lines
2.2 KiB
C++
86 lines
2.2 KiB
C++
//-----------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TGGePlane类
|
|
// = Version : ver2.0
|
|
// = Author : wlw
|
|
// = CreateDate : 2002-09-09
|
|
// = Description: TGGePlane类声明
|
|
// = 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;
|
|
|
|
// 3点确定一平面方程
|
|
virtual BOOL SetFrom3p(const TADSGePoint3d &pt1, const TADSGePoint3d &pt2, const TADSGePoint3d &pt3);
|
|
|
|
// 平面与线求交,考虑了线是否为无限长
|
|
virtual BOOL Intersect(const TGGeLine &ln, TADSGePoint3d &ptInt) const;
|
|
|
|
// 平面与平面求交,求交线(无限长)
|
|
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 |