MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / Moved

Method Moved

Source/Objects/envobject.cpp:1366–1397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1364}
1365
1366void EnvObject::Moved(Object::MoveType type) {
1367 Object::Moved(type);
1368 if (type & Object::kScale) {
1369 UpdateDetailScale();
1370 }
1371
1372 UpdateDetailScale();
1373 UpdateBoundingSphere();
1374
1375 LoadModel();
1376 if (plant_component_.get()) {
1377 plant_component_->ClearPivot();
1378 }
1379 Graphics::Instance()->nav_mesh_out_of_date = true;
1380
1381 if (ofr.valid()) {
1382 UpdateDetailObjectSurfaces(&detail_object_surfaces, ofr, texture_ref_[0],
1383 normal_texture_ref_[0], transform_, model_id_);
1384 if (!ofr->dynamic && !attached_ && !placeholder_) {
1385 shadow_cache_dirty = true;
1386 if (scenegraph_) {
1387 auto it = std::find(scenegraph_->visible_static_meshes_.begin(), scenegraph_->visible_static_meshes_.end(), this);
1388 // Dirty shadow cache bounds for current object
1389 if (it != scenegraph_->visible_static_meshes_.end()) {
1390 auto& shadow_cache_bounds = *(scenegraph_->visible_static_meshes_shadow_cache_bounds_.begin() + std::distance(scenegraph_->visible_static_meshes_.begin(), it));
1391 shadow_cache_bounds.is_calculated = false;
1392 }
1393 }
1394 normal_override_buffer_dirty = true;
1395 }
1396 }
1397}
1398
1399// returns true iff an update occured
1400bool EnvObject::UpdatePhysicsTransform() {

Callers

nothing calls this directly

Calls 8

findFunction · 0.85
ClearPivotMethod · 0.80
distanceFunction · 0.50
getMethod · 0.45
validMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected