summaryrefslogtreecommitdiff
path: root/src/Visual3d/Visual3d_ContextPick.cxx
blob: ae7fe66ffbe8b2976dc6e1e51a5ec0067025d214 (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

// File		Visual3d_ContextPick.cxx
// Created	Fevrier 1992
// Author	NW,JPB,CAL

//-Copyright	MatraDatavision 1991,1992

//-Version	

//-Design	Declaration des variables specifiques aux contextes
//		de reperage.

//-Warning	Un contexte de reperage est defini par :
//		- l'ouverture de la fenetre
//		- la profondeur demandee
//		- l'ordre de parcours des structures

//-References	

//-Language	C++ 2.0

//-Declarations

// for the class
#include <Visual3d_ContextPick.ixx>

//-Aliases

//-Global data definitions

//	-- ouverture ou taille de la fenetre de reperage
//	MyAperture	:	Standard_Real;

//	-- profondeur ou nombre de structures a reperer
//	MyDepth		:	Standard_Integer;

//	-- ordre de parcours des structures reperees
//	MyOrder		:	TypeOfOrder;

//-Constructors

//-Destructors

//-Methods, in order

Visual3d_ContextPick::Visual3d_ContextPick ():
MyAperture (4.0),
MyDepth (10),
MyOrder (Visual3d_TOO_TOPFIRST) {
}

Visual3d_ContextPick::Visual3d_ContextPick (const Standard_Real Aperture, const Standard_Integer Depth, const Visual3d_TypeOfOrder Order):
MyAperture (Aperture),
MyDepth (Depth),
MyOrder (Order) {

	if (Aperture <= 0.0)
		Visual3d_ContextPickDefinitionError::Raise
			("Bad value for PickAperture");

	if (Depth <= 0)
		Visual3d_ContextPickDefinitionError::Raise
			("Bad value for PickDepth");

}

void Visual3d_ContextPick::SetAperture (const Standard_Real Aperture) {

	if (Aperture <= 0.0)
		Visual3d_ContextPickDefinitionError::Raise
			("Bad value for PickAperture");

	MyAperture	= Aperture;

}

Standard_Real Visual3d_ContextPick::Aperture () const {

	return (MyAperture);

}

void Visual3d_ContextPick::SetDepth (const Standard_Integer Depth) {

	if (Depth <= 0)
		Visual3d_ContextPickDefinitionError::Raise 
			("Bad value for PickDepth");

	MyDepth		= Depth;
	
}

Standard_Integer Visual3d_ContextPick::Depth () const {

	return (MyDepth);

}

void Visual3d_ContextPick::SetOrder (const Visual3d_TypeOfOrder Order) {

	MyOrder		= Order;

}

Visual3d_TypeOfOrder Visual3d_ContextPick::Order () const {

	return (MyOrder);

}