File indexing completed on 2026-09-16 09:18:26
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
0026 class SelectMgr_TriangularFrustum : public SelectMgr_Frustum<3>
0027 {
0028 public:
0029
0030 struct SelectionTriangle
0031 {
0032 gp_Pnt2d Points[3];
0033 };
0034
0035 public:
0036
0037 Standard_EXPORT ~SelectMgr_TriangularFrustum() override;
0038
0039
0040 Standard_EXPORT void Init(const gp_Pnt2d& theP1, const gp_Pnt2d& theP2, const gp_Pnt2d& theP3);
0041
0042
0043
0044
0045 Standard_EXPORT void Build() override;
0046
0047
0048 bool IsScalable() const override { return false; }
0049
0050
0051 Standard_EXPORT occ::handle<SelectMgr_BaseIntersector> ScaleAndTransform(
0052 const int theScale,
0053 const gp_GTrsf& theTrsf,
0054 const occ::handle<SelectMgr_FrustumBuilder>& theBuilder) const override;
0055
0056
0057
0058
0059
0060
0061
0062 Standard_EXPORT occ::handle<SelectMgr_BaseIntersector> CopyWithBuilder(
0063 const occ::handle<SelectMgr_FrustumBuilder>& theBuilder) const override;
0064
0065 public:
0066
0067 Standard_EXPORT bool OverlapsBox(const NCollection_Vec3<double>& theMinPnt,
0068 const NCollection_Vec3<double>& theMaxPnt,
0069 const SelectMgr_ViewClipRange& theClipRange,
0070 SelectBasics_PickResult& thePickResult) const override;
0071
0072
0073
0074 Standard_EXPORT bool OverlapsBox(const NCollection_Vec3<double>& theMinPt,
0075 const NCollection_Vec3<double>& theMaxPt,
0076 bool* theInside) const override;
0077
0078
0079 Standard_EXPORT bool OverlapsPoint(const gp_Pnt& thePnt,
0080 const SelectMgr_ViewClipRange& theClipRange,
0081 SelectBasics_PickResult& thePickResult) const override;
0082
0083
0084 bool OverlapsPoint(const gp_Pnt&) const override { return false; }
0085
0086
0087
0088
0089 Standard_EXPORT bool OverlapsPolygon(const NCollection_Array1<gp_Pnt>& theArrayOfPnts,
0090 Select3D_TypeOfSensitivity theSensType,
0091 const SelectMgr_ViewClipRange& theClipRange,
0092 SelectBasics_PickResult& thePickResult) const override;
0093
0094
0095 Standard_EXPORT bool OverlapsSegment(const gp_Pnt& thePnt1,
0096 const gp_Pnt& thePnt2,
0097 const SelectMgr_ViewClipRange& theClipRange,
0098 SelectBasics_PickResult& thePickResult) const override;
0099
0100
0101
0102
0103 Standard_EXPORT bool OverlapsTriangle(const gp_Pnt& thePnt1,
0104 const gp_Pnt& thePnt2,
0105 const gp_Pnt& thePnt3,
0106 Select3D_TypeOfSensitivity theSensType,
0107 const SelectMgr_ViewClipRange& theClipRange,
0108 SelectBasics_PickResult& thePickResult) const override;
0109
0110
0111
0112 Standard_EXPORT bool OverlapsSphere(const gp_Pnt& theCenter,
0113 const double theRadius,
0114 bool* theInside = nullptr) const override;
0115
0116
0117
0118 Standard_EXPORT bool OverlapsSphere(const gp_Pnt& theCenter,
0119 const double theRadius,
0120 const SelectMgr_ViewClipRange& theClipRange,
0121 SelectBasics_PickResult& thePickResult) const override;
0122
0123
0124
0125 Standard_EXPORT bool OverlapsCylinder(const double theBottomRad,
0126 const double theTopRad,
0127 const double theHeight,
0128 const gp_Trsf& theTrsf,
0129 const bool theIsHollow,
0130 const SelectMgr_ViewClipRange& theClipRange,
0131 SelectBasics_PickResult& thePickResult) const override;
0132
0133
0134
0135 Standard_EXPORT bool OverlapsCylinder(const double theBottomRad,
0136 const double theTopRad,
0137 const double theHeight,
0138 const gp_Trsf& theTrsf,
0139 const bool theIsHollow,
0140 bool* theInside = nullptr) const override;
0141
0142
0143
0144
0145
0146 Standard_EXPORT bool OverlapsCircle(const double theRadius,
0147 const gp_Trsf& theTrsf,
0148 const bool theIsFilled,
0149 const SelectMgr_ViewClipRange& theClipRange,
0150 SelectBasics_PickResult& thePickResult) const override;
0151
0152
0153
0154
0155
0156 Standard_EXPORT bool OverlapsCircle(const double theRadius,
0157 const gp_Trsf& theTrsf,
0158 const bool theIsFilled,
0159 bool* theInside = nullptr) const override;
0160
0161 public:
0162
0163 Standard_EXPORT void Clear();
0164
0165
0166
0167 Standard_EXPORT void GetPlanes(
0168 NCollection_DynamicArray<NCollection_Vec4<double>>& thePlaneEquations) const override;
0169
0170
0171 Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override;
0172
0173 protected:
0174
0175 Standard_EXPORT SelectMgr_TriangularFrustum();
0176
0177 private:
0178 void cacheVertexProjections(SelectMgr_TriangularFrustum* theFrustum) const;
0179
0180 protected:
0181
0182 SelectionTriangle mySelTriangle;
0183
0184
0185 public:
0186 DEFINE_STANDARD_RTTIEXT(SelectMgr_TriangularFrustum, SelectMgr_Frustum<3>)
0187 friend class SelectMgr_TriangularFrustumSet;
0188 };
0189
0190 #endif