00001
00002
00003
00004 #ifndef REFRACTORY_H
00005 #define REFRACTORY_H 1
00006
00007 #include <list>
00008
00009 #include "meshmorph.h"
00010
00011 typedef std::list<Vertex*> v_list;
00012 typedef std::list<Vertex*>::iterator vl_it;
00013 typedef std::map<Vertex*,int,ltv> map_i;
00014 typedef std::map<Vertex*,int,ltv>::iterator ti_it;
00015
00016 class Refractory
00017 {
00018 private:
00019
00020
00021
00022
00023
00024
00025
00026
00027 vec_vp small_disp;
00028 vec_vp n;
00029 vec_vp face_int;
00030 vec_vp ang;
00031 vec_vp oct;
00032
00033 map_i vert_move_distr;
00034
00035
00036 static Refractory * only_one;
00037 Refractory (void);
00038 Refractory (Refractory const &);
00039 Refractory & operator = (Refractory const &);
00040 ~Refractory (void);
00041 public:
00042 static Refractory & instance (void);
00043 int numRecordedVertexMoves (Vertex *);
00044 int getNumVertRefractedN (void) const;
00045 int getNumVertRefractedInt (void) const;
00046 int getNumVertRefractedAng (void) const;
00047 int getNumVertRefractedSmallDisp (void) const;
00048 int getNumVertRefractedOctreeVio (void) const;
00049 bool isRefracted (Vertex * const);
00050 bool vertexIsMoveCandidate (Vertex * const v);
00051 bool vertexMovesAreRecorded (Vertex *);
00052 void refractVertexForSmallDispVio (Vertex * const);
00053 void refractVertexForIntVio (Vertex * const);
00054 void refractVertforAngleVio (Vertex * const);
00055 void refractVertforOctreeVio (Vertex *v);
00056 void refractVertForNumVio (Vertex * const);
00057 void updateVertMoveDistr (Vertex * const,ti_it &);
00058
00059 void enforceMaxdisplacement (Vertex * const,vector3 &);
00060 void updateSuccessfulMove (const int &,Vertex * const);
00061 void resetForNewGroup (void);
00062 vp_cit getNextVertex (const int & group,vp_cit,bool const,bool const,bool const);
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073 vp_cit beginN (void) const;
00074 vp_cit endN (void) const;
00075 vp_cit beginInt (void) const;
00076 vp_cit endInt (void) const;
00077 vp_cit beginAng (void) const;
00078 vp_cit endAng (void) const;
00079 vp_cit beginSmallDisp (void) const;
00080 vp_cit endSmallDisp (void) const;
00081 vp_cit beginOctreeVio (void) const;
00082 vp_cit endOctreeVio (void) const;
00083 };
00084
00085 #endif