Open CASCADE Technology  6.9.0
Public Member Functions

SelectMgr_SelectingVolumeManager Class Reference

This class is used to switch between active selecting volumes depending on selection type chosen by the user. More...

#include <SelectMgr_SelectingVolumeManager.hxx>

Inheritance diagram for SelectMgr_SelectingVolumeManager:
Inheritance graph
[legend]

Public Member Functions

 SelectMgr_SelectingVolumeManager (Standard_Boolean theToAllocateFrustums=Standard_True)
 Creates instances of all available selecting volume types. More...
 
virtual ~SelectMgr_SelectingVolumeManager ()
 
virtual
SelectMgr_SelectingVolumeManager 
Transform (const gp_Trsf &theTrsf)
 Returns a copy of active frustum transformed according to the matrix given. More...
 
virtual
SelectMgr_SelectingVolumeManager 
Scale (const Standard_Real theScaleFactor)
 IMPORTANT: Makes sense only for point selection! Returns a copy of the frustum resized according to the scale factor given. More...
 
virtual Standard_Integer GetActiveSelectionType () const Standard_OVERRIDE
 
void SetActiveSelectionType (const SelectionType &theType)
 
void SetCamera (const Handle< Graphic3d_Camera > theCamera)
 Updates camera projection and orientation matrices in all selecting volumes. More...
 
void SetCamera (const Graphic3d_Mat4d &theProjection, const Graphic3d_Mat4d &theOrientation, const Standard_Boolean theIsOrthographic)
 Updates camera projection and orientation matrices in all selecting volumes. 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. More...
 
void SetPixelTolerance (const Standard_Real theTolerance)
 Updates pixel tolerance in all selecting volumes. More...
 
void SetWindowSize (const Standard_Integer theWidth, const Standard_Integer theHeight)
 Updates window size in all selecting volumes. More...
 
void BuildSelectingVolume (const gp_Pnt2d &thePoint)
 Builds rectangular selecting frustum for point selection. More...
 
void BuildSelectingVolume (const gp_Pnt2d &theMinPt, const gp_Pnt2d &theMaxPt)
 Builds rectangular selecting frustum for box selection. More...
 
void BuildSelectingVolume (const TColgp_Array1OfPnt2d &thePoints)
 Builds set of triangular selecting frustums for polyline selection. More...
 
virtual Standard_Boolean Overlaps (const BVH_Box< Standard_Real, 3 > &theBndBox, Standard_Real &theDepth) Standard_OVERRIDE
 SAT intersection test between defined volume and given axis-aligned box. More...
 
virtual Standard_Boolean Overlaps (const SelectMgr_Vec3 &theBoxMin, const SelectMgr_Vec3 &theBoxMax, Standard_Boolean *theInside=NULL) Standard_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 Overlaps (const gp_Pnt &thePt, Standard_Real &theDepth) Standard_OVERRIDE
 Intersection test between defined volume and given point. More...
 
virtual Standard_Boolean Overlaps (const Handle< TColgp_HArray1OfPnt > &theArrayOfPts, Standard_Integer theSensType, Standard_Real &theDepth) Standard_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 Overlaps (const gp_Pnt &thePt1, const gp_Pnt &thePt2, Standard_Real &theDepth) Standard_OVERRIDE
 Checks if line segment overlaps selecting frustum. More...
 
virtual Standard_Boolean Overlaps (const gp_Pnt &thePt1, const gp_Pnt &thePt2, const gp_Pnt &thePt3, Standard_Integer theSensType, Standard_Real &theDepth) Standard_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_Real DistToGeometryCenter (const gp_Pnt &theCOG) Standard_OVERRIDE
 Measures distance between 3d projection of user-picked screen point and given point theCOG. More...
 
virtual NCollection_Vec3
< Standard_Real
DetectedPoint (const Standard_Real theDepth) const Standard_OVERRIDE
 Calculates the point on a view ray that was detected during the run of selection algo by given depth. Is valid for point selection only. More...
 
virtual Standard_Boolean IsClipped (const Graphic3d_SequenceOfHClipPlane &thePlanes, const Standard_Real &theDepth)
 Checks if the point of sensitive in which selection was detected belongs to the region defined by clipping planes. More...
 
virtual void AllowOverlapDetection (const Standard_Boolean theIsToAllow)
 Is used for rectangular selection only 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 Standard_OVERRIDE
 
- Public Member Functions inherited from SelectBasics_SelectingVolumeManager
 SelectBasics_SelectingVolumeManager ()
 
virtual ~SelectBasics_SelectingVolumeManager ()
 
virtual Standard_Boolean Overlaps (const NCollection_Vec3< Standard_Real > &theBoxMin, const NCollection_Vec3< Standard_Real > &theBoxMax, Standard_Boolean *theInside=NULL)=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...
 

Additional Inherited Members

- Public Types inherited from SelectBasics_SelectingVolumeManager
enum  SelectionType { Point, Box, Polyline, Unknown }
 Available selection types. More...
 
- Protected Attributes inherited from SelectBasics_SelectingVolumeManager
SelectionType myActiveSelectionType
 Active selection type: point, box or polyline. More...
 

Detailed Description

This class is used to switch between active selecting volumes depending on selection type chosen by the user.

Constructor & Destructor Documentation

SelectMgr_SelectingVolumeManager::SelectMgr_SelectingVolumeManager ( Standard_Boolean  theToAllocateFrustums = Standard_True)

Creates instances of all available selecting volume types.

virtual SelectMgr_SelectingVolumeManager::~SelectMgr_SelectingVolumeManager ( )
inlinevirtual

Member Function Documentation

virtual void SelectMgr_SelectingVolumeManager::AllowOverlapDetection ( const Standard_Boolean  theIsToAllow)
virtual

Is used for rectangular selection only If theIsToAllow is false, only fully included sensitives will be detected, otherwise the algorithm will mark both included and overlapped entities as matched.

void SelectMgr_SelectingVolumeManager::BuildSelectingVolume ( const gp_Pnt2d thePoint)

Builds rectangular selecting frustum for point selection.

void SelectMgr_SelectingVolumeManager::BuildSelectingVolume ( const gp_Pnt2d theMinPt,
const gp_Pnt2d theMaxPt 
)

Builds rectangular selecting frustum for box selection.

void SelectMgr_SelectingVolumeManager::BuildSelectingVolume ( const TColgp_Array1OfPnt2d thePoints)

Builds set of triangular selecting frustums for polyline selection.

virtual NCollection_Vec3<Standard_Real> SelectMgr_SelectingVolumeManager::DetectedPoint ( const Standard_Real  theDepth) const
virtual

Calculates the point on a view ray that was detected during the run of selection algo by given depth. Is valid for point selection only.

Implements SelectBasics_SelectingVolumeManager.

virtual Standard_Real SelectMgr_SelectingVolumeManager::DistToGeometryCenter ( const gp_Pnt theCOG)
virtual

Measures distance between 3d projection of user-picked screen point and given point theCOG.

Implements SelectBasics_SelectingVolumeManager.

virtual Standard_Integer SelectMgr_SelectingVolumeManager::GetActiveSelectionType ( ) const
virtual
virtual Standard_Boolean SelectMgr_SelectingVolumeManager::IsClipped ( const Graphic3d_SequenceOfHClipPlane thePlanes,
const Standard_Real theDepth 
)
virtual

Checks if the point of sensitive in which selection was detected belongs to the region defined by clipping planes.

virtual Standard_Boolean SelectMgr_SelectingVolumeManager::IsOverlapAllowed ( ) const
virtual
virtual Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps ( const BVH_Box< Standard_Real, 3 > &  theBndBox,
Standard_Real theDepth 
)
virtual

SAT intersection test between defined volume and given axis-aligned box.

Implements SelectBasics_SelectingVolumeManager.

virtual Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps ( const SelectMgr_Vec3 theBoxMin,
const SelectMgr_Vec3 theBoxMax,
Standard_Boolean theInside = NULL 
)
virtual

Returns true if selecting volume is overlapped by axis-aligned bounding box with minimum corner at point theMinPt and maximum at point theMaxPt.

virtual Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps ( const gp_Pnt thePt,
Standard_Real theDepth 
)
virtual

Intersection test between defined volume and given point.

Implements SelectBasics_SelectingVolumeManager.

virtual Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps ( const Handle< TColgp_HArray1OfPnt > &  theArrayOfPts,
Standard_Integer  theSensType,
Standard_Real theDepth 
)
virtual

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.

Implements SelectBasics_SelectingVolumeManager.

virtual Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps ( const gp_Pnt thePt1,
const gp_Pnt thePt2,
Standard_Real theDepth 
)
virtual

Checks if line segment overlaps selecting frustum.

Implements SelectBasics_SelectingVolumeManager.

virtual Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps ( const gp_Pnt thePt1,
const gp_Pnt thePt2,
const gp_Pnt thePt3,
Standard_Integer  theSensType,
Standard_Real theDepth 
)
virtual

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.

Implements SelectBasics_SelectingVolumeManager.

virtual SelectMgr_SelectingVolumeManager SelectMgr_SelectingVolumeManager::Scale ( const Standard_Real  theScaleFactor)
virtual

IMPORTANT: Makes sense only for point selection! Returns a copy of the frustum resized according to the scale factor given.

void SelectMgr_SelectingVolumeManager::SetActiveSelectionType ( const SelectionType theType)
void SelectMgr_SelectingVolumeManager::SetCamera ( const Handle< Graphic3d_Camera theCamera)

Updates camera projection and orientation matrices in all selecting volumes.

void SelectMgr_SelectingVolumeManager::SetCamera ( const Graphic3d_Mat4d theProjection,
const Graphic3d_Mat4d theOrientation,
const Standard_Boolean  theIsOrthographic 
)

Updates camera projection and orientation matrices in all selecting volumes.

void SelectMgr_SelectingVolumeManager::SetPixelTolerance ( const Standard_Real  theTolerance)

Updates pixel tolerance in all selecting volumes.

void SelectMgr_SelectingVolumeManager::SetViewport ( const Standard_Real  theX,
const Standard_Real  theY,
const Standard_Real  theWidth,
const Standard_Real  theHeight 
)

Updates viewport in all selecting volumes.

void SelectMgr_SelectingVolumeManager::SetWindowSize ( const Standard_Integer  theWidth,
const Standard_Integer  theHeight 
)

Updates window size in all selecting volumes.

virtual SelectMgr_SelectingVolumeManager SelectMgr_SelectingVolumeManager::Transform ( const gp_Trsf theTrsf)
virtual

Returns a copy of active frustum transformed according to the matrix given.


The documentation for this class was generated from the following file: