/**************************************************************************** Copyright (C) 2012 HidraVFX development team This file is part of the HidraVFX project. HidraVFX is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. HidraVFX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with HidraVFX. If not, see . ****************************************************************************/ #ifndef VERTEX_H_ #define VERTEX_H_ /* native point object */ typedef struct { double x; double y; double z; } tpoint; typedef struct { double x; double y; double z; } tvertex; extern void tpoint_swap(tpoint *a, tpoint *b); extern tpoint tpoint_2d(double xi,double yi); extern tpoint tpoint_3d(double xi,double yi,double zi); extern tpoint tpoint_copy(tpoint *a); extern tvertex tvertex_2d(double x0,double y0); extern tvertex tvertex_3d(double x0,double y0,double z0); extern tvertex tvertex_copy(tvertex *a); extern tvertex tvertex_null(void); extern tvertex tvertex_sub(tvertex *v1, tvertex *v2); extern tvertex tvertex_add(tvertex *v1, tvertex *v2); extern tvertex tvertex_mul(tvertex *v1, tvertex *v2); extern double tvertex_length(tvertex *v); #endif