|
@@ -28,11 +28,7 @@ bool collidesWithBox(const Box* box, const Box* other) {
|
|
|
|
|
|
void expandBox(Box* box, const Vector3* offset) {
|
|
void expandBox(Box* box, const Vector3* offset) {
|
|
for(size_t i = 0; i < 3; i++) {
|
|
for(size_t i = 0; i < 3; i++) {
|
|
- if(offset->data[i] > 0.0f) {
|
|
|
|
- box->max.data[i] += offset->data[i];
|
|
|
|
- } else {
|
|
|
|
- box->min.data[i] += offset->data[i];
|
|
|
|
- }
|
|
|
|
|
|
+ box->v[offset->data[i] > 0.0f].data[i] += offset->data[i];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|