43 #include <visp3/core/vpConfig.h>
45 #ifndef DOXYGEN_SHOULD_SKIP_THIS
60 void fprintf_Position(FILE *f, AritPosition *pp)
62 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,
63 pp->scale.x, pp->scale.y, pp->scale.z, pp->translate.x, pp->translate.y, pp->translate.z);
71 void fscanf_Point3f(Point3f *pp)
73 static const char *err_tbl[] = {
"float expected (coordinate ",
" of point)" };
78 if ((t = lex()) != T_FLOAT && t != T_INT)
79 lexerr(
"start", err_tbl[0],
"X", err_tbl[1], NULL);
80 pp->x = (t == T_INT) ? (
float)myint : myfloat;
84 if ((t = lex()) != T_FLOAT && t != T_INT)
85 lexerr(
"start", err_tbl[0],
"Y", err_tbl[1], NULL);
86 pp->y = (t == T_INT) ? (
float)myint : myfloat;
90 if ((t = lex()) != T_FLOAT && t != T_INT)
91 lexerr(
"start", err_tbl[0],
"Z", err_tbl[1], NULL);
92 pp->z = (t == T_INT) ? (
float)myint : myfloat;
100 void fscanf_Vector(Vector *vp)
102 static const char *err_tbl[] = {
"float expected (coordinate ",
" of vector)" };
108 if ((t = lex()) != T_FLOAT && t != T_INT)
109 lexerr(
"start", err_tbl[0],
"X", err_tbl[1], NULL);
110 vp->x = (t == T_INT) ? (
float)myint : myfloat;
114 if ((t = lex()) != T_FLOAT && t != T_INT)
115 lexerr(
"start", err_tbl[0],
"Y", err_tbl[1], NULL);
116 vp->y = (t == T_INT) ? (
float)myint : myfloat;
120 if ((t = lex()) != T_FLOAT && t != T_INT)
121 lexerr(
"start", err_tbl[0],
"Z", err_tbl[1], NULL);
122 vp->z = (t == T_INT) ? (
float)myint : myfloat;
130 void fscanf_Position(AritPosition *pp)
133 fscanf_Vector(&pp->rotate);
135 fscanf_Vector(&pp->scale);
136 popuperr(
"translate: ");
137 fscanf_Vector(&pp->translate);