13 bool eatwhitespace ( std::istream & is ) {
33 std::cerr <<
"istream mysteriously lost a putback character!\n";
43 double & x,
double & y,
double &
z ) {
51 bool parenthesis =
false;
53 if ( !eatwhitespace(is) ) {
54 std::cerr <<
"istream ended before trying to input " << type <<
"\n";
58 if ( !is.get(c) ) { fouledup();
return; }
61 if ( !eatwhitespace(is) ) {
62 std::cerr <<
"istream ended after ( trying to input " << type <<
"\n";
73 std::cerr <<
"Could not read first value in input of " << type <<
"\n";
77 if ( !eatwhitespace(is) ) {
78 std::cerr <<
"istream ended before second value of " << type <<
"\n";
82 if ( !is.get(c) ) { fouledup();
return; }
84 if ( !eatwhitespace(is) ) {
85 std::cerr <<
"istream ended ater one value and comma in "
97 std::cerr <<
"Could not read second value in input of " << type <<
"\n";
101 if ( !eatwhitespace(is) ) {
102 std::cerr <<
"istream ended before third value of " << type <<
"\n";
106 if ( !is.get(c) ) { fouledup();
return; }
108 if ( !eatwhitespace(is) ) {
109 std::cerr <<
"istream ended ater two values and comma in "
121 std::cerr <<
"Could not read third value in input of " << type <<
"\n";
128 if ( !eatwhitespace(is) ) {
129 std::cerr <<
"No closing parenthesis in input of " << type <<
"\n";
132 if ( !is.get(c) ) { fouledup();
return; }
134 std::cerr <<
"Missing closing parenthesis in input of "
139 if ( isdigit(c) || (c==
'-') || (c==
'+') ) {
157 double & x,
double & y,
double &
z,
171 bool parenthesis =
false;
173 if ( !eatwhitespace(is) ) {
174 std::cerr <<
"istream ended before trying to input AxisAngle \n";
178 if ( !is.get(c) ) { fouledup();
return; }
181 if ( !eatwhitespace(is) ) {
182 std::cerr <<
"istream ended after ( trying to input AxisAngle \n";
195 if ( !eatwhitespace(is) ) {
196 std::cerr <<
"istream ended before delta of AxisAngle \n";
200 if ( !is.get(c) ) { fouledup();
return; }
202 if ( !eatwhitespace(is) ) {
203 std::cerr <<
"istream ended ater axis and comma in AxisAngle \n";
213 if (!(is >> delta)) {
214 std::cerr <<
"Could not delta value in input of AxisAngle \n";
221 if ( !eatwhitespace(is) ) {
222 std::cerr <<
"No closing parenthesis in input of AxisAngle \n";
225 if ( !is.get(c) ) { fouledup();
return; }
227 std::cerr <<
"Missing closing parenthesis in input of AxisAngle \n";
228 if ( isdigit(c) || (c==
'-') || (c==
'+') ) {
244 double & x,
double & y ) {
252 bool parenthesis =
false;
254 if ( !eatwhitespace(is) ) {
255 std::cerr <<
"istream ended before trying to input " << type <<
"\n";
259 if ( !is.get(c) ) { fouledup();
return; }
262 if ( !eatwhitespace(is) ) {
263 std::cerr <<
"istream ended after ( trying to input " << type <<
"\n";
274 std::cerr <<
"Could not read first value in input of " << type <<
"\n";
278 if ( !eatwhitespace(is) ) {
279 std::cerr <<
"istream ended before second value of " << type <<
"\n";
283 if ( !is.get(c) ) { fouledup();
return; }
285 if ( !eatwhitespace(is) ) {
286 std::cerr <<
"istream ended ater one value and comma in "
298 std::cerr <<
"Could not read second value in input of " << type <<
"\n";
305 if ( !eatwhitespace(is) ) {
306 std::cerr <<
"No closing parenthesis in input of " << type <<
"\n";
309 if ( !is.get(c) ) { fouledup();
return; }
311 std::cerr <<
"Missing closing parenthesis in input of "
316 if ( isdigit(c) || (c==
'-') || (c==
'+') ) {
void ZMinputAxisAngle(std::istream &is, double &x, double &y, double &z, double &delta)
void ZMinput2doubles(std::istream &is, const char *type, double &x, double &y)
void ZMinput3doubles(std::istream &is, const char *type, double &x, double &y, double &z)