-
Notifications
You must be signed in to change notification settings - Fork 15
/
support.c
executable file
·34 lines (28 loc) · 928 Bytes
/
support.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/***
* libccd
* ---------------------------------
* Copyright (c)2010 Daniel Fiser <[email protected]>
*
*
* This file is part of libccd.
*
* Distributed under the OSI-approved BSD License (the "License");
* see accompanying file BDS-LICENSE for details or see
* <http://www.opensource.org/licenses/bsd-license.php>.
*
* This software is distributed WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the License for more information.
*/
#include "support.h"
void __ccdSupport(const void *obj1, const void *obj2,
const ccd_vec3_t *_dir, const ccd_t *ccd,
ccd_support_t *supp)
{
ccd_vec3_t dir;
ccdVec3Copy(&dir, _dir);
ccd->support1(obj1, &dir, &supp->v1);
ccdVec3Scale(&dir, -CCD_ONE);
ccd->support2(obj2, &dir, &supp->v2);
ccdVec3Sub2(&supp->v, &supp->v1, &supp->v2);
}