From 39e5fdc3e7723f47670be1d9fcf6a6099c946d15 Mon Sep 17 00:00:00 2001 From: cutealien Date: Fri, 29 Mar 2019 17:39:29 +0000 Subject: [PATCH] Merge branch releases/1.8 revisions r5633 through r5796 into trunk. - Fix for SViewFrustum::clipLine git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5797 dfc29bdd-3216-0410-991c-e03cc46cb475 --- changes.txt | 3 +++ include/S3DVertex.h | 2 ++ include/SColor.h | 2 +- include/SViewFrustum.h | 4 ++-- include/dimension2d.h | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/changes.txt b/changes.txt index 53ba422c..da16a2a4 100644 --- a/changes.txt +++ b/changes.txt @@ -228,6 +228,9 @@ should now be fps independentn -------------------------- Changes in 1.8.5 + - Fix SViewFrustum::clipLine. Was before clipping at wrong points (inverse places along lines). + - Fix compilation on OSX and prevent capturing mouse cursor when Window is not on top (Patch #319) + Thanks at Artem Shoobovych for bugreport and patch (https://sourceforge.net/p/irrlicht/patches/319/) - Fix serialization of OverrideTextColorEnabled flag in CGUITab. Thanks @ chronologicaldot for reporting (http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=52344&p=303891#p303891) - CFileSystem::getAbsolutePath no longer wrongly converts an empty filename to "/" on unix platforms. This fixes the bug that CFileSystem::createAndOpenFile("") returned a (strange behaving) non-null file pointer. diff --git a/include/S3DVertex.h b/include/S3DVertex.h index 0950a4d4..41563d5e 100644 --- a/include/S3DVertex.h +++ b/include/S3DVertex.h @@ -92,6 +92,7 @@ struct S3DVertex return EVT_STANDARD; } + //\param d d=0 returns other, d=1 returns this, values between interpolate. S3DVertex getInterpolated(const S3DVertex& other, f32 d) { d = core::clamp(d, 0.0f, 1.0f); @@ -170,6 +171,7 @@ struct S3DVertex2TCoords : public S3DVertex return EVT_2TCOORDS; } + //\param d d=0 returns other, d=1 returns this, values between interpolate. S3DVertex2TCoords getInterpolated(const S3DVertex2TCoords& other, f32 d) { d = core::clamp(d, 0.0f, 1.0f); diff --git a/include/SColor.h b/include/SColor.h index 7fccb381..f7790557 100644 --- a/include/SColor.h +++ b/include/SColor.h @@ -448,7 +448,7 @@ namespace video //! Interpolates the color with a f32 value to another color /** \param other: Other color - \param d: value between 0.0f and 1.0f + \param d: value between 0.0f and 1.0f. d=0 returns other, d=1 returns this, values between interpolate. \return Interpolated color. */ SColor getInterpolated(const SColor &other, f32 d) const { diff --git a/include/SViewFrustum.h b/include/SViewFrustum.h index b1d53e39..1b522976 100644 --- a/include/SViewFrustum.h +++ b/include/SViewFrustum.h @@ -402,13 +402,13 @@ namespace scene if (planes[i].classifyPointRelation(line.start) == core::ISREL3D_FRONT) { line.start = line.start.getInterpolated(line.end, - planes[i].getKnownIntersectionWithLine(line.start, line.end)); + 1.f-planes[i].getKnownIntersectionWithLine(line.start, line.end)); wasClipped = true; } if (planes[i].classifyPointRelation(line.end) == core::ISREL3D_FRONT) { line.end = line.start.getInterpolated(line.end, - planes[i].getKnownIntersectionWithLine(line.start, line.end)); + 1.f-planes[i].getKnownIntersectionWithLine(line.start, line.end)); wasClipped = true; } } diff --git a/include/dimension2d.h b/include/dimension2d.h index 13addb4b..4f0a87a1 100644 --- a/include/dimension2d.h +++ b/include/dimension2d.h @@ -191,7 +191,7 @@ namespace core //! Get the interpolated dimension /** \param other Other dimension to interpolate with. - \param d Value between 0.0f and 1.0f. + \param d Value between 0.0f and 1.0f. d=0 returns other, d=1 returns this, values between interpolate. \return Interpolated dimension. */ dimension2d getInterpolated(const dimension2d& other, f32 d) const {