version update
This commit is contained in:
35
src/main.cc
35
src/main.cc
@@ -6,18 +6,19 @@ void disp_help(char* proname){
|
||||
" -d<minimal-depth>/<maximal-depth> \
|
||||
[-r'WGS84'|'Earth'|'Moon'|<equator-radius>/<pole-radius>|<equator_radius>,<flat-rate>] \
|
||||
[-o<orient-longitude>/<orient-latitude>] \
|
||||
[-m<output-msh-filename>] \
|
||||
[-v<output-vert-loc-filename>] \
|
||||
[-t<output-tri-cen-filename>] \
|
||||
[-n<output-tri-neg-filename>] \
|
||||
[-p<control-point-filename>] \
|
||||
[-l<control-line-filename>] \
|
||||
[-g<control-poly-filename>] \
|
||||
[-c<control-circle-filename>] \
|
||||
[-s<outline-shape-filename>] \
|
||||
[-k<hole-shape-filename>] \
|
||||
[-m<output-msh-file>] \
|
||||
[-v<output-vert-loc-file>] \
|
||||
[-t<output-tri-cen-file>] \
|
||||
[-n<output-tri-neg-file>] \
|
||||
[-p<control-point-file>] \
|
||||
[-l<control-line-file>] \
|
||||
[-g<control-poly-filen>] \
|
||||
[-c<control-circle-file>] \
|
||||
[-s<outline-shape-file>] \
|
||||
[-k<hole-shape-file>] \
|
||||
[-z<control-topography-file>] \
|
||||
[-h]";
|
||||
clog << proname << " - v1.3 A generator of the Spherical Triangular Tessellation (STT)." << endl;
|
||||
clog << proname << " - v1.4 A generator of the Spherical Triangular Tessellation (STT)." << endl;
|
||||
clog << "Usage: " << exe_name << endl;
|
||||
clog << "Options:" << endl;
|
||||
clog << "\t-d\tMinimal and maximal quad-tree depths of the output STT." << endl;
|
||||
@@ -33,6 +34,7 @@ void disp_help(char* proname){
|
||||
clog << "\t-c\tInput control circle location(.txt) filename." << endl;
|
||||
clog << "\t-s\tInput outline polygon location(.txt) filename." << endl;
|
||||
clog << "\t-k\tInput hole polygon location(.txt) filename." << endl;
|
||||
clog << "\t-z\tInput topography(.txt) filename." << endl;
|
||||
clog << "\t-h\tShow help information." << endl;
|
||||
}
|
||||
|
||||
@@ -50,9 +52,10 @@ int main(int argc, char* argv[]){
|
||||
9 -> input filename for polygon constraints
|
||||
10-> input filename for circle constraints
|
||||
11-> input filename for outline shape constraints
|
||||
12-> input filename for hole shape constraints*/
|
||||
char input_options[13][1024];
|
||||
for (int i = 0; i < 13; i++){
|
||||
12-> input filename for hole shape constraints
|
||||
13-> input filename for topography constraints*/
|
||||
char input_options[14][1024];
|
||||
for (int i = 0; i < 14; i++){
|
||||
strcpy(input_options[i],"NULL");
|
||||
}
|
||||
|
||||
@@ -63,7 +66,7 @@ int main(int argc, char* argv[]){
|
||||
}
|
||||
|
||||
int curr, option_number;
|
||||
while((curr = getopt(argc,argv,"hd:r:o:m:v:t:n:p:l:g:c:s:k:")) != -1){
|
||||
while((curr = getopt(argc,argv,"hd:r:o:m:v:t:n:p:l:g:c:s:k:z:")) != -1){
|
||||
// get option number
|
||||
switch (curr){
|
||||
case 'h': // show help information
|
||||
@@ -94,6 +97,8 @@ int main(int argc, char* argv[]){
|
||||
option_number =11; break;
|
||||
case 'k':
|
||||
option_number =12; break;
|
||||
case 'z':
|
||||
option_number =13; break;
|
||||
case '?': //处理未定义或错误参数
|
||||
if (optopt == 'd' || optopt == 'r' || optopt == 'o' || optopt == 'm' || optopt == 'n'
|
||||
|| optopt == 'v' || optopt == 't' || optopt == 'p' || optopt == 'l'
|
||||
|
||||
Reference in New Issue
Block a user