Make collision code placement more like original (+ small fixes)
# Conflicts: # premake5.lua # src/CMakeLists.txt # src/collision/Collision.cpp # src/core/Collision.h
This commit is contained in:
21
src/collision/ColSphere.h
Normal file
21
src/collision/ColSphere.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include "SurfaceTable.h"
|
||||
|
||||
struct CSphere
|
||||
{
|
||||
// NB: this has to be compatible with a CVuVector
|
||||
CVector center;
|
||||
float radius;
|
||||
void Set(float radius, const CVector ¢er) { this->center = center; this->radius = radius; }
|
||||
};
|
||||
|
||||
struct CColSphere : public CSphere
|
||||
{
|
||||
uint8 surface;
|
||||
uint8 piece;
|
||||
|
||||
void Set(float radius, const CVector ¢er, uint8 surf, uint8 piece);
|
||||
bool IntersectRay(CVector const &from, CVector const &dir, CVector &entry, CVector &exit);
|
||||
using CSphere::Set;
|
||||
};
|
||||
Reference in New Issue
Block a user