mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 04:49:54 +00:00
Update water.cpp (whitespace)
This commit is contained in:
parent
a67b512863
commit
12d9d6bfcb
1 changed files with 6 additions and 6 deletions
|
@ -278,13 +278,13 @@ public:
|
||||||
|
|
||||||
void setWaterLevel(float waterLevel)
|
void setWaterLevel(float waterLevel)
|
||||||
{
|
{
|
||||||
const float refractionScale = std::min(1.0f,std::max(0.0f,
|
const float refractionScale = std::min(1.0f, std::max(0.0f,
|
||||||
Settings::Manager::getFloat("refraction scale", "Water")));
|
Settings::Manager::getFloat("refraction scale", "Water")));
|
||||||
|
|
||||||
mViewMatrix = osg::Matrix::scale(1,1,refractionScale) *
|
mViewMatrix = osg::Matrix::scale(1, 1, refractionScale) *
|
||||||
osg::Matrix::translate(0,0,(1.0 - refractionScale) * waterLevel);
|
osg::Matrix::translate(0, 0, (1.0 - refractionScale) * waterLevel);
|
||||||
|
|
||||||
mClipCullNode->setPlane(osg::Plane(osg::Vec3d(0,0,-1), osg::Vec3d(0,0, waterLevel)));
|
mClipCullNode->setPlane(osg::Plane(osg::Vec3d(0, 0, -1), osg::Vec3d(0, 0, waterLevel)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -341,8 +341,8 @@ public:
|
||||||
|
|
||||||
void setWaterLevel(float waterLevel)
|
void setWaterLevel(float waterLevel)
|
||||||
{
|
{
|
||||||
mViewMatrix = osg::Matrix::scale(1,1,-1) * osg::Matrix::translate(0,0,2 * waterLevel);
|
mViewMatrix = osg::Matrix::scale(1, 1, -1) * osg::Matrix::translate(0, 0, 2 * waterLevel);
|
||||||
mClipCullNode->setPlane(osg::Plane(osg::Vec3d(0,0,1), osg::Vec3d(0,0,waterLevel)));
|
mClipCullNode->setPlane(osg::Plane(osg::Vec3d(0, 0, 1), osg::Vec3d(0, 0, waterLevel)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void setScene(osg::Node* scene)
|
void setScene(osg::Node* scene)
|
||||||
|
|
Loading…
Reference in a new issue