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 <oussama.sboui@synchrotron-soleil.fr>
31 // forward declaration due to bullet static linking
32 class btCollisionObject
;
33 class btCollisionWorld
;
34 class btCollisionConfiguration
;
35 class btBroadphaseInterface
;
36 class btCollisionDispatcher
;
37 class btCollisionShape
;
44 Hkl3D(const char *filename
, HklGeometry
* geometry
);
48 bool is_colliding(void);
49 bool isModelFileCompatibleWithGeometry(void);
50 void loadG3dFaceInBtConvexHullShape(void);
52 HklGeometry
* _geometry
; // do not own this object
56 btCollisionDispatcher
*_btDispatcher
;
57 btCollisionConfiguration
*_btCollisionConfiguration
;
58 btBroadphaseInterface
*_btBroadphase
;
59 std::vector
<btCollisionObject
*> _btCollisionObjects
;
60 std::vector
<btVector3
> _colors
;
61 std::vector
<btCollisionShape
*> _btCollisionShapes
;
62 std::vector
<btTriangleMesh
*> _btMeshes
;
63 std::vector
<std::vector
<btCollisionObject
*> > _movingBtCollisionObjects
;
64 btCollisionWorld
*_btCollisionWorld
;