This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <OpenGL/OpenGL.h> | |
#include <GLUT/GLUT.h> | |
#include "opencv2/opencv.hpp" | |
#include "opencv2/highgui.hpp" | |
#include "opencv2/imgcodecs.hpp" | |
const int WindowSize = 600; | |
void display(void){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "CIsoSurface.h" | |
using namespace std; | |
int main() { | |
const int pnum = 2; | |
float field[pnum][pnum][pnum] = {1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; | |
CIsoSurface<float> *ciso = new CIsoSurface<float>(); | |
ciso->GenerateSurface(&field[0][0][0], 0.5, pnum - 1, pnum - 1, pnum - 1, 1.0, 1.0, 1.0); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <class T> | |
void CIsoSurface<T>::PrintVTK(int step, string _foldername) { | |
if(!IsSurfaceValid()) { | |
cout << "Isosurface is not valid!" << endl; | |
exit(1); | |
} | |
ostringstream oss_step; | |
oss_step.setf(ios::right); | |
oss_step.fill('0'); | |
oss_step.width(8); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ArrayList<Seed> seeds; | |
ArrayList<Particle> particles; | |
ArrayList<Integer> changes; | |
int i, j; | |
int count; | |
float dx; | |
float dy; | |
float dist; | |
float mindist; | |
int minnum; |