mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-04 07:19:43 +00:00
make mGrid (and friends) private again, create accessor method to return bool of mGrid.empty()
This commit is contained in:
parent
48713915cb
commit
756ec7117b
2 changed files with 4 additions and 1 deletions
|
@ -442,7 +442,7 @@ void QuadTreeWorld::accept(osg::NodeVisitor &nv)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isCullVisitor)
|
if (isCullVisitor)
|
||||||
updateWaterCullingView(mHeightCullCallback, vd, static_cast<osgUtil::CullVisitor*>(&nv), mStorage->getCellWorldSize(), !mGrid.empty());
|
updateWaterCullingView(mHeightCullCallback, vd, static_cast<osgUtil::CullVisitor*>(&nv), mStorage->getCellWorldSize(), !isGridEmpty());
|
||||||
|
|
||||||
if (!isCullVisitor)
|
if (!isCullVisitor)
|
||||||
vd->clear(); // we can't reuse intersection views in the next frame because they only contain what is touched by the intersection ray.
|
vd->clear(); // we can't reuse intersection views in the next frame because they only contain what is touched by the intersection ray.
|
||||||
|
|
|
@ -28,6 +28,9 @@ namespace Terrain
|
||||||
View* createView();
|
View* createView();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
bool isGridEmpty() { return mGrid.empty(); }
|
||||||
|
|
||||||
|
private:
|
||||||
osg::ref_ptr<osg::Node> buildTerrain (osg::Group* parent, float chunkSize, const osg::Vec2f& chunkCenter);
|
osg::ref_ptr<osg::Node> buildTerrain (osg::Group* parent, float chunkSize, const osg::Vec2f& chunkCenter);
|
||||||
void updateWaterCulling();
|
void updateWaterCulling();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue