correctly compute the bounding sphere
parent
af27507674
commit
a969d525d2
|
@ -586,6 +586,7 @@ plugins += env.SharedLibrary('plugins/constant', ['src/luminaires/constant.cpp']
|
||||||
plugins += env.SharedLibrary('plugins/envmap', ['src/luminaires/envmap.cpp'])
|
plugins += env.SharedLibrary('plugins/envmap', ['src/luminaires/envmap.cpp'])
|
||||||
plugins += env.SharedLibrary('plugins/spot', ['src/luminaires/spot.cpp'])
|
plugins += env.SharedLibrary('plugins/spot', ['src/luminaires/spot.cpp'])
|
||||||
plugins += env.SharedLibrary('plugins/point', ['src/luminaires/point.cpp'])
|
plugins += env.SharedLibrary('plugins/point', ['src/luminaires/point.cpp'])
|
||||||
|
plugins += env.SharedLibrary('plugins/sinusoidal', ['src/luminaires/sinusoidal.cpp'])
|
||||||
plugins += env.SharedLibrary('plugins/collimated', ['src/luminaires/collimated.cpp'])
|
plugins += env.SharedLibrary('plugins/collimated', ['src/luminaires/collimated.cpp'])
|
||||||
plugins += env.SharedLibrary('plugins/directional', ['src/luminaires/directional.cpp'])
|
plugins += env.SharedLibrary('plugins/directional', ['src/luminaires/directional.cpp'])
|
||||||
|
|
||||||
|
|
|
@ -275,11 +275,11 @@ void Scene::initialize() {
|
||||||
|
|
||||||
m_aabb = m_kdtree->getAABB();
|
m_aabb = m_kdtree->getAABB();
|
||||||
m_bsphere = m_kdtree->getBSphere();
|
m_bsphere = m_kdtree->getBSphere();
|
||||||
for (unsigned int i=0; i<m_media.size(); i++) {
|
|
||||||
const AABB &aabb = m_media[i]->getAABB();
|
if (m_media.size() > 0) {
|
||||||
m_aabb.expandBy(aabb);
|
for (size_t i=0; i<m_media.size(); i++)
|
||||||
for (int j=0; j<8; ++j)
|
m_aabb.expandBy(m_media[i]->getAABB());
|
||||||
m_bsphere.expandBy(aabb.getCorner(j));
|
m_bsphere = m_aabb.getBSphere();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue