FORS Pipeline Reference Manual  4.12.5
fors_point.h
1 /* $Id: fors_point.h,v 1.4 2010-09-14 07:49:30 cizzo Exp $
2  *
3  * This file is part of the FORS Library
4  * Copyright (C) 2002-2010 European Southern Observatory
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 /*
22  * $Author: cizzo $
23  * $Date: 2010-09-14 07:49:30 $
24  * $Revision: 1.4 $
25  * $Name: not supported by cvs2svn $
26  */
27 
28 #ifndef FORS_POINT_H
29 #define FORS_POINT_H
30 
31 #include <cpl.h>
32 
33 CPL_BEGIN_DECLS
34 
35 typedef struct _fors_point
36 {
37  double x, y;
38 
39 } fors_point;
40 
41 #undef LIST_ELEM
42 #define LIST_ELEM fors_point
43 #include <list.h>
44 
45 fors_point *fors_point_new(double x, double y);
46 fors_point *fors_point_duplicate(const fors_point *p);
47 void fors_point_delete(fors_point **point);
48 void fors_point_delete_list(fors_point ***point);
49 void fors_point_print(const fors_point *s);
50 bool fors_point_equal(const fors_point *p,
51  const fors_point *q);
52 
53 double fors_point_distsq(const fors_point *p,
54  const fors_point *q);
55 
56 
57 CPL_END_DECLS
58 
59 #endif
fors_point * fors_point_new(double x, double y)
Constructor.
Definition: fors_point.c:53
void fors_point_delete(fors_point **point)
Destructor.
Definition: fors_point.c:87
fors_point * fors_point_duplicate(const fors_point *p)
Copy constructor.
Definition: fors_point.c:70
bool fors_point_equal(const fors_point *p, const fors_point *q)
Equality.
Definition: fors_point.c:120
double fors_point_distsq(const fors_point *p, const fors_point *q)
Metric.
Definition: fors_point.c:103