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

Linux Cross Reference
Tina6/tina-libs/tina/geometry/geomTrans_f3.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/geomTrans_f3.c,v $
 27  * Date    :  $Date: 2005/01/09 17:49:25 $
 28  * Version :  $Revision: 1.2 $
 29  * CVS Id  :  $Id: geomTrans_f3.c,v 1.2 2005/01/09 17:49:25 paul Exp $
 30  *
 31  * Notes : Functions for manipulating 3D transforms
 32  *
 33  *********
 34 */
 35 
 36 
 37 #include "geomTrans_f3.h"
 38 
 39 #if HAVE_CONFIG_H
 40   #include <config.h>
 41 #endif
 42 
 43 #include <string.h>
 44 #include <tina/sys/sysDef.h>
 45 #include <tina/sys/sysPro.h>
 46 #include <tina/math/mathDef.h>
 47 #include <tina/math/mathPro.h>
 48 #include <tina/geometry/geom_TransDef.h>
 49 #ifdef _PCC
 50 #include <memory.h>
 51 #endif
 52 
 53 Transf3 *transf3_alloc(unsigned int type)
 54 {
 55     Transf3 *transf = ts_ralloc(Transf3);
 56 
 57     transf->type = type;
 58     transf->label = new_label();
 59     transf->T = trans3_unit();
 60     transf->props = NULL;
 61     return (transf);
 62 }
 63 
 64 Transf3 *transf3_make(Transform3 T, int type)
 65 {
 66     Transf3 *transf = ts_ralloc(Transf3);
 67 
 68     transf->type = type;
 69     transf->label = new_label();
 70     transf->T = T;
 71     transf->props = NULL;
 72     return (transf);
 73 }
 74 
 75 void    transf3_free(Transf3 * transf)
 76 {
 77     if (transf == NULL)
 78         return;
 79     proplist_freelist(transf->props);
 80     rfree((void *) transf);
 81 }
 82 
 83 Transf3 *transf3_copy(Transf3 * transf)
 84 {
 85     Transf3 *copy;
 86     List   *proplist_copy();
 87 
 88     if (transf == NULL)
 89         return (NULL);
 90 
 91     copy = ts_ralloc(Transf3);
 92     (void) memcpy((char *) copy, (char *) transf, sizeof(Transf3));
 93     copy->props = proplist_copy(transf->props);
 94     return (copy);
 95 }
 96 
 97 int     transf3_number(List * transfs)
 98 {
 99     List   *ptr;
100     int     n = 0;
101 
102     for (ptr = transfs; ptr != NULL; ptr = ptr->next)
103         ((Transf3 *) (ptr->to))->label = n++;
104     return(n);
105 }
106 

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