PVS: V560 A part of conditional expression is always true
This commit is contained in:
@@ -521,11 +521,11 @@ void NavigationStyle::boxZoom(const SbBox2s& box)
|
||||
float scaleX = (float)sizeX/(float)size[0];
|
||||
float scaleY = (float)sizeY/(float)size[1];
|
||||
float scale = std::max<float>(scaleX, scaleY);
|
||||
if (cam && cam->getTypeId() == SoOrthographicCamera::getClassTypeId()) {
|
||||
if (cam->getTypeId() == SoOrthographicCamera::getClassTypeId()) {
|
||||
float height = static_cast<SoOrthographicCamera*>(cam)->height.getValue() * scale;
|
||||
static_cast<SoOrthographicCamera*>(cam)->height = height;
|
||||
}
|
||||
else if (cam && cam->getTypeId() == SoPerspectiveCamera::getClassTypeId()) {
|
||||
else if (cam->getTypeId() == SoPerspectiveCamera::getClassTypeId()) {
|
||||
float height = static_cast<SoPerspectiveCamera*>(cam)->heightAngle.getValue() / 2.0f;
|
||||
height = 2.0f * atan(tan(height) * scale);
|
||||
static_cast<SoPerspectiveCamera*>(cam)->heightAngle = height;
|
||||
|
||||
Reference in New Issue
Block a user