MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / updateMinimapCamera

Method updateMinimapCamera

source/gamemap/MiniMapCamera.cpp:165–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165void MiniMapCamera::updateMinimapCamera()
166{
167 const Ogre::Vector3& camPos = mCameraManager.getActiveCameraNode()->getPosition();
168 mCurCamPosX = Helper::round(camPos.x);
169 mCurCamPosY = Helper::round(camPos.y);
170
171 const Ogre::Quaternion& orientation = mCameraManager.getActiveCameraNode()->getOrientation();
172 mMiniMapCam->setPosition(mCurCamPosX, mCurCamPosY, CAM_HEIGHT);
173 mMiniMapCam->lookAt(mCurCamPosX, mCurCamPosY, 0.0);
174 mMiniMapCam->roll(orientation.getRoll());
175}
176
177void MiniMapCamera::preRenderTargetUpdate(const Ogre::RenderTargetEvent& rte)
178{

Callers

nothing calls this directly

Calls 3

roundFunction · 0.85
getActiveCameraNodeMethod · 0.80
setPositionMethod · 0.45

Tested by

no test coverage detected