MeshKit
1.0
|
00001 #ifndef __HARMONICMAPPER_HPP 00002 #define __HARMONICMAPPER_HPP 00003 00004 #include <stdlib.h> 00005 #include <stdio.h> 00006 #include <assert.h> 00007 #include <string> 00008 #include <iostream> 00009 #include <fstream> 00010 #include <string.h> 00011 #include <limits.h> 00012 00013 #include "meshkit/MKCore.hpp" 00014 #include "meshkit/iMesh.hpp" 00015 #include "meshkit/iGeom.hpp" 00016 #include "meshkit/iRel.hpp" 00017 #include "meshkit/MeshOp.hpp" 00018 #include "meshkit/ModelEnt.hpp" 00019 #include "meshkit/SimpleArray.hpp" 00020 #include "Global.hpp" 00021 #include <armadillo> 00022 #include <set> 00023 #include <vector> 00024 #include <map> 00025 00026 00027 using namespace std; 00028 using namespace arma; 00029 00030 namespace MeshKit { 00031 00032 class HarmonicMapper 00033 { 00034 public: 00035 //public function 00036 HarmonicMapper(MKCore* core, vector<Vertex> &v, vector<Face> &t, vector<Edge> &e, vector<set<int> > a); 00037 ~HarmonicMapper(); 00038 void execute(); 00039 void getUV(vector<Vertex> &v); 00040 00041 private: 00042 void _iterative_map(double epsilon); 00043 void _map(); 00044 00045 00046 private: 00047 //member variables 00048 MKCore* mk_core; 00049 vector<set<int> > adj; 00050 vector<Vertex> vtx; 00051 vector<Edge> edges; 00052 vector<Face> tri; 00053 00054 }; 00055 00056 } 00057 #endif 00058