* add a missing header
[hkl3d.git] / test / main.cpp
bloba697753397cdf154e364a34a5abea6b250add91b
1 /* This file is part of the hkl3d library.
3 * The hkl library is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
8 * The hkl library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with the hkl library. If not, see <http://www.gnu.org/licenses/>.
16 * Copyright (C) 2010 Synchrotron SOLEIL
17 * L'Orme des Merisiers Saint-Aubin
18 * BP 48 91192 GIF-sur-YVETTE CEDEX
20 * Authors: Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr>
21 * Oussama Sboui <sboui@synchrotron-soleil.fr>
24 #include "hkl3d.h"
26 int main(int argc, char** argv)
28 const char* filename = "../data/diffabs.dae";
29 const HklGeometryConfig *config;
30 HklGeometry *geometry;
31 int res = -1;
33 config = hkl_geometry_factory_get_config_from_type(HKL_GEOMETRY_TYPE_KAPPA6C);
34 geometry = hkl_geometry_factory_new(config, HKL_DEGTORAD * 50.);
35 hkl_geometry_set_values_v(geometry,
36 45 * HKL_DEGTORAD, 0, 0, 0, 0, 0);
38 try{
39 Hkl3D hkl3d(filename, geometry);
41 res = hkl3d.is_colliding();
42 } catch(...)
45 hkl_geometry_free(geometry);
47 return res;