File indexing completed on 2025-01-18 10:04:54
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _SelectMgr_TriangularFrustum_HeaderFile
0017 #define _SelectMgr_TriangularFrustum_HeaderFile
0018
0019 #include <SelectMgr_Frustum.hxx>
0020
0021
0022
0023
0024
0025 class SelectMgr_TriangularFrustum : public SelectMgr_Frustum<3>
0026 {
0027 public:
0028
0029
0030 struct SelectionTriangle
0031 {
0032 gp_Pnt2d Points[3];
0033 };
0034
0035 public:
0036
0037
0038 Standard_EXPORT virtual ~SelectMgr_TriangularFrustum();
0039
0040
0041 Standard_EXPORT void Init (const gp_Pnt2d& theP1,
0042 const gp_Pnt2d& theP2,
0043 const gp_Pnt2d& theP3);
0044
0045
0046
0047
0048 Standard_EXPORT virtual void Build() Standard_OVERRIDE;
0049
0050
0051 virtual Standard_Boolean IsScalable() const Standard_OVERRIDE { return false; }
0052
0053
0054 Standard_EXPORT virtual Handle(SelectMgr_BaseIntersector) ScaleAndTransform (const Standard_Integer theScale,
0055 const gp_GTrsf& theTrsf,
0056 const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE;
0057
0058 public:
0059
0060
0061 Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theMinPnt,
0062 const SelectMgr_Vec3& theMaxPnt,
0063 const SelectMgr_ViewClipRange& theClipRange,
0064 SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE;
0065
0066
0067
0068 Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theMinPt,
0069 const SelectMgr_Vec3& theMaxPt,
0070 Standard_Boolean* theInside) const Standard_OVERRIDE;
0071
0072
0073 Standard_EXPORT virtual Standard_Boolean OverlapsPoint (const gp_Pnt& thePnt,
0074 const SelectMgr_ViewClipRange& theClipRange,
0075 SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE;
0076
0077
0078 virtual Standard_Boolean OverlapsPoint (const gp_Pnt& ) const Standard_OVERRIDE
0079 {
0080 return Standard_False;
0081 }
0082
0083
0084
0085
0086 Standard_EXPORT virtual Standard_Boolean OverlapsPolygon (const TColgp_Array1OfPnt& theArrayOfPnts,
0087 Select3D_TypeOfSensitivity theSensType,
0088 const SelectMgr_ViewClipRange& theClipRange,
0089 SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE;
0090
0091
0092 Standard_EXPORT virtual Standard_Boolean OverlapsSegment (const gp_Pnt& thePnt1,
0093 const gp_Pnt& thePnt2,
0094 const SelectMgr_ViewClipRange& theClipRange,
0095 SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE;
0096
0097
0098
0099
0100 Standard_EXPORT virtual Standard_Boolean OverlapsTriangle (const gp_Pnt& thePnt1,
0101 const gp_Pnt& thePnt2,
0102 const gp_Pnt& thePnt3,
0103 Select3D_TypeOfSensitivity theSensType,
0104 const SelectMgr_ViewClipRange& theClipRange,
0105 SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE;
0106
0107
0108
0109 Standard_EXPORT virtual Standard_Boolean OverlapsSphere (const gp_Pnt& theCenter,
0110 const Standard_Real theRadius,
0111 Standard_Boolean* theInside = NULL) const Standard_OVERRIDE;
0112
0113
0114
0115 Standard_EXPORT virtual Standard_Boolean OverlapsSphere (const gp_Pnt& theCenter,
0116 const Standard_Real theRadius,
0117 const SelectMgr_ViewClipRange& theClipRange,
0118 SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE;
0119
0120
0121
0122 Standard_EXPORT virtual Standard_Boolean OverlapsCylinder (const Standard_Real theBottomRad,
0123 const Standard_Real theTopRad,
0124 const Standard_Real theHeight,
0125 const gp_Trsf& theTrsf,
0126 const Standard_Boolean theIsHollow,
0127 const SelectMgr_ViewClipRange& theClipRange,
0128 SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE;
0129
0130
0131
0132 Standard_EXPORT virtual Standard_Boolean OverlapsCylinder (const Standard_Real theBottomRad,
0133 const Standard_Real theTopRad,
0134 const Standard_Real theHeight,
0135 const gp_Trsf& theTrsf,
0136 const Standard_Boolean theIsHollow,
0137 Standard_Boolean* theInside = NULL) const Standard_OVERRIDE;
0138
0139
0140
0141
0142
0143 Standard_EXPORT virtual Standard_Boolean OverlapsCircle (const Standard_Real theRadius,
0144 const gp_Trsf& theTrsf,
0145 const Standard_Boolean theIsFilled,
0146 const SelectMgr_ViewClipRange& theClipRange,
0147 SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE;
0148
0149
0150
0151
0152
0153 Standard_EXPORT virtual Standard_Boolean OverlapsCircle (const Standard_Real theRadius,
0154 const gp_Trsf& theTrsf,
0155 const Standard_Boolean theIsFilled,
0156 Standard_Boolean* theInside = NULL) const Standard_OVERRIDE;
0157
0158 public:
0159
0160
0161 Standard_EXPORT void Clear();
0162
0163
0164
0165 Standard_EXPORT virtual void GetPlanes (NCollection_Vector<SelectMgr_Vec4>& thePlaneEquations) const Standard_OVERRIDE;
0166
0167
0168 Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
0169
0170 protected:
0171
0172
0173 Standard_EXPORT SelectMgr_TriangularFrustum();
0174
0175 private:
0176
0177 void cacheVertexProjections (SelectMgr_TriangularFrustum* theFrustum) const;
0178
0179 protected:
0180
0181 SelectionTriangle mySelTriangle;
0182
0183 public:
0184
0185 DEFINE_STANDARD_RTTIEXT(SelectMgr_TriangularFrustum, SelectMgr_Frustum<3>)
0186 friend class SelectMgr_TriangularFrustumSet;
0187 };
0188
0189 #endif