This class is used to switch between active selecting volumes depending on selection type chosen by the user. The sample of correct selection volume initialization procedure:
More...
|
| SelectMgr_SelectingVolumeManager () |
| Creates instances of all available selecting volume types. More...
|
|
virtual | ~SelectMgr_SelectingVolumeManager () |
|
void | InitPointSelectingVolume (const gp_Pnt2d &thePoint) |
| Creates, initializes and activates rectangular selecting frustum for point selection. More...
|
|
void | InitBoxSelectingVolume (const gp_Pnt2d &theMinPt, const gp_Pnt2d &theMaxPt) |
| Creates, initializes and activates rectangular selecting frustum for box selection. More...
|
|
void | InitPolylineSelectingVolume (const TColgp_Array1OfPnt2d &thePoints) |
| Creates, initializes and activates set of triangular selecting frustums for polyline selection. More...
|
|
void | InitAxisSelectingVolume (const gp_Ax1 &theAxis) |
| Creates and activates axis selector for point selection. More...
|
|
void | InitSelectingVolume (const Handle< SelectMgr_BaseIntersector > &theVolume) |
| Sets as active the custom selecting volume. More...
|
|
void | BuildSelectingVolume () |
| Builds previously initialized selecting volume. More...
|
|
const Handle< SelectMgr_BaseIntersector > & | ActiveVolume () const |
| Returns active selecting volume that was built during last run of OCCT selection mechanism. More...
|
|
virtual Standard_Integer | GetActiveSelectionType () const override |
| Return selection type. More...
|
|
virtual SelectMgr_SelectingVolumeManager | ScaleAndTransform (const Standard_Integer theScaleFactor, const gp_GTrsf &theTrsf, const Handle< SelectMgr_FrustumBuilder > &theBuilder) const |
| IMPORTANT: Scaling makes sense only for frustum built on a single point! Note that this method does not perform any checks on type of the frustum. More...
|
|
const Handle< Graphic3d_Camera > & | Camera () const |
| Returns current camera definition. More...
|
|
void | SetCamera (const Handle< Graphic3d_Camera > theCamera) |
| Updates camera projection and orientation matrices in all selecting volumes Note: this method should be called after selection volume building else exception will be thrown. More...
|
|
void | SetViewport (const Standard_Real theX, const Standard_Real theY, const Standard_Real theWidth, const Standard_Real theHeight) |
| Updates viewport in all selecting volumes Note: this method should be called after selection volume building else exception will be thrown. More...
|
|
void | SetPixelTolerance (const Standard_Integer theTolerance) |
| Updates pixel tolerance in all selecting volumes Note: this method should be called after selection volume building else exception will be thrown. More...
|
|
void | WindowSize (Standard_Integer &theWidth, Standard_Integer &theHeight) const |
| Returns window size. More...
|
|
void | SetWindowSize (const Standard_Integer theWidth, const Standard_Integer theHeight) |
| Updates window size in all selecting volumes Note: this method should be called after selection volume building else exception will be thrown. More...
|
|
virtual Standard_Boolean | OverlapsBox (const SelectMgr_Vec3 &theBoxMin, const SelectMgr_Vec3 &theBoxMax, SelectBasics_PickResult &thePickResult) const override |
| SAT intersection test between defined volume and given axis-aligned box. More...
|
|
virtual Standard_Boolean | OverlapsBox (const SelectMgr_Vec3 &theBoxMin, const SelectMgr_Vec3 &theBoxMax, Standard_Boolean *theInside=NULL) const override |
| Returns true if selecting volume is overlapped by axis-aligned bounding box with minimum corner at point theMinPt and maximum at point theMaxPt. More...
|
|
virtual Standard_Boolean | OverlapsPoint (const gp_Pnt &thePnt, SelectBasics_PickResult &thePickResult) const override |
| Intersection test between defined volume and given point. More...
|
|
virtual Standard_Boolean | OverlapsPoint (const gp_Pnt &thePnt) const override |
| Intersection test between defined volume and given point. More...
|
|
virtual Standard_Boolean | OverlapsPolygon (const TColgp_Array1OfPnt &theArrayOfPts, Standard_Integer theSensType, SelectBasics_PickResult &thePickResult) const override |
| SAT intersection test between defined volume and given ordered set of points, representing line segments. The test may be considered of interior part or boundary line defined by segments depending on given sensitivity type. More...
|
|
virtual Standard_Boolean | OverlapsSegment (const gp_Pnt &thePnt1, const gp_Pnt &thePnt2, SelectBasics_PickResult &thePickResult) const override |
| Checks if line segment overlaps selecting frustum. More...
|
|
virtual Standard_Boolean | OverlapsTriangle (const gp_Pnt &thePnt1, const gp_Pnt &thePnt2, const gp_Pnt &thePnt3, Standard_Integer theSensType, SelectBasics_PickResult &thePickResult) const override |
| SAT intersection test between defined volume and given triangle. The test may be considered of interior part or boundary line defined by triangle vertices depending on given sensitivity type. More...
|
|
virtual Standard_Boolean | OverlapsSphere (const gp_Pnt &theCenter, const Standard_Real theRadius, SelectBasics_PickResult &thePickResult) const override |
| Intersection test between defined volume and given sphere. More...
|
|
virtual Standard_Boolean | OverlapsSphere (const gp_Pnt &theCenter, const Standard_Real theRadius, Standard_Boolean *theInside=NULL) const override |
| Intersection test between defined volume and given sphere. More...
|
|
virtual Standard_Boolean | OverlapsCylinder (const Standard_Real theBottomRad, const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf &theTrsf, SelectBasics_PickResult &thePickResult) const override |
| Returns true if selecting volume is overlapped by cylinder (or cone) with radiuses theBottomRad and theTopRad, height theHeight and transformation to apply theTrsf. More...
|
|
virtual Standard_Boolean | OverlapsCylinder (const Standard_Real theBottomRad, const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf &theTrsf, Standard_Boolean *theInside=NULL) const override |
| Returns true if selecting volume is overlapped by cylinder (or cone) with radiuses theBottomRad and theTopRad, height theHeight and transformation to apply theTrsf. More...
|
|
virtual Standard_Real | DistToGeometryCenter (const gp_Pnt &theCOG) const override |
| Measures distance between 3d projection of user-picked screen point and given point theCOG. More...
|
|
virtual gp_Pnt | DetectedPoint (const Standard_Real theDepth) const override |
| Calculates the point on a view ray that was detected during the run of selection algo by given depth. Throws exception if active selection type is not Point. More...
|
|
virtual void | AllowOverlapDetection (const Standard_Boolean theIsToAllow) |
| If theIsToAllow is false, only fully included sensitives will be detected, otherwise the algorithm will mark both included and overlapped entities as matched. More...
|
|
virtual Standard_Boolean | IsOverlapAllowed () const override |
| Returns flag indicating if partial overlapping of entities is allowed or should be rejected. More...
|
|
const Handle< Graphic3d_SequenceOfHClipPlane > & | ViewClipping () const |
| Return view clipping planes. More...
|
|
const Handle< Graphic3d_SequenceOfHClipPlane > & | ObjectClipping () const |
| Return object clipping planes. More...
|
|
void | SetViewClipping (const Handle< Graphic3d_SequenceOfHClipPlane > &theViewPlanes, const Handle< Graphic3d_SequenceOfHClipPlane > &theObjPlanes, const SelectMgr_SelectingVolumeManager *theWorldSelMgr) |
| Valid for point selection only! Computes depth range for clipping planes. More...
|
|
void | SetViewClipping (const SelectMgr_SelectingVolumeManager &theOther) |
| Copy clipping planes from another volume manager. More...
|
|
const SelectMgr_ViewClipRange & | ViewClipRanges () const |
| Return clipping range. More...
|
|
void | SetViewClipRanges (const SelectMgr_ViewClipRange &theRange) |
| Set clipping range. More...
|
|
const gp_Pnt * | GetVertices () const |
| A set of helper functions that return rectangular selecting frustum data. More...
|
|
virtual gp_Pnt | GetNearPickedPnt () const override |
| Valid only for point and rectangular selection. Returns projection of 2d mouse picked point or projection of center of 2d rectangle (for point and rectangular selection correspondingly) onto near view frustum plane. More...
|
|
virtual gp_Pnt | GetFarPickedPnt () const override |
| Valid only for point and rectangular selection. Returns projection of 2d mouse picked point or projection of center of 2d rectangle (for point and rectangular selection correspondingly) onto far view frustum plane. More...
|
|
virtual gp_Dir | GetViewRayDirection () const override |
| Valid only for point and rectangular selection. Returns view ray direction. More...
|
|
virtual Standard_Boolean | IsScalableActiveVolume () const override |
| Checks if it is possible to scale current active selecting volume. More...
|
|
virtual gp_Pnt2d | GetMousePosition () const override |
| Returns mouse coordinates for Point selection mode. More...
|
|
virtual void | GetPlanes (NCollection_Vector< SelectMgr_Vec4 > &thePlaneEquations) const override |
| Stores plane equation coefficients (in the following form: Ax + By + Cz + D = 0) to the given vector. More...
|
|
virtual void | DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const override |
| Dumps the content of me into the stream. More...
|
|
void | BuildSelectingVolume (const gp_Pnt2d &thePoint) |
|
void | BuildSelectingVolume (const gp_Pnt2d &theMinPt, const gp_Pnt2d &theMaxPt) |
|
void | BuildSelectingVolume (const TColgp_Array1OfPnt2d &thePoints) |
|
| SelectBasics_SelectingVolumeManager () |
| Empty constructor. More...
|
|
virtual | ~SelectBasics_SelectingVolumeManager () |
| Destructor. More...
|
|
virtual Standard_Boolean | OverlapsBox (const NCollection_Vec3< Standard_Real > &theBoxMin, const NCollection_Vec3< Standard_Real > &theBoxMax, SelectBasics_PickResult &thePickResult) const =0 |
| Returns true if selecting volume is overlapped by box theBox. More...
|
|
virtual Standard_Boolean | OverlapsBox (const NCollection_Vec3< Standard_Real > &theBoxMin, const NCollection_Vec3< Standard_Real > &theBoxMax, Standard_Boolean *theInside=NULL) const =0 |
| Returns true if selecting volume is overlapped by axis-aligned bounding box with minimum corner at point theMinPt and maximum at point theMaxPt. More...
|
|
virtual void | GetPlanes (NCollection_Vector< NCollection_Vec4< Standard_Real > > &thePlaneEquations) const =0 |
| Stores plane equation coefficients (in the following form: Ax + By + Cz + D = 0) to the given vector. More...
|
|
Standard_Boolean | Overlaps (const NCollection_Vec3< Standard_Real > &theBoxMin, const NCollection_Vec3< Standard_Real > &theBoxMax, SelectBasics_PickResult &thePickResult) const |
|
Standard_Boolean | Overlaps (const NCollection_Vec3< Standard_Real > &theBoxMin, const NCollection_Vec3< Standard_Real > &theBoxMax, Standard_Boolean *theInside=NULL) const |
|
Standard_Boolean | Overlaps (const gp_Pnt &thePnt, SelectBasics_PickResult &thePickResult) const |
|
Standard_Boolean | Overlaps (const gp_Pnt &thePnt) const |
|
Standard_Boolean | Overlaps (const Handle< TColgp_HArray1OfPnt > &theArrayOfPts, Standard_Integer theSensType, SelectBasics_PickResult &thePickResult) const |
|
Standard_Boolean | Overlaps (const TColgp_Array1OfPnt &theArrayOfPts, Standard_Integer theSensType, SelectBasics_PickResult &thePickResult) const |
|
Standard_Boolean | Overlaps (const gp_Pnt &thePnt1, const gp_Pnt &thePnt2, SelectBasics_PickResult &thePickResult) const |
|
Standard_Boolean | Overlaps (const gp_Pnt &thePnt1, const gp_Pnt &thePnt2, const gp_Pnt &thePnt3, Standard_Integer theSensType, SelectBasics_PickResult &thePickResult) const |
|
This class is used to switch between active selecting volumes depending on selection type chosen by the user. The sample of correct selection volume initialization procedure:
aMgr.InitPointSelectingVolume (aMousePos);
aMgr.SetPixelTolerance (aTolerance);
aMgr.SetCamera (aCamera);
aMgr.SetWindowSize (aWidth, aHeight);
aMgr.BuildSelectingVolume();