Subversion Repositories gelsvn

Rev

Rev 365 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 365 Rev 439
Line 13... Line 13...
13
using namespace Util;
13
using namespace Util;
14
using namespace HMesh;
14
using namespace HMesh;
15
using namespace std;
15
using namespace std;
16
using namespace Geometry;
16
using namespace Geometry;
17
 
17
 
18
bool cuberille;
18
bool cuberille=true;
19
float iso = 40; 
19
float iso = 40; 
20
string file;
20
string file;
21
string ofile;
21
string ofile;
22
 
22
 
23
template<class T>
23
template<class T>
Line 45... Line 45...
45
{
45
{
46
		ArgExtracter ae(argc, argv);
46
		ArgExtracter ae(argc, argv);
47
 
47
 
48
		if(ae.no_remaining_args() == 1 || ae.extract("-h"))
48
		if(ae.no_remaining_args() == 1 || ae.extract("-h"))
49
		{
49
		{
50
				cout << "Usage: volpoly [-C] [-i <iso>] [-x <X>] [-y <Y>] [-z <Z>] " 
50
				cout << "Usage: volpoly [-M] [-i <iso>] [-x <X>] [-y <Y>] [-z <Z>] " 
51
						 << "[-S|-f|-U|-b] raw-volume-file" << endl;
51
						 << "[-S|-f|-U|-b] raw-volume-file" << endl;
52
				cout << "where -C implies that the cuberille method rather than\n"
52
				cout << "where -M means that\n"
53
						 << "marching cubes should be used. -S -f -U -b indicate that\n"
53
						 << "marching cubes should be used instead of cuberille meshing. -S -f -U -b indicate that\n"
54
						 << "the volume is in short, float, unsigned short or unsigned\n"
54
						 << "the volume is in short, float, unsigned short or unsigned\n"
55
						 << "byte format" << endl;
55
						 << "byte format" << endl;
56
				exit(0);
56
				exit(0);
57
		}
57
		}
58
 
58
 
59
		cuberille = ae.extract("-C");
59
		cuberille = !ae.extract("-M");
60
		ae.extract("-i", iso);
60
		ae.extract("-i", iso);
61
		int X  = 128;
61
		int X  = 128;
62
		ae.extract("-x", X);
62
		ae.extract("-x", X);
63
		int Y  = 128;
63
		int Y  = 128;
64
		ae.extract("-y", Y);
64
		ae.extract("-y", Y);