Open CASCADE Technology  6.8.0
Public Member Functions
MeshVS_DummySensitiveEntity Class Reference

This class allows to create owners to all elements or nodes, both hidden and shown, but these owners user cannot select "by hands" in viewer. They means for internal application tasks, for example, receiving all owners, both for hidden and shown entities. More...

#include <MeshVS_DummySensitiveEntity.hxx>

Inheritance diagram for MeshVS_DummySensitiveEntity:
Inheritance graph
[legend]

Public Member Functions

 MeshVS_DummySensitiveEntity (const Handle< SelectBasics_EntityOwner > &OwnerId)
 
virtual void Areas (SelectBasics_ListOfBox2d &aresult)
 to be implemented specifically by each type of sensitive primitive . More...
 
virtual Standard_Boolean Matches (const SelectBasics_PickArgs &thePickArgs, Standard_Real &theMatchDMin, Standard_Real &theMatchDepth)
 Checks whether the sensitive entity matches the picking detection area (close to the picking line). This method takes into account depth limits produced by abstract view: far/near planes, clippings. Please port existing implementations of your picking detection, which were done at Matches (X, Y, Tol, DMin) method to this one, introducing the depth checks. Please note that the previous method is suppressed and the virtual implementations are not used by OCC selection framework. The porting procedure for simple sensitives (or if you are not interested in implementing full scale depth checks) can be simplified to writing the following code snippet: More...
 
virtual Standard_Boolean Matches (const Standard_Real XMin, const Standard_Real YMin, const Standard_Real XMax, const Standard_Real YMax, const Standard_Real aTol)
 returns True if the box (Xmin,YMin)---—(Xmax,Ymax) contains the SensitiveEntity. Necessary for selection using elastic boxes,or segments. More...
 
virtual Standard_Boolean Matches (const TColgp_Array1OfPnt2d &Polyline, const Bnd_Box2d &aBox, const Standard_Real aTol)
 returns True if the polyline xi,yi contains the SensitiveEntity. Necessary for selection using polyline selection More...
 
virtual Standard_Boolean Is3D () const
 returns True if able to give 3D information (Depth,...). See Select3D More...
 
virtual Standard_Boolean NeedsConversion () const
 
virtual Standard_Integer MaxBoxes () const
 returns the max number of boxes the entity is able to give at a time More...
 
- Public Member Functions inherited from SelectBasics_SensitiveEntity
virtual void Set (const Handle< SelectBasics_EntityOwner > &TheOwnerId)
 
const Handle
< SelectBasics_EntityOwner > & 
OwnerId () const
 
void SetSensitivityFactor (const Standard_ShortReal aFactor)
 
Standard_ShortReal SensitivityFactor () const
 allows a better sensitivity for a specific entity in selection algorithms useful for small sized entities. More...
 
- Public Member Functions inherited from MMgt_TShared
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual const
Handle_Standard_Type & 
DynamicType () const
 Returns a type information object about this object. More...
 
Standard_Boolean IsInstance (const Handle_Standard_Type &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const Handle_Standard_Type &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
virtual Handle_Standard_Transient This () const
 Returns a Handle which references this object. Must never be called to objects created in stack. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from SelectBasics_SensitiveEntity
 SelectBasics_SensitiveEntity (const Handle< SelectBasics_EntityOwner > &OwnerId, const Standard_ShortReal aSensitivityFactor=1)
 
- Protected Attributes inherited from SelectBasics_SensitiveEntity
Handle< SelectBasics_EntityOwnermyOwnerId
 

Detailed Description

This class allows to create owners to all elements or nodes, both hidden and shown, but these owners user cannot select "by hands" in viewer. They means for internal application tasks, for example, receiving all owners, both for hidden and shown entities.

Constructor & Destructor Documentation

MeshVS_DummySensitiveEntity::MeshVS_DummySensitiveEntity ( const Handle< SelectBasics_EntityOwner > &  OwnerId)

Member Function Documentation

virtual void MeshVS_DummySensitiveEntity::Areas ( SelectBasics_ListOfBox2d aresult)
virtual

to be implemented specifically by each type of sensitive primitive .

Implements SelectBasics_SensitiveEntity.

virtual Standard_Boolean MeshVS_DummySensitiveEntity::Is3D ( ) const
virtual

returns True if able to give 3D information (Depth,...). See Select3D

Implements SelectBasics_SensitiveEntity.

virtual Standard_Boolean MeshVS_DummySensitiveEntity::Matches ( const SelectBasics_PickArgs thePickArgs,
Standard_Real theMatchDMin,
Standard_Real theMatchDepth 
)
virtual

Checks whether the sensitive entity matches the picking detection area (close to the picking line). This method takes into account depth limits produced by abstract view: far/near planes, clippings. Please port existing implementations of your picking detection, which were done at Matches (X, Y, Tol, DMin) method to this one, introducing the depth checks. Please note that the previous method is suppressed and the virtual implementations are not used by OCC selection framework. The porting procedure for simple sensitives (or if you are not interested in implementing full scale depth checks) can be simplified to writing the following code snippet:

{ // example code for porting descendants of Select3D_SensitiveEntity
// invoke implementation of obsolete matches method (if implemented)...
if (!Matches (thePickArgs.X(), thePickArgs.Y(), thePickArgs.Tolerance(), theMatchDMin))
// invoke your implementation of computing depth (if implemented)...
Standard_Real aDetectDepth = ComputeDepth (thePickArgs.PickLine());
return !thePickArgs.IsClipped(aDetectDepth);
}
Parameters
thePickArgs[in] the picking arguments.
theMatchDMin[out] the minimum distance on xy plane from point of picking to center of gravity of the detected sub-part of sensitive entity or the whole sensitive (e.g. used for resolving selection of coinciding circles, selection will be set to the one whose center is closest to the picking point).
theMatchDepth[out] the minimum detected depth: depth of the closest detected sub-part of sensitive entity (or the whole sensitive).
Returns
True if the sensitive matches the detection area. This method is an entry point for picking detection framework. The method is triggered when it is required to compose list of detected sensitive entities. The sensitives are filtered out from detection result if returned value is False. The passed entities are then can be sorted by "theDetectDist", "theDetectDepth" parameters.

Implements SelectBasics_SensitiveEntity.

virtual Standard_Boolean MeshVS_DummySensitiveEntity::Matches ( const Standard_Real  XMin,
const Standard_Real  YMin,
const Standard_Real  XMax,
const Standard_Real  YMax,
const Standard_Real  aTol 
)
virtual

returns True if the box (Xmin,YMin)---—(Xmax,Ymax) contains the SensitiveEntity. Necessary for selection using elastic boxes,or segments.

Implements SelectBasics_SensitiveEntity.

virtual Standard_Boolean MeshVS_DummySensitiveEntity::Matches ( const TColgp_Array1OfPnt2d Polyline,
const Bnd_Box2d aBox,
const Standard_Real  aTol 
)
virtual

returns True if the polyline xi,yi contains the SensitiveEntity. Necessary for selection using polyline selection

Implements SelectBasics_SensitiveEntity.

virtual Standard_Integer MeshVS_DummySensitiveEntity::MaxBoxes ( ) const
virtual

returns the max number of boxes the entity is able to give at a time

Implements SelectBasics_SensitiveEntity.

virtual Standard_Boolean MeshVS_DummySensitiveEntity::NeedsConversion ( ) const
virtual

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