21f9993c1318cb83c3b6e90302b9b6e57ab7acf5
[occt.git] / src / Poly / Poly_Triangle.cxx
1 // Created on: 1995-03-06
2 // Created by: Laurent PAINNOT
3 // Copyright (c) 1995-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17
18 #include <Poly_Triangle.hxx>
19 #include <Standard_OutOfRange.hxx>
20
21 //=======================================================================
22 //function : Poly_Triangle
23 //purpose  : 
24 //=======================================================================
25 Poly_Triangle::Poly_Triangle()
26 {
27   myNodes[0] =  myNodes[1] = myNodes[2] = 0;
28 }
29
30 //=======================================================================
31 //function : Poly_Triangle
32 //purpose  : 
33 //=======================================================================
34
35 Poly_Triangle::Poly_Triangle(const Standard_Integer N1,
36                              const Standard_Integer N2, 
37                              const Standard_Integer N3)
38 {
39   myNodes[0] = N1;
40   myNodes[1] = N2;
41   myNodes[2] = N3;
42 }
43
44 //=======================================================================
45 //function : Set
46 //purpose  : 
47 //=======================================================================
48
49 void Poly_Triangle::Set(const Standard_Integer N1, 
50                         const Standard_Integer N2, 
51                         const Standard_Integer N3)
52 {
53   myNodes[0] = N1;
54   myNodes[1] = N2;
55   myNodes[2] = N3;
56 }
57
58 //=======================================================================
59 //function : Get
60 //purpose  : 
61 //=======================================================================
62
63 void Poly_Triangle::Get(Standard_Integer& N1, 
64                         Standard_Integer& N2, 
65                         Standard_Integer& N3) const 
66 {
67   N1 = myNodes[0];
68   N2 = myNodes[1];
69   N3 = myNodes[2];
70 }
71