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

Method SetUp

Tests/OgreMain/src/General.cpp:220–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218 SceneNode* mCameraNode;
219
220 void SetUp() override {
221 RootWithoutRenderSystemFixture::SetUp();
222
223 mSceneMgr = mRoot->createSceneManager();
224 mCamera = mSceneMgr->createCamera("Camera");
225 mCameraNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();
226 mCameraNode->attachObject(mCamera);
227 mCameraNode->setPosition(0,0,500);
228 mCameraNode->lookAt(Vector3(0, 0, 0), Node::TS_PARENT);
229
230 // Create a set of random balls
231 Entity* ent = mSceneMgr->createEntity("501", "sphere.mesh", "General");
232
233 // stick one at the origin so one will always be hit by ray
234 mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(ent);
235 createRandomEntityClones(ent, 500, Vector3(-2500,-2500,-2500), Vector3(2500,2500,2500), mSceneMgr);
236
237 mSceneMgr->_updateSceneGraph(mCamera);
238 }
239};
240
241TEST_F(SceneQueryTest,Intersection)

Callers

nothing calls this directly

Calls 11

Vector3Class · 0.85
getRootSceneNodeMethod · 0.80
attachObjectMethod · 0.80
createEntityMethod · 0.80
createRandomEntityClonesFunction · 0.70
createSceneManagerMethod · 0.45
createCameraMethod · 0.45
createChildSceneNodeMethod · 0.45
setPositionMethod · 0.45
lookAtMethod · 0.45
_updateSceneGraphMethod · 0.45

Tested by

no test coverage detected