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

Method resetObjectBox

Engine/source/scene/sceneObject.cpp:545–568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

543//-----------------------------------------------------------------------------
544
545void SceneObject::resetObjectBox()
546{
547 AssertFatal( mWorldBox.isValidBox(), "SceneObject::resetObjectBox - Bad world box!" );
548
549 mObjBox = mWorldBox;
550 mWorldToObj.mul( mObjBox );
551
552 Point3F objScale( mObjScale );
553 objScale.setMax( Point3F( (F32)POINT_EPSILON, (F32)POINT_EPSILON, (F32)POINT_EPSILON ) );
554 mObjBox.minExtents.convolveInverse( objScale );
555 mObjBox.maxExtents.convolveInverse( objScale );
556
557 AssertFatal( mObjBox.isValidBox(), "SceneObject::resetObjectBox - Bad object box!" );
558
559 // Update the mWorldSphere from mWorldBox
560 mWorldBox.getCenter( &mWorldSphere.center );
561 mWorldSphere.radius = ( mWorldBox.maxExtents - mWorldSphere.center ).len();
562
563 // Update scene managers.
564
565 for( SceneObjectLink* link = mSceneObjectLinks; link != NULL;
566 link = link->getNextLink() )
567 link->update();
568}
569
570//-----------------------------------------------------------------------------
571

Callers

nothing calls this directly

Calls 9

getNextLinkMethod · 0.80
Point3FClass · 0.70
isValidBoxMethod · 0.45
mulMethod · 0.45
setMaxMethod · 0.45
convolveInverseMethod · 0.45
getCenterMethod · 0.45
lenMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected