[core] consolidate Axonometric rendering API

Instead of having individual APIs for setting axonometric
and skew options, create ProjectionMode struct that holds
all the relevant options for Axonometric rendering and
introduce setter/getter on the Map for those options.
This commit is contained in:
Sudarsana Babu Nagineni
2019-03-06 14:30:23 +02:00
parent c6598fc5da
commit 744d92e763
9 changed files with 89 additions and 68 deletions

View File

@@ -472,6 +472,17 @@ TEST(Transform, Camera) {
ASSERT_DOUBLE_EQ(transform.getLatLng().longitude(), 0);
}
TEST(Transform, ProjectionMode) {
Transform transform;
transform.setProjectionMode(ProjectionMode().withAxonometric(true).withXSkew(1.0).withYSkew(0.0));
auto options = transform.getProjectionMode();
EXPECT_TRUE(*options.axonometric);
EXPECT_EQ(*options.xSkew, 1.0);
EXPECT_EQ(*options.ySkew, 0.0);
}
TEST(Transform, IsPanning)
{
Transform transform;