[Add] Axis-Aligned bounding box update. Getting ready to begin new

collision framework.
This commit is contained in:
Rtch90 2018-02-18 21:32:47 +00:00
parent 7a48e570dd
commit 7d75f045fe

View File

@ -4,5 +4,13 @@
struct Aabb {
vector3d max, min;
void Update(vector3d p) {
if(max.x < p.x) max.x = p.x;
if(max.y < p.y) max.y = p.y;
if(max.z < p.z) max.z = p.z;
if(min.x > p.x) min.x = p.x;
if(min.y > p.y) min.y = p.y;
if(min.z > p.z) min.z = p.z;
}
};