MeshKit  1.0
Global.hpp
Go to the documentation of this file.
00001 //-----------------------------------C++-------------------------------------//
00002 // File: src/algs/Global.hpp
00003 // Wednesday February 11 10:50 2011
00004 // Brief: HarmonicMap class definition: do the harmonic mapping for the surface
00005 //        mesh 
00006 //---------------------------------------------------------------------------//
00007 
00008 
00009 #ifndef GLOBAL1_HPP
00010 #define GLOBAL1_HPP
00011 
00012 #include <stdlib.h>
00013 #include <stdio.h>
00014 #include <assert.h>
00015 #include <string>
00016 #include <iostream>
00017 #include <fstream>
00018 #include <string.h>
00019 #include <limits.h>
00020 #include "meshkit/SimpleArray.hpp"
00021 
00022 #include <iGeom.h>
00023 #include "meshkit/Matrix.hpp"
00024 #include <vector>
00025 #include <set>
00026 #include <list>
00027 
00028 
00029 using namespace std;
00030 typedef MeshKit::Vector<3> Vector3D;
00031 typedef MeshKit::Vector<2> Vector2D;
00032 typedef MeshKit::Matrix<3, 3> Matrix3D;
00033 
00034 //===========================================================================//
00040 //===========================================================================//
00041 namespace MeshKit
00042 {
00043 static const double dist_tolerance = 1.0e-1;
00044 static const double eps = 1.0e-5;
00045 struct Vertex {
00046   Vertex()
00047   {
00048     onBoundary = 0;
00049   }
00050   int id;
00051   int index;
00052   bool onBoundary;
00053   Vector3D xyz;
00054   Vector2D uv;
00055   bool onCorner;
00056   iBase_EntityHandle gVertexHandle;
00057 };
00058 struct Edge {
00059   int getNumNodes() const
00060   {
00061     return connect.size();
00062   }
00063   Vertex* getVertex(int i) const
00064   {
00065     return connect[i];
00066   }
00067   vector<Vertex*> connect;//could be 1 or 2
00068   iBase_EntityHandle gEdgeHandle;
00069   int id;
00070   int index;
00071   int edge_type;//-1  corner, 0  side, 1  end, -2  reversal
00072   double e;
00073 };
00074 
00075 struct Face {
00076   int getNumNodes() const
00077   {
00078     return connect.size();
00079   }
00080   Vertex* getVertex(int i) const
00081   {
00082     return connect[i];
00083   }
00084   int index;
00085   vector<Vertex*> connect;
00086   vector<Edge*> connEdges;
00087   vector<vector<int> > vertexloops;
00088   vector<vector<int> > edgeloops;
00089   iBase_EntityHandle gFaceHandle;
00090   int src_tgt_link;//0--source, 1--target, 2--linking
00091 };
00092 
00093 }
00094 
00095 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines