Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

ClusterMeshInterrogator.h

Go to the documentation of this file.
00001 /*
00002 @file ClusterMeshInterrogator.h
00003 @author Wen Su
00004 Particles are clusters on the mesh
00005 */
00006 
00007 #ifndef CLUSTERMESHINTERROGATOR_H
00008 #define CLUSTERMESHINTERROGATOR_H
00009 
00010 #include "Particles.h"
00011 #include "SurfaceInterrogator.h"
00012 #include "ParticleBehavior.h"
00013 #include "OpenMesh/ClusterMesh.h"
00014 #include <vector>
00015 
00016 class ClusterMeshInterrogator : public ParticleBehavior
00017 {
00018 public:
00019         MAKE_PARTICLESTUFF_NAME();
00020 
00021         /// different phase of the algorithm
00022         enum ClusterPhase {INITIALIZE, ASSIGNNEWCENTERS, EXPANDCLUSTERS, FINDCLUSTERCENTERS};
00023         ClusterPhase phase;
00024 
00025         /// the position is stored in particle position this stores the face handles.
00026         std::vector <ClusterOpenMesh::FaceHandle> clusterCenters;
00027 
00028         /// this vector will be used as a heap to do the Dijkstra walk
00029         std::vector <ClusterOpenMesh::FaceHandle> costHeap;
00030 
00031         /// stores the last face that is added to this cluster
00032         std::vector <ClusterOpenMesh::FaceHandle> lastFaceInCluster;
00033 
00034         /// last face that is added to the last iteration
00035         ClusterOpenMesh::FaceHandle lastFace;
00036 
00037         /// parameters
00038         unsigned int iteration;
00039         unsigned int minClusters;
00040         unsigned int maxClusters;
00041         int restartAlgorithm;
00042 
00043         /// pointer to the surface mesh
00044         SurfaceInterrogator* surInt;
00045 
00046         /// default constructor
00047         ClusterMeshInterrogator(Particles *ps=NULL);
00048 
00049         /// cleanup does the clustering step
00050         virtual void cleanup();
00051 
00052         virtual void attachAttributes();
00053 
00054         /// parameters
00055         int qlen();
00056         void getq(double *q);
00057         void setq(double *q);
00058         void qname(char **qn);
00059 
00060 };
00061 
00062 #endif

Generated on Mon Jun 28 14:58:13 2004 for Advanced Surface Library by doxygen 1.3.4