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

Linux Cross Reference
Tina6/tina-libs/tina/geometry/geomPoint_3trans.c

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

  1 /**********
  2  * 
  3  * This file is part of the TINA Open Source Image Analysis Environment
  4  * henceforth known as TINA
  5  *
  6  * TINA is free software; you can redistribute it and/or modify
  7  * it under the terms of the GNU General Public License as 
  8  * published by the Free Software Foundation.
  9  *
 10  * TINA is distributed in the hope that it will be useful,
 11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 13  * GNU General Public License for more details.
 14  *
 15  * You should have received a copy of the GNU General Public License
 16  * along with TINA; if not, write to the Free Software Foundation, Inc., 
 17  * 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 18  *
 19  * ANY users of TINA who require exemption from the existing licence must
 20  * negotiate a new licence with Dr. Neil.A.Thacker, the sole agent for
 21  * the University of Manchester.
 22  *
 23  **********
 24  * 
 25  * Program :    TINA
 26  * File    :  $Source: /home/tina/cvs/tina-libs/tina/geometry/geomPoint_3trans.c,v $
 27  * Date    :  $Date: 2002/12/09 11:51:23 $
 28  * Version :  $Revision: 1.1.1.1 $
 29  * CVS Id  :  $Id: geomPoint_3trans.c,v 1.1.1.1 2002/12/09 11:51:23 cvstina Exp $
 30  *
 31  * Notes :
 32  *
 33  *********
 34 */
 35 
 36 
 37 #include "geomPoint_3trans.h"
 38 
 39 #if HAVE_CONFIG_H
 40   #include <config.h>
 41 #endif
 42 
 43 #include <tina/sys/sysDef.h>
 44 #include <tina/sys/sysPro.h>
 45 #include <tina/math/mathDef.h>
 46 #include <tina/math/mathPro.h>
 47 #include <tina/geometry/geomDef.h>
 48 #include <tina/geometry/geom_PointDef.h>
 49 #include <tina/geometry/geom_TransDef.h>
 50 
 51 void    point3_transform(Point3 * point, Transform3 trans)
 52 {
 53     if (point == NULL)
 54         return;
 55 
 56     point->p = trans3_pos(trans, point->p);
 57 }
 58 
 59 Bool    point3_coincident(Point3 * p1, Point3 * p2, double poserror)
 60 {
 61     if (p1 == NULL || p2 == NULL)
 62         return (false);
 63 
 64     if (vec3_dist(p1->p, p2->p) < poserror)
 65         return (true);
 66     else
 67         return (false);
 68 }
 69 
 70 Bool    point3_within_error(Point3 * p1, Point3 * p2)
 71 {
 72     Iso_error *iso1;
 73     Iso_error *iso2;
 74 
 75     if (p1 == NULL || p2 == NULL)
 76         return (false);
 77 
 78     iso1 = (Iso_error *) prop_get(p1->props, ISO_ERROR);
 79     iso2 = (Iso_error *) prop_get(p2->props, ISO_ERROR);
 80 
 81     if (iso1 == NULL || iso2 == NULL)
 82         return (false);
 83 
 84     return (point3_coincident(p1, p2, iso1->pos + iso2->pos));
 85 }
 86 

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