summaryrefslogtreecommitdiff
path: root/src/Aspect/Aspect_Edge.cxx
blob: e02f73d009790498ce13d2c45973841bbe7bdb29 (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

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

//-Copyright	MatraDatavision 1991,1992

//-Version	

//-Design	Declaration des variables specifiques aux aretes

//-Warning	Une arete est definie par :
//		- les 2 sommets references par des indices
//		- la visibilite

//-References	

//-Language	C++ 2.0

//-Declarations

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

//-Aliases

//-Global data definitions

//	-- les indices des sommets extremite
//	MyBegin		:	Standard_Integer;
//	MyEnd		:	Standard_Integer;

//	-- la visibilite
//	MyVisibility	:	TypeOfEdge;

//-Constructors

//-Destructors

//-Methods, in order

Aspect_Edge::Aspect_Edge () {

	MyBegin		= 0;
	MyEnd		= 0;
	MyVisibility	= Aspect_TOE_INVISIBLE;

}

Aspect_Edge::Aspect_Edge (const Standard_Integer AIndex1, const Standard_Integer AIndex2, const Aspect_TypeOfEdge AType) {

	if (AIndex1 == AIndex2)
		Aspect_EdgeDefinitionError::Raise ("Bad index for the edge");

	MyBegin		= AIndex1;
	MyEnd		= AIndex2;
	MyVisibility	= AType;

}

void Aspect_Edge::SetValues (const Standard_Integer AIndex1, const Standard_Integer AIndex2, const Aspect_TypeOfEdge AType) {

	if (AIndex1 == AIndex2)
		Aspect_EdgeDefinitionError::Raise ("Bad index for the edge");

	MyBegin		= AIndex1;
	MyEnd		= AIndex2;
	MyVisibility	= AType;

}

void Aspect_Edge::Values (Standard_Integer& AIndex1, Standard_Integer& AIndex2, Aspect_TypeOfEdge& AType) const {

	AIndex1	= MyBegin;
	AIndex2	= MyEnd;
	AType	= MyVisibility;

}

Standard_Integer Aspect_Edge::FirstIndex () const {

	return (MyBegin);

}

Standard_Integer Aspect_Edge::LastIndex () const {

	return (MyEnd);

}

Aspect_TypeOfEdge Aspect_Edge::Type () const {

	return (MyVisibility);

}