]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Contact.hh
destroyed global classes; view hierarchy instead
[chaz/yoink] / src / Moof / Contact.hh
diff --git a/src/Moof/Contact.hh b/src/Moof/Contact.hh
new file mode 100644 (file)
index 0000000..82e049d
--- /dev/null
@@ -0,0 +1,40 @@
+
+/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+**]  All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
+
+#ifndef _MOOF_CONTACT_HH_
+#define _MOOF_CONTACT_HH_
+
+#include <Moof/Math.hh>
+
+
+namespace Mf {
+
+
+template <int D = 3>
+struct Contact
+{
+       typedef cml::vector< Scalar, cml::fixed<D> > Vector;
+
+       Vector  point;                  // point of contact
+       Scalar  distance;               // distance of penetration
+       Vector  normal;                 // normal of surface at point of contact
+
+       bool operator < (const Contact& rhs)
+       {
+               return distance < rhs.distance;
+       }
+};
+
+
+} // namespace Mf
+
+#endif // _MOOF_CONTACT_HH_
+
This page took 0.021685 seconds and 4 git commands to generate.