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

Method setupView

Samples/Common/include/SdkSample.h:214–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212 protected:
213
214 void setupView() override
215 {
216 // setup default viewport layout and camera
217 mCamera = mSceneMgr->createCamera("MainCamera");
218 mCameraNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();
219 mCameraNode->attachObject(mCamera);
220 mCameraNode->setFixedYawAxis(true);
221 mCameraMan.reset(new CameraMan(mCameraNode)); // create a default camera controller
222
223 mViewport = mWindow->addViewport(mCamera);
224 mCamera->setAspectRatio((Ogre::Real)mViewport->getActualWidth() / (Ogre::Real)mViewport->getActualHeight());
225 mCamera->setAutoAspectRatio(true);
226 mCamera->setNearClipDistance(5);
227 }
228
229 virtual void setDragLook(bool enabled)
230 {

Callers

nothing calls this directly

Calls 10

getRootSceneNodeMethod · 0.80
attachObjectMethod · 0.80
addViewportMethod · 0.80
setAspectRatioMethod · 0.80
setAutoAspectRatioMethod · 0.80
setNearClipDistanceMethod · 0.80
createCameraMethod · 0.45
createChildSceneNodeMethod · 0.45
setFixedYawAxisMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected