~ubuntu-branches/debian/jessie/libccd/jessie

« back to all changes in this revision

Viewing changes to src/support.h

  • Committer: Package Import Robot
  • Author(s): Jose Luis Rivero
  • Date: 2014-03-24 16:51:48 UTC
  • Revision ID: package-import@ubuntu.com-20140324165148-mfno979f58rv322z
Tags: upstream-2.0
ImportĀ upstreamĀ versionĀ 2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***
 
2
 * libccd
 
3
 * ---------------------------------
 
4
 * Copyright (c)2010 Daniel Fiser <danfis@danfis.cz>
 
5
 *
 
6
 *
 
7
 *  This file is part of libccd.
 
8
 *
 
9
 *  Distributed under the OSI-approved BSD License (the "License");
 
10
 *  see accompanying file BDS-LICENSE for details or see
 
11
 *  <http://www.opensource.org/licenses/bsd-license.php>.
 
12
 *
 
13
 *  This software is distributed WITHOUT ANY WARRANTY; without even the
 
14
 *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
15
 *  See the License for more information.
 
16
 */
 
17
 
 
18
#ifndef __CCD_SUPPORT_H__
 
19
#define __CCD_SUPPORT_H__
 
20
 
 
21
#include <ccd/ccd.h>
 
22
 
 
23
#ifdef __cplusplus
 
24
extern "C" {
 
25
#endif /* __cplusplus */
 
26
 
 
27
struct _ccd_support_t {
 
28
    ccd_vec3_t v;  //!< Support point in minkowski sum
 
29
    ccd_vec3_t v1; //!< Support point in obj1
 
30
    ccd_vec3_t v2; //!< Support point in obj2
 
31
};
 
32
typedef struct _ccd_support_t ccd_support_t;
 
33
 
 
34
_ccd_inline void ccdSupportCopy(ccd_support_t *, const ccd_support_t *s);
 
35
 
 
36
/**
 
37
 * Computes support point of obj1 and obj2 in direction dir.
 
38
 * Support point is returned via supp.
 
39
 */
 
40
void __ccdSupport(const void *obj1, const void *obj2,
 
41
                  const ccd_vec3_t *dir, const ccd_t *ccd,
 
42
                  ccd_support_t *supp);
 
43
 
 
44
 
 
45
/**** INLINES ****/
 
46
_ccd_inline void ccdSupportCopy(ccd_support_t *d, const ccd_support_t *s)
 
47
{
 
48
    *d = *s;
 
49
}
 
50
 
 
51
#ifdef __cplusplus
 
52
} /* extern "C" */
 
53
#endif /* __cplusplus */
 
54
 
 
55
#endif /* __CCD_SUPPORT_H__ */