# Visualization
TKV3d
Select3D

# 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:

[legend]

## Public Member Functions

Standard_EXPORT | 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. .
Standard_EXPORT | 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. .
Standard_EXPORT void | Project (const Select3D_Projector &aProjector)
| projection of the sensitive primitive in order to get 2D boxes for the Sort Algorithm
Standard_EXPORT void | Areas (SelectBasics_ListOfBox2d &boxes)
| stores in <boxes> the 2D Boxes which represent the sensitive face in the selection algorithm.
Standard_EXPORT Handle_Select3D_SensitiveEntity | GetConnected (const TopLoc_Location &aLocation)
| Returns the sensitive entity found at the location aLocation. 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_EXPORT 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_EXPORT 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_EXPORT Standard_Boolean | Matches (const TColgp_Array1OfPnt2d &Polyline, const Bnd_Box2d &aBox, const Standard_Real aTol)
| prevents from hiding virtual methods...
Standard_EXPORT 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_Pnt & | CDG3D () const
| Returns the 3D center of gravity used at the time of construction. .
const gp_Pnt2d & | CDG2D () const
| Returns the 2D center of gravity used at the time of construction. .
Standard_EXPORT 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_Location & | GetInitLocation () const
virtual Standard_EXPORT void | ResetLocation ()
| sets the location to Identity
virtual Standard_EXPORT void | SetLocation (const TopLoc_Location &aLoc)
virtual Standard_EXPORT 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_EXPORT Standard_Boolean | DetectedTriangle (gp_Pnt &P1, gp_Pnt &P2, gp_Pnt &P3) const
| gives the vertices of detected triangle... for debug only
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const

## Private Member Functions

Standard_EXPORT Standard_Boolean | IsFree (const Standard_Integer IndexOfTriangle, Standard_Integer &IndexinFree) const
Standard_EXPORT void | ComputeTotalTrsf ()

## Private Attributes

Handle_Poly_Triangulation | myTriangul
TopLoc_Location | myiniloc
gp_Trsf | myTrsf
gp_Pnt | myCDG3D
Handle_TColStd_HArray1OfInteger | myFreeEdges
Standard_Boolean | myIntFlag
TColgp_Array1OfPnt2d | myNodes2d
gp_Pnt2d | myCDG2D
Bnd_Box2d | mybox2d
Standard_Integer | myDetectedTr

## Constructor & Destructor Documentation

Standard_EXPORT Select3D_SensitiveTriangulation::Select3D_SensitiveTriangulation | ( | const Handle(SelectBasics_EntityOwner)& | OwnerId,
|  | const Handle(Poly_Triangulation)& | aTriangulation,
|  | const TopLoc_Location & | aLoc,
|  | const Standard_Boolean | InteriorFlag = `Standard_True`
| ) |

Standard_EXPORT 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

Standard_EXPORT void Select3D_SensitiveTriangulation::Areas | ( | SelectBasics_ListOfBox2d & | boxes | ) | `[virtual]`

| Implements SelectBasics_SensitiveEntity.

const gp_Pnt2d & Select3D_SensitiveTriangulation::CDG2D | ( |  | ) | const`[inline]`

const gp_Pnt & Select3D_SensitiveTriangulation::CDG3D | ( |  | ) | const`[inline]`

Standard_EXPORT Standard_Real Select3D_SensitiveTriangulation::ComputeDepth | ( | const gp_Lin & | EyeLine | ) | const`[virtual]`

| Implements Select3D_SensitiveEntity.

Standard_EXPORT void Select3D_SensitiveTriangulation::ComputeTotalTrsf | ( |  | ) | `[private]`

Standard_EXPORT Standard_Boolean Select3D_SensitiveTriangulation::DetectedTriangle | ( | gp_Pnt & | P1,
|  | gp_Pnt & | P2,
|  | gp_Pnt & | P3
| ) | const

Standard_Integer Select3D_SensitiveTriangulation::DetectedTriangle | ( |  | ) | const

virtual Standard_EXPORT void Select3D_SensitiveTriangulation::Dump | ( | Standard_OStream & | S,
|  | const Standard_Boolean | FullDump = `Standard_True`
| ) | const`[virtual]`

| Reimplemented from Select3D_SensitiveEntity.

Standard_EXPORT Handle_Select3D_SensitiveEntity Select3D_SensitiveTriangulation::GetConnected | ( | const TopLoc_Location & | aLocation | ) | `[virtual]`

| Reimplemented from Select3D_SensitiveEntity.

const TopLoc_Location & Select3D_SensitiveTriangulation::GetInitLocation | ( |  | ) | const`[inline]`

Standard_EXPORT const Select3D_SensitiveTriangulation::Handle | ( | Standard_Type |  | ) | const

| Reimplemented from Select3D_SensitiveEntity.

Standard_Boolean Select3D_SensitiveTriangulation::HasInitLocation | ( |  | ) | const`[inline]`

Standard_EXPORT Standard_Boolean Select3D_SensitiveTriangulation::IsFree | ( | const Standard_Integer | IndexOfTriangle,
|  | Standard_Integer & | IndexinFree
| ) | const`[private]`

virtual Standard_EXPORT Standard_Boolean Select3D_SensitiveTriangulation::Matches | ( | const TColgp_Array1OfPnt2d & | Polyline,
|  | const Bnd_Box2d & | aBox,
|  | const Standard_Real | aTol
| ) | `[virtual]`

| Reimplemented from Select3D_SensitiveEntity.

virtual Standard_EXPORT 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.

virtual Standard_EXPORT 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.

Standard_EXPORT void Select3D_SensitiveTriangulation::Project | ( | const Select3D_Projector & | aProjector | ) | `[virtual]`

| Reimplemented from Select3D_SensitiveEntity.

virtual Standard_EXPORT void Select3D_SensitiveTriangulation::ResetLocation | ( |  | ) | `[virtual]`

| Reimplemented from Select3D_SensitiveEntity.

virtual Standard_EXPORT void Select3D_SensitiveTriangulation::SetLocation | ( | const TopLoc_Location & | aLoc | ) | `[virtual]`

| Reimplemented from Select3D_SensitiveEntity.

Standard_EXPORT 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

## Field Documentation

Bnd_Box2d Select3D_SensitiveTriangulation::mybox2d `[private]`

gp_Pnt2d Select3D_SensitiveTriangulation::myCDG2D `[private]`

gp_Pnt Select3D_SensitiveTriangulation::myCDG3D `[private]`

Standard_Integer Select3D_SensitiveTriangulation::myDetectedTr `[private]`

Handle_TColStd_HArray1OfInteger Select3D_SensitiveTriangulation::myFreeEdges `[private]`

TopLoc_Location Select3D_SensitiveTriangulation::myiniloc `[private]`

Standard_Boolean Select3D_SensitiveTriangulation::myIntFlag `[private]`

TColgp_Array1OfPnt2d Select3D_SensitiveTriangulation::myNodes2d `[private]`

Handle_Poly_Triangulation Select3D_SensitiveTriangulation::myTriangul `[private]`

gp_Trsf Select3D_SensitiveTriangulation::myTrsf `[private]`

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

- Select3D_SensitiveTriangulation.hxx
- Select3D_SensitiveTriangulation.lxx