~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Tina4/src/geomstat/geom/gstat_pln.c

Version: ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /**@(#)
  2 **/
  3 #include <tina/sys.h>
  4 #include <tina/math.h>
  5 #include <tina/mathfuncs.h>
  6 #include <tina/vision.h>
  7 #include <tina/visionfuncs.h>
  8 
  9 Basis3 *plane_basis(Plane * plane)
 10 {
 11     Basis3 *b;
 12     Basis3 *basis3_alloc();
 13 
 14     b = basis3_alloc();
 15     vec3_basis(plane->n, vec3_ey(), &b->ex, &b->ey, &b->ez);
 16     return (b);
 17 }
 18 
 19 void    plane_correct(Plane * plane, Basis3 * basis, Vector * x)
 20 {
 21     double  x0 = vector_getf(x, 0);
 22     double  x1 = vector_getf(x, 1);
 23     double  x2 = vector_getf(x, 2);
 24     Vec3    aim = {Vec3_id};
 25     Vec3    up = {Vec3_id};
 26 
 27     plane->p = vec3_sum(plane->p, vec3_times(x0, basis->ez));
 28     aim = vec3_sum3(basis->ez, vec3_times(x1, basis->ex),
 29                     vec3_times(x2, basis->ey));
 30     up = vec3_sum(basis->ey, vec3_times(-x2, basis->ez));
 31     vec3_basis(aim, up, &basis->ex, &basis->ey, &basis->ez);
 32     plane->n = basis->ez;
 33 }
 34 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.