18 , cells_ (0, 0, nullptr)
32 "Invalid vertical segment count: `" +
38 "Invalid horizontal segment count: `" +
59 for (
uint y = collidableRect.top;
60 y < collidableRect.top + collidableRect.height;
62 for (
uint x = collidableRect.left;
63 x < collidableRect.left + collidableRect.width;
79 for (
uint y = collidableRect.top;
80 y < collidableRect.top + collidableRect.height;
82 for (
uint x = collidableRect.left;
83 x < collidableRect.left + collidableRect.width;
85 cells_ (x, y)->GetEventsCollidingWith (collidable, events, parent);
102 for (
uint y = collidableRect.top;
103 y < collidableRect.top + collidableRect.height;
105 for (
uint x = collidableRect.left;
106 x < collidableRect.left + collidableRect.width;
108 cells_ (x, y)->AddPhysicsCollidable (collidable, mapCollidableInfo);
117 for (
uint y = collidableRect.top;
118 y < collidableRect.top + collidableRect.height;
120 for (
uint x = collidableRect.left;
121 x < collidableRect.left + collidableRect.width;
123 cells_ (x, y)->RemovePhysicsCollidable (collidable);
133 for (
uint y = collidableRect.top;
134 y < collidableRect.top + collidableRect.height;
136 for (
uint x = collidableRect.left;
137 x < collidableRect.left + collidableRect.width;
139 cells_ (x, y)->AddEventCollidable (collidable, mapEventInfo);
148 for (
uint y = collidableRect.top;
149 y < collidableRect.top + collidableRect.height;
151 for (
uint x = collidableRect.left;
152 x < collidableRect.left + collidableRect.width;
154 cells_ (x, y)->RemoveEventCollidable (collidable);
169 int left = collidable.
GetTopLeft ().x + offset.x;
170 int top = collidable.
GetTopLeft ().y + offset.y;
185 static_cast<int> ((right - left) /
cellSize_.x + 1),
190 static_cast<int> ((bottom - top) /
cellSize_.y + 1),