File indexing completed on 2025-01-18 10:04:53
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _SelectMgr_AxisIntersector_HeaderFile
0015 #define _SelectMgr_AxisIntersector_HeaderFile
0016
0017 #include <SelectMgr_BaseIntersector.hxx>
0018
0019 #include <gp_Ax1.hxx>
0020
0021
0022
0023 class SelectMgr_AxisIntersector : public SelectMgr_BaseIntersector
0024 {
0025 public:
0026
0027
0028 Standard_EXPORT SelectMgr_AxisIntersector();
0029
0030
0031 Standard_EXPORT virtual ~SelectMgr_AxisIntersector();
0032
0033
0034 Standard_EXPORT void Init (const gp_Ax1& theAxis);
0035
0036
0037
0038 Standard_EXPORT virtual void Build() Standard_OVERRIDE;
0039
0040
0041
0042 Standard_EXPORT virtual void SetCamera (const Handle(Graphic3d_Camera)& theCamera) Standard_OVERRIDE;
0043
0044
0045 virtual Standard_Boolean IsScalable() const Standard_OVERRIDE { return false; }
0046
0047
0048
0049
0050
0051 Standard_EXPORT virtual Handle(SelectMgr_BaseIntersector) ScaleAndTransform (const Standard_Integer theScaleFactor,
0052 const gp_GTrsf& theTrsf,
0053 const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE;
0054
0055 public:
0056
0057
0058 Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theBoxMin,
0059 const SelectMgr_Vec3& theBoxMax,
0060 const SelectMgr_ViewClipRange& theClipRange,
0061 SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE;
0062
0063
0064
0065 Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theBoxMin,
0066 const SelectMgr_Vec3& theBoxMax,
0067 Standard_Boolean* theInside) const Standard_OVERRIDE;
0068
0069
0070 Standard_EXPORT virtual Standard_Boolean OverlapsPoint (const gp_Pnt& thePnt,
0071 const SelectMgr_ViewClipRange& theClipRange,
0072 SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE;
0073
0074
0075 Standard_EXPORT virtual Standard_Boolean OverlapsPoint (const gp_Pnt& thePnt) const Standard_OVERRIDE;
0076
0077
0078
0079
0080 Standard_EXPORT virtual Standard_Boolean OverlapsPolygon (const TColgp_Array1OfPnt& theArrayOfPnts,
0081 Select3D_TypeOfSensitivity theSensType,
0082 const SelectMgr_ViewClipRange& theClipRange,
0083 SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE;
0084
0085
0086 Standard_EXPORT virtual Standard_Boolean OverlapsSegment (const gp_Pnt& thePnt1,
0087 const gp_Pnt& thePnt2,
0088 const SelectMgr_ViewClipRange& theClipRange,
0089 SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE;
0090
0091
0092
0093
0094 Standard_EXPORT virtual Standard_Boolean OverlapsTriangle (const gp_Pnt& thePnt1,
0095 const gp_Pnt& thePnt2,
0096 const gp_Pnt& thePnt3,
0097 Select3D_TypeOfSensitivity theSensType,
0098 const SelectMgr_ViewClipRange& theClipRange,
0099 SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE;
0100
0101
0102
0103 Standard_EXPORT virtual Standard_Boolean OverlapsSphere (const gp_Pnt& theCenter,
0104 const Standard_Real theRadius,
0105 Standard_Boolean* theInside = NULL) const Standard_OVERRIDE;
0106
0107
0108
0109 Standard_EXPORT virtual Standard_Boolean OverlapsSphere (const gp_Pnt& theCenter,
0110 const Standard_Real theRadius,
0111 const SelectMgr_ViewClipRange& theClipRange,
0112 SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE;
0113
0114
0115
0116 Standard_EXPORT virtual Standard_Boolean OverlapsCylinder (const Standard_Real theBottomRad,
0117 const Standard_Real theTopRad,
0118 const Standard_Real theHeight,
0119 const gp_Trsf& theTrsf,
0120 const Standard_Boolean theIsHollow,
0121 const SelectMgr_ViewClipRange& theClipRange,
0122 SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE;
0123
0124
0125
0126 Standard_EXPORT virtual Standard_Boolean OverlapsCylinder (const Standard_Real theBottomRad,
0127 const Standard_Real theTopRad,
0128 const Standard_Real theHeight,
0129 const gp_Trsf& theTrsf,
0130 const Standard_Boolean theIsHollow,
0131 Standard_Boolean* theInside = NULL) const Standard_OVERRIDE;
0132
0133
0134
0135
0136
0137 Standard_EXPORT virtual Standard_Boolean OverlapsCircle (const Standard_Real theRadius,
0138 const gp_Trsf& theTrsf,
0139 const Standard_Boolean theIsFilled,
0140 const SelectMgr_ViewClipRange& theClipRange,
0141 SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE;
0142
0143
0144
0145
0146
0147 Standard_EXPORT virtual Standard_Boolean OverlapsCircle (const Standard_Real theRadius,
0148 const gp_Trsf& theTrsf,
0149 const Standard_Boolean theIsFilled,
0150 Standard_Boolean* theInside = NULL) const Standard_OVERRIDE;
0151
0152 public:
0153
0154
0155 Standard_EXPORT virtual Standard_Real DistToGeometryCenter (const gp_Pnt& theCOG) const Standard_OVERRIDE;
0156
0157
0158 Standard_EXPORT virtual gp_Pnt DetectedPoint (const Standard_Real theDepth) const Standard_OVERRIDE;
0159
0160
0161 Standard_EXPORT virtual const gp_Pnt& GetNearPnt() const Standard_OVERRIDE;
0162
0163
0164 Standard_EXPORT virtual const gp_Pnt& GetFarPnt() const Standard_OVERRIDE;
0165
0166
0167 Standard_EXPORT virtual const gp_Dir& GetViewRayDirection() const Standard_OVERRIDE;
0168
0169
0170 Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
0171
0172 protected:
0173
0174
0175
0176
0177 Standard_EXPORT Standard_Boolean hasIntersection (const SelectMgr_Vec3& theBoxMin,
0178 const SelectMgr_Vec3& theBoxMax,
0179 Standard_Real& theTimeEnter,
0180 Standard_Real& theTimeLeave) const;
0181
0182
0183
0184 Standard_EXPORT Standard_Boolean hasIntersection (const gp_Pnt& thePnt,
0185 Standard_Real& theDepth) const;
0186
0187
0188
0189 Standard_EXPORT Standard_Boolean raySegmentDistance (const gp_Pnt& theSegPnt1,
0190 const gp_Pnt& theSegPnt2,
0191 SelectBasics_PickResult& thePickResult) const;
0192
0193
0194
0195 Standard_EXPORT Standard_Boolean rayPlaneIntersection (const gp_Vec& thePlane,
0196 const gp_Pnt& thePntOnPlane,
0197 SelectBasics_PickResult& thePickResult) const;
0198 private:
0199
0200 gp_Ax1 myAxis;
0201
0202 };
0203
0204 #endif