b311480e |
1 | // Created on: 1995-09-25 |
2 | // Created by: Philippe GIRODENGO |
3 | // Copyright (c) 1995-1999 Matra Datavision |
973c2be1 |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | // |
973c2be1 |
6 | // This file is part of Open CASCADE Technology software library. |
b311480e |
7 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | // |
973c2be1 |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
b311480e |
16 | |
7fd59977 |
17 | //======================================================================= |
7fd59977 |
18 | |
7fd59977 |
19 | #include <gp_XYZ.hxx> |
42cf5bc1 |
20 | #include <Precision.hxx> |
21 | #include <Standard_NegativeValue.hxx> |
22 | #include <Standard_Type.hxx> |
23 | #include <StlMesh_MeshTriangle.hxx> |
7fd59977 |
24 | |
92efcf78 |
25 | IMPLEMENT_STANDARD_RTTIEXT(StlMesh_MeshTriangle,MMgt_TShared) |
26 | |
7fd59977 |
27 | //======================================================================= |
28 | //function : StlMesh_MeshTriangle |
29 | //design : |
30 | //warning : |
31 | //======================================================================= |
7fd59977 |
32 | StlMesh_MeshTriangle::StlMesh_MeshTriangle() |
33 | : MyV1 (0), MyV2 (0), MyV3 (0), MyXn (0.0), MyYn (0.0), MyZn (0.0) { } |
34 | |
35 | |
36 | //======================================================================= |
37 | //function : StlMesh_MeshTriangle |
38 | //design : |
39 | //warning : |
40 | //======================================================================= |
41 | |
42 | StlMesh_MeshTriangle::StlMesh_MeshTriangle(const Standard_Integer V1, |
43 | const Standard_Integer V2, |
44 | const Standard_Integer V3, |
45 | const Standard_Real Xn, |
46 | const Standard_Real Yn, |
47 | const Standard_Real Zn) |
48 | : MyV1 (V1), MyV2 (V2), MyV3 (V3), MyXn (Xn), MyYn (Yn), MyZn (Zn) { } |
49 | |
50 | |
51 | //======================================================================= |
52 | //function : GetVertexAndOrientation |
53 | //design : |
54 | //warning : |
55 | //======================================================================= |
56 | |
57 | void StlMesh_MeshTriangle::GetVertexAndOrientation(Standard_Integer& V1, |
58 | Standard_Integer& V2, |
59 | Standard_Integer& V3, |
60 | Standard_Real& Xn, |
61 | Standard_Real& Yn, |
62 | Standard_Real& Zn) const |
63 | { |
64 | V1 = MyV1; |
65 | V2 = MyV2; |
66 | V3 = MyV3; |
67 | Xn = MyXn; |
68 | Yn = MyYn; |
69 | Zn = MyZn; |
70 | } |
71 | |
72 | //======================================================================= |
73 | //function : SetVertexAndOrientation |
74 | //design : |
75 | //warning : |
76 | //======================================================================= |
77 | |
78 | void StlMesh_MeshTriangle::SetVertexAndOrientation(const Standard_Integer V1, const Standard_Integer V2, |
79 | const Standard_Integer V3, const Standard_Real Xn, |
80 | const Standard_Real Yn, const Standard_Real Zn) |
81 | { |
82 | MyV1 = V1; |
83 | MyV2 = V2; |
84 | MyV3 = V3; |
85 | MyXn = Xn; |
86 | MyYn = Yn; |
87 | MyZn = Zn; |
88 | } |
89 | |
90 | //======================================================================= |
91 | //function : GetVertex |
92 | //design : |
93 | //warning : |
94 | //======================================================================= |
95 | |
96 | void StlMesh_MeshTriangle::GetVertex(Standard_Integer& V1, Standard_Integer& V2, Standard_Integer& V3) const |
97 | { |
98 | V1 = MyV1; |
99 | V2 = MyV2; |
100 | V3 = MyV3; |
101 | } |
102 | |
103 | //======================================================================= |
104 | //function : SetVertex |
105 | //design : |
106 | //warning : |
107 | //======================================================================= |
108 | |
109 | void StlMesh_MeshTriangle::SetVertex(const Standard_Integer V1, const Standard_Integer V2, const Standard_Integer V3) |
110 | { |
111 | MyV1 = V1; |
112 | MyV2 = V2; |
113 | MyV3 = V3; |
114 | } |
115 | |
116 | |
117 | |