Subversion Repositories gelsvn

Rev

Rev 136 | Rev 417 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 136 Rev 385
Line 8... Line 8...
8
 
8
 
9
J. Andreas Bærentzen 2003.
9
J. Andreas Bærentzen 2003.
10
 
10
 
11
**********************************************************************/
11
**********************************************************************/
12
 
12
 
-
 
13
#include <string>
13
#include <stdlib.h>
14
#include <stdlib.h>
14
#include <math.h>
15
#include <math.h>
15
#include <iostream>
16
#include <iostream>
16
#include <vector>
17
#include <vector>
17
#include <list>
18
#include <list>
Line 649... Line 650...
649
			/* find point on surface, beginning search at (x, y, z): */
650
			/* find point on surface, beginning search at (x, y, z): */
650
			srand(1);
651
			srand(1);
651
			in = find(1, x, y, z);
652
			in = find(1, x, y, z);
652
			out = find(0, x, y, z);
653
			out = find(0, x, y, z);
653
			if (!in.ok || !out.ok) 
654
			if (!in.ok || !out.ok) 
-
 
655
            {
654
				throw(string("can't find starting point"));
656
                exit(1);
655
  
657
            }
656
			converge(&in.p, &out.p, in.value, function, &start);
658
			converge(&in.p, &out.p, in.value, function, &start);
657
  
659
  
658
			/* push initial cube on stack: */
660
			/* push initial cube on stack: */
659
			CUBE cube;
661
			CUBE cube;
660
			cube.i = cube.j = cube.k = 0;
662
			cube.i = cube.j = cube.k = 0;
Line 680... Line 682...
680
						dotet(&c, RTN, LBF, LTF, RBF) &&
682
						dotet(&c, RTN, LBF, LTF, RBF) &&
681
						dotet(&c, RTN, LTF, RTF, RBF)
683
						dotet(&c, RTN, LTF, RTF, RBF)
682
						:
684
						:
683
						/* or polygonize the cube directly: */
685
						/* or polygonize the cube directly: */
684
						docube(&c);
686
						docube(&c);
685
					if (! noabort) throw string("aborted");
687
                        if (! noabort) {
-
 
688
                           exit(1);
-
 
689
                        }
686
      
690
      
687
					/* pop current cube from stack */
691
					/* pop current cube from stack */
688
					cubes.pop_front();
692
					cubes.pop_front();
689
      
693
      
690
					/* test six face directions, maybe add to stack: */
694
					/* test six face directions, maybe add to stack: */