liba2ri
0.2
Main Page
Data Structures
Files
File List
All
Data Structures
include
point.h
1
/*************************************/
2
/* Auteur : Rémi Synave */
3
/* Date de création : 01/03/07 */
4
/* Date de modification : 08/01/10 */
5
/* Version : 0.2 */
6
/*************************************/
7
8
/***************************************************************************/
9
/* This file is part of a2ri. */
10
/* */
11
/* a2ri is free software: you can redistribute it and/or modify it */
12
/* under the terms of the GNU Lesser General Public License as published */
13
/* by the Free Software Foundation, either version 3 of the License, or */
14
/* (at your option) any later version. */
15
/* */
16
/* a2ri is distributed in the hope that it will be useful, */
17
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
18
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
19
/* GNU Lesser General Public License for more details. */
20
/* */
21
/* You should have received a copy of the GNU Lesser General Public */
22
/* License along with a2ri. */
23
/* If not, see <http://www.gnu.org/licenses/>. */
24
/***************************************************************************/
25
26
27
28
#ifndef POINT__H
29
#define POINT__H
30
31
#include <stdio.h>
32
#include <math.h>
33
#include "util.h"
34
38
typedef
struct
39
{
40
double
x,
41
y;
42
int
att_int;
43
double
att_double;
44
}
point2d
;
45
49
typedef
struct
50
{
51
double
x,
52
y,
53
z;
54
int
att_int;
55
double
att_double;
56
}
point3d
,
57
*
pt_point3d
;
58
66
void
point2d_init (
67
point2d
* p,
68
double
x,
69
double
y);
70
79
void
point3d_init (
80
point3d
* p,
81
double
x,
82
double
y,
83
double
z);
84
90
void
point2d_display (
91
point2d
p);
92
98
void
point3d_display (
99
point3d
p);
100
107
int
point3d_equal (
108
point3d
p1,
109
point3d
p2);
110
118
int
list_point3d_contains (
119
point3d
* list,
120
int
size,
121
point3d
tosearch);
122
130
int
list_point3d_clone (
131
point3d
* list,
132
int
size,
133
point3d
** list_clone);
134
143
int
list_point3d_add (
144
point3d
** list,
145
int
*size,
146
point3d
toadd,
147
int
add_type);
148
156
int
list_point3d_remove (
157
point3d
** list,
158
int
*size,
159
int
index);
160
167
void
list_point3d_mix (
168
point3d
* list,
169
int
size);
170
177
void
list_point3d_display (
178
point3d
* list,
179
int
size);
180
187
point3d
*center_of_mass (
188
point3d
* data,
189
int
nbpoint);
190
191
#endif
Generated on Tue Dec 9 2014 15:31:19 for liba2ri by
1.8.1.2