summaryrefslogtreecommitdiff
path: root/inc/StdSelect_ViewerSelector3d.hxx
blob: a9b7f186be5cd5f755bc0454f24c2a08e522f1b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _StdSelect_ViewerSelector3d_HeaderFile
#define _StdSelect_ViewerSelector3d_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_StdSelect_ViewerSelector3d_HeaderFile
#include <Handle_StdSelect_ViewerSelector3d.hxx>
#endif

#ifndef _Handle_Select3D_Projector_HeaderFile
#include <Handle_Select3D_Projector.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Handle_Graphic3d_Group_HeaderFile
#include <Handle_Graphic3d_Group.hxx>
#endif
#ifndef _Handle_Graphic3d_Structure_HeaderFile
#include <Handle_Graphic3d_Structure.hxx>
#endif
#ifndef _SelectMgr_ViewerSelector_HeaderFile
#include <SelectMgr_ViewerSelector.hxx>
#endif
#ifndef _Handle_SelectMgr_Selection_HeaderFile
#include <Handle_SelectMgr_Selection.hxx>
#endif
#ifndef _Handle_V3d_View_HeaderFile
#include <Handle_V3d_View.hxx>
#endif
class Select3D_Projector;
class Graphic3d_Group;
class Graphic3d_Structure;
class SelectMgr_Selection;
class V3d_View;
class TColgp_Array1OfPnt2d;


//! Selector Usable by Viewers from V3d <br>
//! <br>
class StdSelect_ViewerSelector3d : public SelectMgr_ViewerSelector {

public:

  //! Constructs an empty 3D selector object. <br>
  Standard_EXPORT   StdSelect_ViewerSelector3d();
  //! Constructs a 3D selector object defined by the projector aProj. <br>
  Standard_EXPORT   StdSelect_ViewerSelector3d(const Handle(Select3D_Projector)& aProj);
  //! Processes the projection of the sensitive  primitives <br>
//!          in the active view ; to be done before the selection action... <br>
  Standard_EXPORT     void Convert(const Handle(SelectMgr_Selection)& aSelection) ;
  //! Sets the sensitivity aSensitivity. <br>
  Standard_EXPORT     void Set(const Standard_Integer aSensitivity) ;
  //! Sets the new projector aProj to replace the one used at construction time. <br>
  Standard_EXPORT     void Set(const Handle(Select3D_Projector)& aProj) ;
  //! Picks the sensitive entity at the pixel coordinates of <br>
//! the mouse Xpix and Ypix.   The selector looks for touched areas and owners. <br>
  Standard_EXPORT     void Pick(const Standard_Integer XPix,const Standard_Integer YPix,const Handle(V3d_View)& aView) ;
  //! Picks the sensitive entity according to the minimum <br>
//! and maximum pixel values XPMin, YPMin, XPMax <br>
//! and YPMax   defining a 2D area for selection in the 3D view aView. <br>
  Standard_EXPORT     void Pick(const Standard_Integer XPMin,const Standard_Integer YPMin,const Standard_Integer XPMax,const Standard_Integer YPMax,const Handle(V3d_View)& aView) ;
  //! pick action  - input pixel values for polyline selection for selection. <br>
  Standard_EXPORT     void Pick(const TColgp_Array1OfPnt2d& Polyline,const Handle(V3d_View)& aView) ;
  //! Returns the current Projector. <br>
       const Handle_Select3D_Projector& Projector() const;
  //! Puts back the address of the current projector in sensitive primitives... <br>
  Standard_EXPORT     void ReactivateProjector() ;
  //! Displays sensitive areas found in the view aView. <br>
  Standard_EXPORT     void DisplayAreas(const Handle(V3d_View)& aView) ;
  //! Clears the view aView of sensitive areas found in it. <br>
  Standard_EXPORT     void ClearAreas(const Handle(V3d_View)& aView) ;
  //! Displays the selection aSel found in the view aView. <br>
  Standard_EXPORT     void DisplaySensitive(const Handle(V3d_View)& aView) ;
  
  Standard_EXPORT     void ClearSensitive(const Handle(V3d_View)& aView) ;
  
  Standard_EXPORT     void DisplaySensitive(const Handle(SelectMgr_Selection)& aSel,const Handle(V3d_View)& aView,const Standard_Boolean ClearOthers = Standard_True) ;
  
  Standard_EXPORT     void DisplayAreas(const Handle(SelectMgr_Selection)& aSel,const Handle(V3d_View)& aView,const Standard_Boolean ClearOthers = Standard_True) ;




  DEFINE_STANDARD_RTTI(StdSelect_ViewerSelector3d)

protected:




private: 

  
  Standard_EXPORT     Standard_Boolean UpdateProj(const Handle(V3d_View)& aView) ;
  
  Standard_EXPORT     void ComputeSensitivePrs(const Handle(SelectMgr_Selection)& aSel) ;
  
  Standard_EXPORT     void ComputeAreasPrs(const Handle(SelectMgr_Selection)& aSel) ;

Handle_Select3D_Projector myprj;
Standard_Real mycoeff[14];
Standard_Real myprevcoeff[14];
Standard_Real mycenter[2];
Standard_Real myprevcenter[2];
Standard_Real mylastzoom;
Standard_Integer mypixtol;
Standard_Boolean myupdatetol;
Handle_Graphic3d_Group myareagroup;
Handle_Graphic3d_Group mysensgroup;
Handle_Graphic3d_Structure mystruct;


};


#include <StdSelect_ViewerSelector3d.lxx>



// other Inline functions and methods (like "C++: function call" methods)


#endif