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

Method resetCamera

source/camera/CameraManager.cpp:430–443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

428}
429
430void CameraManager::resetCamera(const Ogre::Vector3& position, const Ogre::Vector3& rotation)
431{
432 Ogre::Node* nodeRotation = getActiveCameraNode()->getChild(0);
433 nodeRotation->resetOrientation();
434
435 Ogre::Node* nodeCamera = getActiveCameraNode();
436 nodeCamera->resetOrientation();
437
438 nodeCamera->setPosition(position);
439
440 nodeRotation->pitch(Ogre::Degree(rotation.x), Ogre::Node::TS_LOCAL);
441 nodeRotation->yaw(Ogre::Degree(rotation.y), Ogre::Node::TS_LOCAL);
442 nodeRotation->roll(Ogre::Degree(rotation.z), Ogre::Node::TS_LOCAL);
443}
444
445void CameraManager::resetCamera(const Ogre::Vector3& position)
446{

Callers 1

processMessageMethod · 0.45

Calls 2

Vector3Class · 0.85
setPositionMethod · 0.45

Tested by

no test coverage detected