mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-03 13:09:40 +00:00
cleanup and use C++ version of FLT_MAX
This commit is contained in:
parent
ed20d869b4
commit
407fbe320e
2 changed files with 5 additions and 4 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <osgUtil/CullVisitor>
|
||||
|
||||
#include <limits>
|
||||
#include <sstream>
|
||||
|
||||
#include <components/misc/constants.hpp>
|
||||
|
@ -311,11 +312,11 @@ void updateWaterCullingView(HeightCullCallback* callback, ViewData* vd, osgUtil:
|
|||
{
|
||||
if (!(cv->getTraversalMask() & callback->getCullMask()))
|
||||
return;
|
||||
float lowZ = FLT_MAX;
|
||||
float lowZ = std::numeric_limits<float>::max();
|
||||
float highZ = callback->getHighZ();
|
||||
if (cv->getEyePoint().z() <= highZ || outofworld)
|
||||
{
|
||||
callback->setLowZ(-FLT_MAX);
|
||||
callback->setLowZ(-std::numeric_limits<float>::max());
|
||||
return;
|
||||
}
|
||||
cv->pushCurrentMask();
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
#include <osg/NodeCallback>
|
||||
|
||||
#include <atomic>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <atomic>
|
||||
|
||||
#include "defs.hpp"
|
||||
#include "cellborder.hpp"
|
||||
|
@ -43,7 +43,7 @@ namespace Terrain
|
|||
class HeightCullCallback : public osg::NodeCallback
|
||||
{
|
||||
public:
|
||||
HeightCullCallback() : mLowZ(-FLT_MAX), mHighZ(FLT_MAX), mMask(~0) {}
|
||||
HeightCullCallback() : mLowZ(-std::numeric_limits<float>::max()), mHighZ(std::numeric_limits<float>::max()), mMask(~0) {}
|
||||
|
||||
void setLowZ(float z)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue