port minor collision code cleanup, fix #1705
https://github.com/mapbox/mapbox-gl-js/pull/1261
This commit is contained in:
@@ -3,13 +3,13 @@
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
void CollisionTile::reset(const float _angle, const float pitch) {
|
||||
CollisionTile::CollisionTile(const float angle_, const float pitch, bool debug_) :
|
||||
angle(angle_), debug(debug_) {
|
||||
tree.clear();
|
||||
angle = _angle;
|
||||
|
||||
// Compute the transformation matrix.
|
||||
float angle_sin = std::sin(_angle);
|
||||
float angle_cos = std::cos(_angle);
|
||||
float angle_sin = std::sin(angle);
|
||||
float angle_cos = std::cos(angle);
|
||||
rotationMatrix = {{angle_cos, -angle_sin, angle_sin, angle_cos}};
|
||||
|
||||
// Stretch boxes in y direction to account for the map tilt.
|
||||
|
||||
Reference in New Issue
Block a user