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 #define PI 3.1415926536
00028 
00029 
00030 
00031 using namespace std;
00032 typedef MeshKit::Vector<3> Vector3D;
00033 typedef MeshKit::Vector<2> Vector2D;
00034 typedef MeshKit::Matrix<3, 3> Matrix3D;
00035 
00036 //===========================================================================//
00042 //===========================================================================//
00043 namespace MeshKit
00044 {
00045 
00046 struct Vertex {
00047   Vertex()
00048   {
00049     onBoundary = 0;
00050   }
00051   int id;
00052   int index;
00053   bool onBoundary;
00054   Vector3D xyz;
00055   Vector2D uv;
00056   bool onCorner;
00057   iBase_EntityHandle gVertexHandle;
00058 };
00059 struct Edge {
00060   int getNumNodes() const
00061   {
00062     return connect.size();
00063   }
00064   Vertex* getVertex(int i) const
00065   {
00066     return connect[i];
00067   }
00068   vector<Vertex*> connect;//could be 1 or 2
00069   iBase_EntityHandle gEdgeHandle;
00070   int id;
00071   int index;
00072   int edge_type;//-1  corner, 0  side, 1  end, -2  reversal
00073   double e;
00074 };
00075 
00076 struct Face {
00077   int getNumNodes() const
00078   {
00079     return connect.size();
00080   }
00081   Vertex* getVertex(int i) const
00082   {
00083     return connect[i];
00084   }
00085   int index;
00086   vector<Vertex*> connect;
00087   vector<Edge*> connEdges;
00088   vector<vector<int> > vertexloops;
00089   vector<vector<int> > edgeloops;
00090   iBase_EntityHandle gFaceHandle;
00091   int src_tgt_link;//0--source, 1--target, 2--linking
00092 };
00093 
00094 }
00095 
00096 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines