[Add] Axis-Aligned bounding box update. Getting ready to begin new
collision framework.
This commit is contained in:
parent
7a48e570dd
commit
7d75f045fe
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user