CFx SDK Documentation  2020SP3
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__
GiMesh::TrVertex
Definition: GiTrMeshSew.h:41
GiMesh::TrMeshSew::sewEdges
void sewEdges()
tol
tol
Definition: DimVarDefs.h:2287
GiMesh::TrMeshSew::TrMeshSew
TrMeshSew(GeMesh::OdGeTrMesh *pMesh, double tol=1e-3)
GeTrMeshSimplification.h
SiSpatialIndex.h
TD_PackPop.h
ODGI_EXPORT
#define ODGI_EXPORT
Definition: GiExport.h:35
GiMesh::TrEdge::set
void set(const OdGePoint3d *_pt1, const OdGePoint3d *_pt2, int iTr, int iEd)
Definition: GiTrMeshSew.h:63
index
GLuint index
Definition: gles2_ext.h:265
GiMesh::TrVertex::set
void set(const OdGePoint3d *_pt, int _index)
Definition: GiTrMeshSew.h:46
OdSiEntity
Definition: SiSpatialIndex.h:81
OdSmartPtr< OdSiSpatialIndex >
OdGePoint3d
Definition: GePoint3d.h:55
GiMesh::TrMeshSew::m_pSpatialIndexEdge
OdSiSpatialIndexPtr m_pSpatialIndexEdge
Definition: GiTrMeshSew.h:86
GiMesh::TrEdge::pt1
const OdGePoint3d * pt1
Definition: GiTrMeshSew.h:58
GiMesh::TrEdge
Definition: GiTrMeshSew.h:56
GiMesh::TrEdge::indexTr
int indexTr
Definition: GiTrMeshSew.h:60
GeMesh::OdGeTrMesh
Definition: GeTrMeshSimplification.h:80
GiMesh::TrEdge::pt2
const OdGePoint3d * pt2
Definition: GiTrMeshSew.h:59
TD_PackPush.h
OdLinkedArray.h
GiMesh::TrVertex::extents
bool extents(OdGeExtents3d &extents) const
Definition: GiTrMeshSew.h:48
GiMesh::TrVertex::pt
const OdGePoint3d * pt
Definition: GiTrMeshSew.h:43
GiMesh::TrMeshSew::tolSew
double tolSew
Definition: GiTrMeshSew.h:91
GiMesh::TrMeshSew::joinVertexes
void joinVertexes()
GiMesh::TrMeshSew::m_aEdgeSI
OdLinkedArray< TrEdge > m_aEdgeSI
Definition: GiTrMeshSew.h:84
OdGeExtents3d
Definition: GeExtents3d.h:45
GiMesh::TrMeshSew::m_pSpatialIndexVx
OdSiSpatialIndexPtr m_pSpatialIndexVx
Definition: GiTrMeshSew.h:85
GiConveyorNode.h
GiMesh::TrMeshSew
Definition: GiTrMeshSew.h:74
GiMesh::TrMeshSew::sewVertexes
void sewVertexes()
OdLinkedArray
Definition: OdLinkedArray.h:32
GiMesh::TrMeshSew::m_aVertexSI
OdLinkedArray< TrVertex > m_aVertexSI
Definition: GiTrMeshSew.h:83
GiMesh::TrVertex::index
int index
Definition: GiTrMeshSew.h:44
GiMesh
Definition: GiTrMeshSew.h:38
GiMesh::TrEdge::indexEdge
int indexEdge
Definition: GiTrMeshSew.h:61
GiMesh::TrEdge::extents
bool extents(OdGeExtents3d &extents) const
Definition: GiTrMeshSew.h:65
GiMesh::TrMeshSew::m_pMesh
GeMesh::OdGeTrMesh * m_pMesh
Definition: GiTrMeshSew.h:82
GeDoubleArray.h