[core] Introduce ProjectedCollisionBox type

ProjectedCollisionBox encapsulates geometry of the projected
collision box, it is using union and thus provides memory save
- 12 bytes per collision box instance.
This commit is contained in:
Mikhail Pozdnyakov
2019-08-01 19:16:01 +03:00
parent 55581b6e61
commit 65d2f7ed6a
5 changed files with 83 additions and 60 deletions

View File

@@ -155,7 +155,7 @@ void CollisionFeature::bboxifyLabel(const GeometryCoordinates& line, GeometryCoo
0 :
(boxDistanceToAnchor - firstBoxOffset) * 0.8;
boxes.emplace_back(boxAnchor, -boxSize / 2, -boxSize / 2, boxSize / 2, boxSize / 2, paddedAnchorDistance, boxSize / 2);
boxes.emplace_back(boxAnchor, -boxSize / 2, -boxSize / 2, boxSize / 2, boxSize / 2, paddedAnchorDistance);
}
}