]> Dogcows Code - chaz/yoink/blob - src/moof/contact.hh
fixed documentation about where to find licenses
[chaz/yoink] / src / moof / contact.hh
1
2 /*] Copyright (c) 2009-2011, Charles McGarvey [*****************************
3 **] All rights reserved.
4 *
5 * Distributable under the terms and conditions of the 2-clause BSD license;
6 * see the file COPYING for a complete text of the license.
7 *
8 *****************************************************************************/
9
10 #ifndef _MOOF_CONTACT_HH_
11 #define _MOOF_CONTACT_HH_
12
13 #include <moof/math.hh>
14
15
16 /**
17 * \file contact.hh
18 * Represents a collision between entities.
19 */
20
21 namespace moof {
22
23
24 template <int D = 3>
25 struct contact
26 {
27 typedef moof::vector< scalar, fixed<D> > vector;
28
29 vector point; // point of contact
30 scalar distance; // distance of penetration
31 vector normal; // normal of surface at point of contact
32
33 bool operator < (const contact& rhs)
34 {
35 return distance < rhs.distance;
36 }
37 };
38
39
40 } // namespace moof
41
42 #endif // _MOOF_CONTACT_HH_
43
This page took 0.028589 seconds and 4 git commands to generate.