/s/KRAABB/AABB/g

Cleanup, new hash<> functions
This commit is contained in:
Kearwood Kip Gilbert
2017-07-29 19:23:21 -07:00
parent 3ef4d21001
commit 5362bbd526
43 changed files with 298 additions and 257 deletions

View File

@@ -241,23 +241,23 @@ kraken_stream_level KRModel::getStreamLevel(const KRViewport &viewport)
return stream_level;
}
KRAABB KRModel::getBounds() {
AABB KRModel::getBounds() {
loadModel();
if(m_models.size() > 0) {
if(m_faces_camera) {
KRAABB normal_bounds = KRAABB(m_models[0]->getMinPoint(), m_models[0]->getMaxPoint(), getModelMatrix());
AABB normal_bounds = AABB(m_models[0]->getMinPoint(), m_models[0]->getMaxPoint(), getModelMatrix());
float max_dimension = normal_bounds.longest_radius();
return KRAABB(normal_bounds.center()-Vector3(max_dimension), normal_bounds.center() + Vector3(max_dimension));
return AABB(normal_bounds.center()-Vector3(max_dimension), normal_bounds.center() + Vector3(max_dimension));
} else {
if(!(m_boundsCachedMat == getModelMatrix())) {
m_boundsCachedMat = getModelMatrix();
m_boundsCached = KRAABB(m_models[0]->getMinPoint(), m_models[0]->getMaxPoint(), getModelMatrix());
m_boundsCached = AABB(m_models[0]->getMinPoint(), m_models[0]->getMaxPoint(), getModelMatrix());
}
return m_boundsCached;
}
} else {
return KRAABB::Infinite();
return AABB::Infinite();
}
}