Failed hack for collision detection with a sphere.
[hair] / src / object.h
diff --git a/src/object.h b/src/object.h
new file mode 100644 (file)
index 0000000..2efedf7
--- /dev/null
@@ -0,0 +1,17 @@
+#ifndef OBJECT_H_
+#define OBJECT_H_
+
+#include <gmath/gmath.h>
+
+class CollSphere {
+public:
+       float radius;
+       Vec3 center;
+
+       CollSphere();
+
+       bool contains(const Vec3 &v) const;
+       Vec3 project_surf(const Vec3 &v) const;
+};
+
+#endif // OBJECT_H_