utility functions

This commit is contained in:
h4570
2022-08-17 00:19:16 +02:00
parent 4fb0ab3b6c
commit fea2398699
27 changed files with 419 additions and 247 deletions
+10
View File
@@ -102,6 +102,16 @@ Vec4 BBox::max() const {
return _max;
}
BBox BBox::create(const Vec4& center, const float& size) {
auto core = CoreBBox::create(center, size);
return BBox(core.vertices);
}
void BBox::operator=(const BBox& v) {
for (auto i = 0; i < 8; i++) Vec4::copy(&vertices[i], v.vertices[i].xyzw);
setData();
}
void BBox::getMinMax(Vec4* res_min, Vec4* res_max) const {
Vec4 temp = Vec4();