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

Linux Cross Reference
Tina4/src/math/geom/hull3.c

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

  1 /**@(#)Find max and min x,y,z extent of a set of vectors sequentially
  2 **/
  3 
  4 #include <tina/sys.h>
  5 #include <tina/math.h>
  6 #include <tina/mathfuncs.h>
  7 
  8 void    vec3_extend_hull(Vec3 * vmin, Vec3 * vmax, Vec3 v)
  9 {
 10     double  xmin = vec3_x(*vmin), ymin = vec3_y(*vmin), zmin = vec3_z(*vmin);
 11     double  xmax = vec3_x(*vmax), ymax = vec3_y(*vmax), zmax = vec3_z(*vmax);
 12     double  s;
 13 
 14     s = vec3_x(v);
 15     if (s < xmin)
 16         xmin = s;
 17     if (s > xmax)
 18         xmax = s;
 19     s = vec3_y(v);
 20     if (s < ymin)
 21         ymin = s;
 22     if (s > ymax)
 23         ymax = s;
 24     s = vec3_z(v);
 25     if (s < zmin)
 26         zmin = s;
 27     if (s > zmax)
 28         zmax = s;
 29     *vmin = vec3(xmin, ymin, zmin);
 30     *vmax = vec3(xmax, ymax, zmax);
 31 }
 32 

~ [ 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.