mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
Update model bounding sphere to account for parent scale, closes #1630
This commit is contained in:
@@ -575,7 +575,6 @@ void RenderableModel::initializeGL() {
|
||||
|
||||
_geometry->initialize();
|
||||
_geometry->calculateBoundingRadius();
|
||||
setBoundingSphere(_geometry->boundingRadius() * _modelScale);
|
||||
}
|
||||
|
||||
void RenderableModel::deinitializeGL() {
|
||||
@@ -717,6 +716,10 @@ void RenderableModel::update(const UpdateData& data) {
|
||||
ghoul::opengl::updateUniformLocations(*_program, _uniformCache, UniformNames);
|
||||
}
|
||||
|
||||
setBoundingSphere(_geometry->boundingRadius() * _modelScale *
|
||||
glm::compMax(data.modelTransform.scale)
|
||||
);
|
||||
|
||||
if (_geometry->hasAnimation() && !_animationStart.empty()) {
|
||||
double relativeTime;
|
||||
double now = data.time.j2000Seconds();
|
||||
|
||||
Reference in New Issue
Block a user