45 #include "vpTmstack.h"
49 #include <visp3/core/vpConfig.h>
51 #ifndef DOXYGEN_SHOULD_SKIP_THIS
56 static Matrix stack[STACKSIZE];
57 static Matrix *sp = stack;
79 load_tmstack (Matrix m)
82 memmove ((
char *) *sp, (
char *) m,
sizeof (Matrix));
93 static char proc_name[] =
"pop_tmstack";
94 fprintf (stderr,
"%s: stack underflow\n", proc_name);
107 if (sp == stack + STACKSIZE - 1) {
108 static char proc_name[] =
"push_tmstack";
109 fprintf (stderr,
"%s: stack overflow\n", proc_name);
114 memmove ((
char *) sp, (
char *) (sp - 1),
sizeof (Matrix));
126 mp = (sp == stack) ? sp + 1 : sp - 1;
130 memmove ((
char *) tmp, (
char *) *sp,
sizeof (Matrix));
131 memmove ((
char *) *sp, (
char *) *mp,
sizeof (Matrix));
132 memmove ((
char *) *mp, (
char *) tmp,
sizeof (Matrix));
142 postmult_tmstack (Matrix m)
144 postmult_matrix (*sp, m);
154 postrotate_tmstack (Vector *vp)
158 Rotate_to_Matrix (vp, m);
159 postmult3_matrix (*sp, m);
169 postscale_tmstack (Vector *vp)
171 postscale_matrix (*sp, vp);
181 posttranslate_tmstack (Vector *vp)
183 posttrans_matrix (*sp, vp);
193 premult_tmstack (Matrix m)
195 premult_matrix (*sp, m);
205 prerotate_tmstack (Vector *vp)
209 Rotate_to_Matrix (vp, m);
210 premult3_matrix (*sp, m);
220 prescale_tmstack (Vector *vp)
222 prescale_matrix (*sp, vp);
232 pretranslate_tmstack (Vector *vp)
234 pretrans_matrix (*sp, vp);