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

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

//-Copyright	MatraDatavision 1991,1992

//-Version	

//-Design	Declaration of variables specific to the classe
//		describing a marking.

//-Warning	Marking is defined by :
//		- vector (Elem_Num, Pick_Id, Structure)

//-References	

//-Language	C++ 2.0

//-Declarations

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

//-Aliases

//-Global data definitions

//	-- le vecteur
//	MyElementNumber		:	Standard_Integer;
//	MyPickId		:	Standard_Integer;
//	MyStructure		:	Structure;

//	-- les flags pour definition
//	MyElementNumberIsDef	:	Standard_Boolean;
//	MyPickIdIsDef		:	Standard_Boolean;
//	MyStructureIsDef	:	Standard_Boolean;

//-Constructors

//-Destructors

//-Methods, in order

Visual3d_PickPath::Visual3d_PickPath ():
MyElementNumberIsDef (Standard_False),
MyPickIdIsDef (Standard_False),
MyStructureIsDef (Standard_False) {
}

Visual3d_PickPath::Visual3d_PickPath (const Standard_Integer AnElemNumber, const Standard_Integer APickId, const Handle(Graphic3d_Structure)& AStructure):
MyElementNumber (AnElemNumber),
MyPickId (APickId),
MyStructure (AStructure),
MyElementNumberIsDef (Standard_True),
MyPickIdIsDef (Standard_True),
MyStructureIsDef (Standard_True) {
}

void Visual3d_PickPath::SetElementNumber (const Standard_Integer AnElemNumber) {

	MyElementNumber		= AnElemNumber;
	MyElementNumberIsDef	= Standard_True;

}

void Visual3d_PickPath::SetPickIdentifier (const Standard_Integer APickId) {

	MyPickId		= APickId;
	MyPickIdIsDef		= Standard_True;

}

void Visual3d_PickPath::SetStructIdentifier (const Handle(Graphic3d_Structure)& AStructure) {

	MyStructure		= AStructure;
	MyStructureIsDef	= Standard_True;

}

Standard_Integer Visual3d_PickPath::ElementNumber () const {

	if (!MyElementNumberIsDef)
		Visual3d_PickError::Raise ("No defined ElementNumber");

	return (MyElementNumber);

}

Standard_Integer Visual3d_PickPath::PickIdentifier () const {

	if (!MyPickIdIsDef)
		Visual3d_PickError::Raise ("No defined PickIdentifier");

	return (MyPickId);

}

Handle(Graphic3d_Structure) Visual3d_PickPath::StructIdentifier () const {

	if (!MyStructureIsDef)
		Visual3d_PickError::Raise ("No defined StructIdentifier");

	return (MyStructure);

}