Fixed unitialized variable access to premature calling of computeMatrix().

This commit is contained in:
Robert Osfield 2017-01-04 12:55:15 +00:00
parent d93d2e0ec1
commit b6ec9dc532

View File

@ -218,14 +218,17 @@ float ConeSector::operator() (const osg::Vec3& eyeLocal) const
// //
// DirectionalSector // 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() Sector()
{ {
setDirection(direction); _direction = direction;
setHorizLobeAngle(horizLobeAngle); _cosHorizAngle = cos(horizLobeAngle*0.5);
setVertLobeAngle(vertLobeAngle); _cosVertAngle = cos(vertLobeAngle*0.5);
setLobeRollAngle(lobeRollAngle); _rollAngle = lobeRollAngle;
setFadeAngle(fadeAngle); setFadeAngle(fadeAngle);
computeMatrix();
} }
void DirectionalSector::computeMatrix() void DirectionalSector::computeMatrix()