Commit 8f2db6a2 authored by Mike Kremer's avatar Mike Kremer
Browse files

Fixed computation of light source's bounding box.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10184 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 02ce64a7
......@@ -243,7 +243,13 @@ LightNode::~LightNode() {
void LightNode::boundingBox(ACG::Vec3d& _bbMin, ACG::Vec3d& _bbMax) {
if( visualize_ && !light_.directional() ) {
ACG::Vec3d r(light_.realPosition_[0], light_.realPosition_[1], light_.realPosition_[2]);
ACG::Vec3d r;
if(light_.fixedPosition())
r = ACG::Vec3d((double)light_.realPosition_[0],
(double)light_.realPosition_[1],
(double)light_.realPosition_[2]);
else
r = light_.position();
_bbMin.minimize( r - Vec3d(light_.radius()*3) );
_bbMax.maximize( r + Vec3d(light_.radius()*3) );
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment