mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-14 15:40:18 +00:00
cleanup and use C++ version of FLT_MAX
This commit is contained in:
parent
ed20d869b4
commit
407fbe320e
@ -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…
x
Reference in New Issue
Block a user