MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / _updateBounds

Method _updateBounds

Engine/source/terrain/terrData.cpp:557–574  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

555}
556
557void TerrainBlock::_updateBounds()
558{
559 if ( !mFile )
560 return; // quick fix to stop crashing when deleting terrainblocks
561
562 // Setup our object space bounds.
563 mBounds.minExtents.set( 0.0f, 0.0f, 0.0f );
564 mBounds.maxExtents.set( getWorldBlockSize(), getWorldBlockSize(), 0.0f );
565 getMinMaxHeight( &mBounds.minExtents.z, &mBounds.maxExtents.z );
566
567 // Set our mObjBox to be equal to mBounds
568 if ( mObjBox.maxExtents != mBounds.maxExtents ||
569 mObjBox.minExtents != mBounds.minExtents )
570 {
571 mObjBox = mBounds;
572 resetWorldBox();
573 }
574}
575
576void TerrainBlock::_onZoningChanged( SceneZoneSpaceManager *zoneManager )
577{

Callers 1

_setSquareSizeMethod · 0.45

Calls 1

setMethod · 0.45

Tested by

no test coverage detected