43 #include <visp3/core/vpConfig.h> 45 #ifndef DOXYGEN_SHOULD_SKIP_THIS 58 void fprintf_Position(FILE *f, AritPosition *pp)
60 fprintf(f,
"%.3f\t%.3f\t%.3f\n%.3f\t%.3f\t%.3f\n%.3f\t%.3f\t%.3f\n", pp->rotate.x, pp->rotate.y, pp->rotate.z,
61 pp->scale.x, pp->scale.y, pp->scale.z, pp->translate.x, pp->translate.y, pp->translate.z);
69 void fscanf_Point3f(Point3f *pp)
71 static const char *err_tbl[] = {
"float expected (coordinate ",
" of point)"};
76 if ((t = lex()) != T_FLOAT && t != T_INT)
77 lexerr(
"start", err_tbl[0],
"X", err_tbl[1], NULL);
78 pp->x = (t == T_INT) ? (
float)myint : myfloat;
82 if ((t = lex()) != T_FLOAT && t != T_INT)
83 lexerr(
"start", err_tbl[0],
"Y", err_tbl[1], NULL);
84 pp->y = (t == T_INT) ? (
float)myint : myfloat;
88 if ((t = lex()) != T_FLOAT && t != T_INT)
89 lexerr(
"start", err_tbl[0],
"Z", err_tbl[1], NULL);
90 pp->z = (t == T_INT) ? (
float)myint : myfloat;
98 void fscanf_Vector(Vector *
vp)
100 static const char *err_tbl[] = {
"float expected (coordinate ",
" of vector)"};
106 if ((t = lex()) != T_FLOAT && t != T_INT)
107 lexerr(
"start", err_tbl[0],
"X", err_tbl[1], NULL);
108 vp->x = (t == T_INT) ? (
float)myint : myfloat;
112 if ((t = lex()) != T_FLOAT && t != T_INT)
113 lexerr(
"start", err_tbl[0],
"Y", err_tbl[1], NULL);
114 vp->y = (t == T_INT) ? (
float)myint : myfloat;
118 if ((t = lex()) != T_FLOAT && t != T_INT)
119 lexerr(
"start", err_tbl[0],
"Z", err_tbl[1], NULL);
120 vp->z = (t == T_INT) ? (
float)myint : myfloat;
128 void fscanf_Position(AritPosition *pp)
131 fscanf_Vector(&pp->rotate);
133 fscanf_Vector(&pp->scale);
134 popuperr(
"translate: ");
135 fscanf_Vector(&pp->translate);