| 255 | } |
| 256 | |
| 257 | void Group::PropagateTransformsDown(bool deep) { |
| 258 | for (auto& child : children) { |
| 259 | Object* obj = child.direct_ptr; |
| 260 | if (obj) { |
| 261 | obj->SetScale((invert(child.rel_rotation) * child.rel_scale) * scale_); |
| 262 | obj->SetRotation(GetRotation() * child.rel_rotation); |
| 263 | obj->SetTranslation(translation_ + (GetRotation() * (scale_ * child.rel_translation))); |
| 264 | |
| 265 | if (deep && obj->IsGroupDerived()) { |
| 266 | Group* group = static_cast<Group*>(obj); |
| 267 | group->PropagateTransformsDown(deep); |
| 268 | } |
| 269 | } |
| 270 | } |
| 271 | child_transforms_need_update = false; |
| 272 | child_moved = false; |
| 273 | } |
| 274 | |
| 275 | void Group::PreDrawCamera(float curr_game_time) { |
| 276 | if (g_debug_runtime_disable_group_pre_draw_camera) { |
no test coverage detected