CFx SDK Documentation  2023 SP0
GiTrMeshSew.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 
25 
26 #ifndef __OD_GI_TRMESHSEW__
27 #define __OD_GI_TRMESHSEW__
28 
29 #include "Ge/GeDoubleArray.h"
30 #include "Gi/GiConveyorNode.h"
31 #include "Si/SiSpatialIndex.h"
33 #include "OdLinkedArray.h"
34 
35 #include "TD_PackPush.h"
36 
37 namespace GiMesh
38 {
39 
41 {
42 public:
43  const OdGePoint3d* pt;
44  int index;
45 
46  void set(const OdGePoint3d* _pt, int _index) { pt = _pt; index = _index; }
47 
49  {
50  extents.set(*pt, *pt);
51  return true;
52  }
53 };
54 
56 {
57 public:
58  const OdGePoint3d* pt1;
59  const OdGePoint3d* pt2;
60  int indexTr;
61  int indexEdge;
62 
63  void set(const OdGePoint3d* _pt1, const OdGePoint3d* _pt2, int iTr, int iEd) { pt1 = _pt1; pt2 = _pt2; indexTr = iTr; indexEdge = iEd; }
64 
66  {
67  extents.set(*pt1, *pt1);
68  extents.addPoint(*pt2);
69  return true;
70  }
71 };
72 
74 {
75 public:
76  TrMeshSew(GeMesh::OdGeTrMesh* pMesh, double tol = 1e-3);
77  void joinVertexes();
78  void sewVertexes();
79  void sewEdges();
80 
81 public:
87 
88  // vector to assign vertices to triangles
89  //OdArray<OdArray<GeMesh::intPair > > m_vxToTr;
90 
91  double tolSew;
92 };
93 
94 }
95 
96 #include "TD_PackPop.h"
97 
98 #endif // __OD_GI_TRMESHSEW__
tol
Definition: DimVarDefs.h:2287
#define ODGI_EXPORT
Definition: GiExport.h:35
OdLinkedArray< TrVertex > m_aVertexSI
Definition: GiTrMeshSew.h:83
OdSiSpatialIndexPtr m_pSpatialIndexEdge
Definition: GiTrMeshSew.h:86
OdSiSpatialIndexPtr m_pSpatialIndexVx
Definition: GiTrMeshSew.h:85
GeMesh::OdGeTrMesh * m_pMesh
Definition: GiTrMeshSew.h:82
TrMeshSew(GeMesh::OdGeTrMesh *pMesh, double tol=1e-3)
OdLinkedArray< TrEdge > m_aEdgeSI
Definition: GiTrMeshSew.h:84
GLuint index
Definition: gles2_ext.h:265
void set(const OdGePoint3d *_pt1, const OdGePoint3d *_pt2, int iTr, int iEd)
Definition: GiTrMeshSew.h:63
bool extents(OdGeExtents3d &extents) const
Definition: GiTrMeshSew.h:65
const OdGePoint3d * pt2
Definition: GiTrMeshSew.h:59
const OdGePoint3d * pt1
Definition: GiTrMeshSew.h:58
bool extents(OdGeExtents3d &extents) const
Definition: GiTrMeshSew.h:48
const OdGePoint3d * pt
Definition: GiTrMeshSew.h:43
void set(const OdGePoint3d *_pt, int _index)
Definition: GiTrMeshSew.h:46