1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
//-----------------------------------C++-------------------------------------//
// File: src/algs/Global.hpp
// Wednesday February 11 10:50 2011
// Brief: HarmonicMap class definition: do the harmonic mapping for the surface
//        mesh 
//---------------------------------------------------------------------------//


#ifndef GLOBAL1_HPP
#define GLOBAL1_HPP

#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <string>
#include <iostream>
#include <fstream>
#include <string.h>
#include <limits.h>
#include "meshkit/SimpleArray.hpp"

#include <iGeom.h>
#include "meshkit/Matrix.hpp"
#include <vector>
#include <set>
#include <list>


using namespace std;
typedef MeshKit::Vector<3> Vector3D;
typedef MeshKit::Vector<2> Vector2D;
typedef MeshKit::Matrix<3, 3> Matrix3D;

//===========================================================================//
  /*!
   * \class Global
   * \brief define the data structure for Sweeping
   * 
   */
//===========================================================================//
namespace MeshKit
{
static const double dist_tolerance = 1.0e-1;
static const double eps = 1.0e-5;
struct Vertex {
  Vertex()<--- Member variable 'Vertex::id' is not initialized in the constructor.<--- Member variable 'Vertex::index' is not initialized in the constructor.<--- Member variable 'Vertex::onCorner' is not initialized in the constructor.
  {
    onBoundary = 0;
  }
  int id;
  int index;
  bool onBoundary;
  Vector3D xyz;
  Vector2D uv;
  bool onCorner;
  iBase_EntityHandle gVertexHandle;
};
struct Edge {
  int getNumNodes() const
  {
    return connect.size();
  }
  Vertex* getVertex(int i) const
  {
    return connect[i];
  }
  vector<Vertex*> connect;//could be 1 or 2
  iBase_EntityHandle gEdgeHandle;
  int id;
  int index;
  int edge_type;//-1  corner, 0  side, 1  end, -2  reversal
  double e;
};

struct Face {
  int getNumNodes() const
  {
    return connect.size();
  }
  Vertex* getVertex(int i) const
  {
    return connect[i];
  }
  int index;
  vector<Vertex*> connect;
  vector<Edge*> connEdges;
  vector<vector<int> > vertexloops;
  vector<vector<int> > edgeloops;
  iBase_EntityHandle gFaceHandle;
  int src_tgt_link;//0--source, 1--target, 2--linking
};

}

#endif