Permalink
Browse files

Merge remote-tracking branch 'origin/master' into my_master

  • Loading branch information...
2 parents 7c1098c + 3cccdad commit 2937268d536f270a4cbb9eb094c32d16ec43e4d4 Hartwig committed Jan 7, 2017
Showing with 8 additions and 5 deletions.
  1. +8 −5 src/osgSim/Sector.cpp
View
@@ -218,14 +218,17 @@ float ConeSector::operator() (const osg::Vec3& eyeLocal) const
//
// DirectionalSector
//
-DirectionalSector::DirectionalSector(const osg::Vec3& direction,float horizLobeAngle, float vertLobeAngle, float lobeRollAngle, float fadeAngle):
+DirectionalSector::DirectionalSector(const osg::Vec3& direction, float horizLobeAngle, float vertLobeAngle, float lobeRollAngle, float fadeAngle):
Sector()
{
- setDirection(direction);
- setHorizLobeAngle(horizLobeAngle);
- setVertLobeAngle(vertLobeAngle);
- setLobeRollAngle(lobeRollAngle);
+ _direction = direction;
+ _cosHorizAngle = cos(horizLobeAngle*0.5);
+ _cosVertAngle = cos(vertLobeAngle*0.5);
+ _rollAngle = lobeRollAngle;
+
setFadeAngle(fadeAngle);
+
+ computeMatrix();
}
void DirectionalSector::computeMatrix()

0 comments on commit 2937268

Please sign in to comment.