Open CASCADE Technology 6.6.0
Public Member Functions
Select3D_SensitiveTriangulation Class Reference

A framework to define selection of a sensitive entity made of a set of triangles.

#include <Select3D_SensitiveTriangulation.hxx>

Inheritance diagram for Select3D_SensitiveTriangulation:
Inheritance graph
[legend]

Public Member Functions

 Select3D_SensitiveTriangulation (const Handle< SelectBasics_EntityOwner > &OwnerId, const Handle< Poly_Triangulation > &aTriangulation, const TopLoc_Location &aLoc, const Standard_Boolean InteriorFlag=Standard_True)
 Constructs a sensitive triangulation object defined by
the owner OwnerId, the triangulation aTriangulation,
the location aLoc, and the flag InteriorFlag.

 Select3D_SensitiveTriangulation (const Handle< SelectBasics_EntityOwner > &OwnerId, const Handle< Poly_Triangulation > &aTriangulation, const TopLoc_Location &aLoc, const Handle< TColStd_HArray1OfInteger > &thefreeedges, const gp_Pnt &theCDG, const Standard_Boolean InteriorFlag)
 Constructs a sensitive triangulation object defined by
the owner OwnerId, the triangulation aTriangulation,
the location aLoc, the array of free edges
thefreeedges, the center of gravity theCDG, and the flag InteriorFlag.
As free edges and the center of gravity do not have
to be computed later, this syntax reduces computation time.

void Project (const Handle< Select3D_Projector > &aProjector)
 projection of the sensitive primitive in order to
get 2D boxes for the Sort Algorithm

void Areas (SelectBasics_ListOfBox2d &boxes)
 stores in <boxes> the 2D Boxes which represent the sensitive face
in the selection algorithm.

Handle_Select3D_SensitiveEntity GetConnected (const TopLoc_Location &aLocation)
 Originally this method intended to return sensitive
entity with new location aLocation, but currently sensitive
entities do not hold a location, instead HasLocation() and
Location() methods call corresponding entity owner's methods.
Thus all entities returned by GetConnected() share the same
location propagated from corresponding selectable object.
You must redefine this function for any type of
sensitive entity which can accept another connected
sensitive entity.//can be connected to another sensitive entity.

virtual Standard_Boolean Matches (const Standard_Real X, const Standard_Real Y, const Standard_Real aTol, Standard_Real &DMin)
 Matches the coordinates X, Y with the entity found at
that point within the tolerance aTol and the minimum depth DMin.
You must redefine this function for every inheriting entity.
You will have to call this framework inside the redefined function.

virtual Standard_Boolean Matches (const Standard_Real XMin, const Standard_Real YMin, const Standard_Real XMax, const Standard_Real YMax, const Standard_Real aTol)
 Matches the box defined by the coordinates Xmin,
Ymin, Xmax, Ymax with the entity found at that point
within the tolerance aTol.
Xmin, YMin define the minimum point in the lower left
hand corner of the box, and XMax, YMax define the
maximum point in the upper right hand corner of the box.
You must redefine this function for every inheriting entity.
You will have to call this framework inside the redefined function.

virtual Standard_Boolean Matches (const TColgp_Array1OfPnt2d &Polyline, const Bnd_Box2d &aBox, const Standard_Real aTol)
 prevents from hiding virtual methods...

Standard_Real ComputeDepth (const gp_Lin &EyeLine) const
 give the depht of the last detected triangle
(center of gravity)

Standard_Integer DetectedTriangle () const
 Returns the detected three nodes P1, P2, P3 constituting a triangle.
This triangle is a component of the overall sensitive
triangulation created at construction time.

const Handle_Poly_Triangulation & Triangulation () const
 Returns the triangulation used at the time of construction.

const gp_PntCDG3D () const
 Returns the 3D center of gravity used at the time of construction.

const gp_Pnt2dCDG2D () const
 Returns the 2D center of gravity used at the time of construction.

Standard_Integer Status (const gp_XY &p0, const gp_XY &p1, const gp_XY &p2, const gp_XY &aPoint, const Standard_Real aTol, Standard_Real &Dmin) const
 Dmin gives the distance between the cdg and aPoint

Standard_Boolean HasInitLocation () const
const TopLoc_LocationGetInitLocation () const
virtual void ResetLocation ()
 sets the location to Identity

virtual void SetLocation (const TopLoc_Location &aLoc)
virtual void Dump (Standard_OStream &S, const Standard_Boolean FullDump=Standard_True) const
 2 options :
<FullDump> = False -> general information
<FullDump> = True -> whole informtion 3D +2d ...

Standard_Boolean DetectedTriangle (gp_Pnt &P1, gp_Pnt &P2, gp_Pnt &P3) const
 gives the vertices of detected triangle...

Standard_Boolean DetectedTriangle2d (gp_Pnt2d &P1, gp_Pnt2d &P2, gp_Pnt2d &P3) const
 Gets 2D nodes computed by entity using 3D nodes and viewer
parameters (see Project() method)


Constructor & Destructor Documentation

Select3D_SensitiveTriangulation::Select3D_SensitiveTriangulation ( const Handle< SelectBasics_EntityOwner > &  OwnerId,
const Handle< Poly_Triangulation > &  aTriangulation,
const TopLoc_Location aLoc,
const Standard_Boolean  InteriorFlag = Standard_True 
)
Select3D_SensitiveTriangulation::Select3D_SensitiveTriangulation ( const Handle< SelectBasics_EntityOwner > &  OwnerId,
const Handle< Poly_Triangulation > &  aTriangulation,
const TopLoc_Location aLoc,
const Handle< TColStd_HArray1OfInteger > &  thefreeedges,
const gp_Pnt theCDG,
const Standard_Boolean  InteriorFlag 
)

Member Function Documentation

void Select3D_SensitiveTriangulation::Areas ( SelectBasics_ListOfBox2d boxes) [virtual]
const gp_Pnt2d& Select3D_SensitiveTriangulation::CDG2D ( ) const
const gp_Pnt& Select3D_SensitiveTriangulation::CDG3D ( ) const
Standard_Real Select3D_SensitiveTriangulation::ComputeDepth ( const gp_Lin EyeLine) const [virtual]
Standard_Boolean Select3D_SensitiveTriangulation::DetectedTriangle ( gp_Pnt P1,
gp_Pnt P2,
gp_Pnt P3 
) const
Standard_Integer Select3D_SensitiveTriangulation::DetectedTriangle ( ) const
Standard_Boolean Select3D_SensitiveTriangulation::DetectedTriangle2d ( gp_Pnt2d P1,
gp_Pnt2d P2,
gp_Pnt2d P3 
) const
virtual void Select3D_SensitiveTriangulation::Dump ( Standard_OStream S,
const Standard_Boolean  FullDump = Standard_True 
) const [virtual]

Reimplemented from Select3D_SensitiveEntity.

Handle_Select3D_SensitiveEntity Select3D_SensitiveTriangulation::GetConnected ( const TopLoc_Location aLocation) [virtual]

Reimplemented from Select3D_SensitiveEntity.

const TopLoc_Location& Select3D_SensitiveTriangulation::GetInitLocation ( ) const
Standard_Boolean Select3D_SensitiveTriangulation::HasInitLocation ( ) const
virtual Standard_Boolean Select3D_SensitiveTriangulation::Matches ( const TColgp_Array1OfPnt2d Polyline,
const Bnd_Box2d aBox,
const Standard_Real  aTol 
) [virtual]

Reimplemented from Select3D_SensitiveEntity.

virtual Standard_Boolean Select3D_SensitiveTriangulation::Matches ( const Standard_Real  X,
const Standard_Real  Y,
const Standard_Real  aTol,
Standard_Real DMin 
) [virtual]

Reimplemented from Select3D_SensitiveEntity.

virtual Standard_Boolean Select3D_SensitiveTriangulation::Matches ( const Standard_Real  XMin,
const Standard_Real  YMin,
const Standard_Real  XMax,
const Standard_Real  YMax,
const Standard_Real  aTol 
) [virtual]

Reimplemented from Select3D_SensitiveEntity.

void Select3D_SensitiveTriangulation::Project ( const Handle< Select3D_Projector > &  aProjector) [virtual]

Reimplemented from Select3D_SensitiveEntity.

virtual void Select3D_SensitiveTriangulation::ResetLocation ( ) [virtual]

Reimplemented from Select3D_SensitiveEntity.

virtual void Select3D_SensitiveTriangulation::SetLocation ( const TopLoc_Location aLoc) [virtual]

Reimplemented from Select3D_SensitiveEntity.

Standard_Integer Select3D_SensitiveTriangulation::Status ( const gp_XY p0,
const gp_XY p1,
const gp_XY p2,
const gp_XY aPoint,
const Standard_Real  aTol,
Standard_Real Dmin 
) const
const Handle_Poly_Triangulation& Select3D_SensitiveTriangulation::Triangulation ( ) const

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines