From d2c2ef3ec915491c7586b5f1f10b1560492dbb43 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 25 Jun 2018 20:02:30 +0100 Subject: [PATCH] Moved osg::clampProjectionMatrix() template from CullVisitor.cpp into include/osg/CullSettings to make it easier to implement custom clampProjectionMatrix callbacks --- include/osg/CullSettings | 82 ++++++++++++++++++++++++++++++++++++ src/osgUtil/CullVisitor.cpp | 84 +------------------------------------ 2 files changed, 84 insertions(+), 82 deletions(-) diff --git a/include/osg/CullSettings b/include/osg/CullSettings index c1a8877ce..c61fe9138 100644 --- a/include/osg/CullSettings +++ b/include/osg/CullSettings @@ -270,6 +270,88 @@ class OSG_EXPORT CullSettings }; +template +bool clampProjectionMatrix(matrix_type& projection, double& znear, double& zfar, value_type nearFarRatio) +{ + double epsilon = 1e-6; + if (zfar -bool _clampProjectionMatrix(matrix_type& projection, double& znear, double& zfar, value_type nearFarRatio) -{ - double epsilon = 1e-6; - if (zfar