summaryrefslogtreecommitdiffstats
path: root/src/collision/ColSphere.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/collision/ColSphere.h')
-rw-r--r--src/collision/ColSphere.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/collision/ColSphere.h b/src/collision/ColSphere.h
index 70e29763..f86b282a 100644
--- a/src/collision/ColSphere.h
+++ b/src/collision/ColSphere.h
@@ -2,12 +2,20 @@
#include "SurfaceTable.h"
-struct CColSphere
+struct CSphere
{
// NB: this has to be compatible with a CVuVector
CVector center;
float radius;
+ void Set(float radius, const CVector &center) { this->center = center; this->radius = radius; }
+};
+
+struct CColSphere : public CSphere
+{
uint8 surface;
uint8 piece;
- void Set(float radius, const CVector &center, uint8 surf = SURFACE_DEFAULT, uint8 piece = 0);
+
+ void Set(float radius, const CVector &center, uint8 surf, uint8 piece);
+ bool IntersectRay(CVector const &from, CVector const &dir, CVector &entry, CVector &exit);
+ using CSphere::Set;
}; \ No newline at end of file