1
/****************************************************************************
2
Copyright (C) 2012 HidraVFX development team
3
<https://launchpad.net/~hidravfx-dev-team>
5
This file is part of the HidraVFX project.
7
HidraVFX is free software: you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation, either version 3 of the License, or
10
(at your option) any later version.
12
HidraVFX is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
17
You should have received a copy of the GNU General Public License
18
along with HidraVFX. If not, see <http://www.gnu.org/licenses/>.
19
****************************************************************************/
25
void tpoint_swap(tpoint *a, tpoint *b)
40
tpoint tpoint_2d(double xi,double yi)
50
tpoint tpoint_3d(double xi,double yi,double zi)
59
tvertex tvertex_2d(double x0,double y0)
68
tvertex tvertex_3d(double x0,double y0,double z0)
77
tvertex tvertex_copy(tvertex *a)
86
tvertex tvertex_null(void)
95
tvertex tvertex_sub(tvertex *v1, tvertex *v2)
104
tvertex tvertex_add(tvertex *v1, tvertex *v2)
113
tvertex tvertex_mul(tvertex *v1, tvertex *v2)
122
double tvertex_length(tvertex *v)
125
l = sqrt(sqr(v->x)+sqr(v->y)+sqr(v->z));