MCPcopy Create free account
hub / github.com/OGRECave/ogre / enableBoneBoundingBoxMode

Function enableBoneBoundingBoxMode

Samples/Simple/include/SkeletalAnimation.h:59–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57 }
58 }
59 void enableBoneBoundingBoxMode( bool enable )
60 {
61 // update bone bounding box mode for all models
62 mBoneBoundingBoxes = enable;
63 for (int iModel = 0; iModel < NUM_MODELS; iModel++)
64 {
65 SceneNode* node = mModelNodes[iModel];
66 for (unsigned int iObj = 0; iObj < node->numAttachedObjects(); ++iObj)
67 {
68 if (Entity* ent = dynamic_cast<Entity*>( node->getAttachedObject( iObj ) ))
69 {
70 ent->setUpdateBoundingBoxFromSkeleton( mBoneBoundingBoxes );
71 Node::queueNeedUpdate( node ); // when turning off bone bounding boxes, need to force an update
72 }
73 }
74 }
75 // update status panel
76 if ( mStatusPanel )
77 {
78 mStatusPanel->setParamValue(mBoneBoundingBoxesItemName, mBoneBoundingBoxes ? "On" : "Off");
79 }
80 }
81 bool keyPressed(const KeyboardEvent& evt) override
82 {
83 if ( !mTrayMgr->isDialogVisible() )

Callers 2

keyPressedFunction · 0.85
setupModelsFunction · 0.85

Calls 3

getAttachedObjectMethod · 0.80
setParamValueMethod · 0.80

Tested by

no test coverage detected