refractory.h

Go to the documentation of this file.
00001 // Author: Justin Kinney
00002 // Date: Sep 2008
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   // Four containers (small_disp,n,face_int,ang) are used where a single
00020   // container would accomplish same function, but this way provides
00021   // more detailed diagnostics infomation if needed.
00022 //  hmap_v  small_disp;  // vertex*s refracted because small move attempted
00023 //  hmap_v  n;           // vertex*s refracted because moved max # times
00024 //  hmap_v  face_int;    // vertex*s refracted because move results in face intersections
00025 //  hmap_v  ang;         // vertex*s refracted because move results in really small or large angle
00026 //  hmap_v  oct;         // vertex*s refracted because move results in breach of octree boundary
00027   vec_vp  small_disp;  // vertex*s refracted because small move attempted
00028   vec_vp  n;           // vertex*s refracted because moved max # times
00029   vec_vp  face_int;    // vertex*s refracted because move results in face intersections
00030   vec_vp  ang;         // vertex*s refracted because move results in really small or large angle
00031   vec_vp  oct;         // vertex*s refracted because move results in breach of octree boundary
00032 //  hmap_v vert_move_distr; // imap of vertex * to # times moved
00033   map_i vert_move_distr; // imap of vertex * to # times moved
00034 //  v_set   set_last_N_moved_verts;  // set  of last N vertices moved
00035 //  v_list  list_last_N_moved_verts; // list of last N vertices moved
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 //  void    updateLastNMovedVerts         (Vertex * const);
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 //  vhm_cit beginN                        (void) const;
00064 //  vhm_cit endN                          (void) const;
00065 //  vhm_cit beginInt                      (void) const;
00066 //  vhm_cit endInt                        (void) const;
00067 //  vhm_cit beginAng                      (void) const;
00068 //  vhm_cit endAng                        (void) const;
00069 //  vhm_cit beginSmallDisp                (void) const;
00070 //  vhm_cit endSmallDisp                  (void) const;
00071 //  vhm_cit beginOctreeVio                (void) const;
00072 //  vhm_cit endOctreeVio                  (void) const;
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

Generated on Fri Feb 13 13:58:10 2009 for meshmorph by  doxygen 1.5.1