42cf5bc1 |
1 | // Created on: 1995-09-21 |
2 | // Created by: Philippe GIRODENGO |
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 | #ifndef _StlMesh_MeshTriangle_HeaderFile |
18 | #define _StlMesh_MeshTriangle_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <Standard_Integer.hxx> |
24 | #include <Standard_Real.hxx> |
25 | #include <MMgt_TShared.hxx> |
26 | class Standard_NegativeValue; |
27 | |
28 | |
29 | class StlMesh_MeshTriangle; |
30 | DEFINE_STANDARD_HANDLE(StlMesh_MeshTriangle, MMgt_TShared) |
31 | |
32 | //! A mesh triangle is defined with |
33 | //! three geometric vertices and an orientation |
34 | class StlMesh_MeshTriangle : public MMgt_TShared |
35 | { |
36 | |
37 | public: |
38 | |
39 | |
40 | //! empty constructor |
41 | Standard_EXPORT StlMesh_MeshTriangle(); |
42 | |
43 | //! create a triangle defined with the indexes of its three vertices |
44 | //! and its orientation |
45 | //! Raised if V1, V2 or V3 is lower than zero |
46 | Standard_EXPORT StlMesh_MeshTriangle(const Standard_Integer V1, const Standard_Integer V2, const Standard_Integer V3, const Standard_Real Xn, const Standard_Real Yn, const Standard_Real Zn); |
47 | |
48 | //! get indexes of the three vertices (V1,V2,V3) and the orientation |
49 | Standard_EXPORT void GetVertexAndOrientation (Standard_Integer& V1, Standard_Integer& V2, Standard_Integer& V3, Standard_Real& Xn, Standard_Real& Yn, Standard_Real& Zn) const; |
50 | |
51 | //! set indexes of the three vertices (V1,V2,V3) and the orientation |
52 | //! Raised if V1, V2 or V3 is lower than zero |
53 | Standard_EXPORT void SetVertexAndOrientation (const Standard_Integer V1, const Standard_Integer V2, const Standard_Integer V3, const Standard_Real Xn, const Standard_Real Yn, const Standard_Real Zn); |
54 | |
55 | //! get indexes of the three vertices (V1,V2,V3) |
56 | Standard_EXPORT void GetVertex (Standard_Integer& V1, Standard_Integer& V2, Standard_Integer& V3) const; |
57 | |
58 | //! set indexes of the three vertices (V1,V2,V3) |
59 | //! Raised if V1, V2 or V3 is lower than zero |
60 | Standard_EXPORT void SetVertex (const Standard_Integer V1, const Standard_Integer V2, const Standard_Integer V3); |
61 | |
62 | |
63 | |
64 | |
92efcf78 |
65 | DEFINE_STANDARD_RTTIEXT(StlMesh_MeshTriangle,MMgt_TShared) |
42cf5bc1 |
66 | |
67 | protected: |
68 | |
69 | |
70 | |
71 | |
72 | private: |
73 | |
74 | |
75 | Standard_Integer MyV1; |
76 | Standard_Integer MyV2; |
77 | Standard_Integer MyV3; |
78 | Standard_Real MyXn; |
79 | Standard_Real MyYn; |
80 | Standard_Real MyZn; |
81 | |
82 | |
83 | }; |
84 | |
85 | |
86 | |
87 | |
88 | |
89 | |
90 | |
91 | #endif // _StlMesh_MeshTriangle_HeaderFile |