diff --git a/Migration.md b/Migration.md index 8eba2afa0..c3d759530 100644 --- a/Migration.md +++ b/Migration.md @@ -43,6 +43,8 @@ but with improved human-readability.. + bool JointNameExists(const std::string &) const + bool LinkNameExists(const std::string &) const +1. **sdf/Heightmap.hh**: sampling now defaults to 1 instead of 2. + ### Deprecations 1. **src/Root.hh**: The following methods have been deprecated in favor of the @@ -308,6 +310,8 @@ but with improved human-readability.. 1. **joint.sdf** `child` and `parent` elements accept frame names instead of only link names * [Issue 204](https://github.com/osrf/sdformat/issues/204) +1. **heightmap.sdf**: sampling now defaults to 1 instead of 2. + ### Deprecations 1. **joint.sdf** `initial_position` element in `` and `` is deprecated diff --git a/include/sdf/Heightmap.hh b/include/sdf/Heightmap.hh index 9a24ec1e5..90bc97399 100644 --- a/include/sdf/Heightmap.hh +++ b/include/sdf/Heightmap.hh @@ -242,7 +242,7 @@ namespace sdf /// \return The heightmap's sampling. public: unsigned int Sampling() const; - /// \brief Set the heightmap's sampling. Defaults to 2. + /// \brief Set the heightmap's sampling. Defaults to 1. /// \param[in] _sampling The heightmap's sampling per datum. public: void SetSampling(unsigned int _sampling); diff --git a/sdf/1.8/heightmap_shape.sdf b/sdf/1.8/heightmap_shape.sdf index 8db8c670b..7a7462298 100644 --- a/sdf/1.8/heightmap_shape.sdf +++ b/sdf/1.8/heightmap_shape.sdf @@ -37,8 +37,8 @@ Set if the rendering engine will use terrain paging - - Samples per heightmap datum. For rasterized heightmaps, this indicates the number of samples to take per pixel. Using a lower value, e.g. 1, will generally improve the performance of the heightmap but lower the heightmap quality. + + Samples per heightmap datum. For rasterized heightmaps, this indicates the number of samples to take per pixel. Using a higher value, e.g. 2, will generally improve the quality of the heightmap but lower performance. diff --git a/src/Heightmap.cc b/src/Heightmap.cc index 70b161fb7..823bd0c47 100644 --- a/src/Heightmap.cc +++ b/src/Heightmap.cc @@ -70,7 +70,7 @@ class sdf::HeightmapPrivate public: bool useTerrainPaging{false}; /// \brief Sampling per datum. - public: unsigned int sampling{2u}; + public: unsigned int sampling{1u}; /// \brief Textures in order public: std::vector textures; diff --git a/src/Heightmap_TEST.cc b/src/Heightmap_TEST.cc index 41d0774c3..4cd1b1dc9 100644 --- a/src/Heightmap_TEST.cc +++ b/src/Heightmap_TEST.cc @@ -29,7 +29,7 @@ TEST(DOMHeightmap, Construction) EXPECT_EQ(ignition::math::Vector3d(1, 1, 1), heightmap.Size()); EXPECT_EQ(ignition::math::Vector3d::Zero, heightmap.Position()); EXPECT_FALSE(heightmap.UseTerrainPaging()); - EXPECT_EQ(2u, heightmap.Sampling()); + EXPECT_EQ(1u, heightmap.Sampling()); EXPECT_EQ(0u, heightmap.TextureCount()); EXPECT_EQ(0u, heightmap.BlendCount()); EXPECT_EQ(nullptr, heightmap.TextureByIndex(0u)); @@ -304,7 +304,7 @@ TEST(DOMHeightmap, Set) heightmap.SetUseTerrainPaging(true); EXPECT_TRUE(heightmap.UseTerrainPaging()); - EXPECT_EQ(2u, heightmap.Sampling()); + EXPECT_EQ(1u, heightmap.Sampling()); heightmap.SetSampling(12u); EXPECT_EQ(12u, heightmap.Sampling());