forked from mirror/openmw-tes3mp
Define a constant for the World Up vector
This commit is contained in:
parent
59f59a3385
commit
fcccacc0fa
3 changed files with 5 additions and 1 deletions
|
@ -13,6 +13,8 @@ namespace CSVRender
|
||||||
Camera Controller
|
Camera Controller
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
const osg::Vec3d CameraController::WorldUp = osg::Vec3d(0, 0, 1);
|
||||||
|
|
||||||
const osg::Vec3d CameraController::LocalUp = osg::Vec3d(0, 1, 0);
|
const osg::Vec3d CameraController::LocalUp = osg::Vec3d(0, 1, 0);
|
||||||
const osg::Vec3d CameraController::LocalLeft = osg::Vec3d(1, 0, 0);
|
const osg::Vec3d CameraController::LocalLeft = osg::Vec3d(1, 0, 0);
|
||||||
const osg::Vec3d CameraController::LocalForward = osg::Vec3d(0, 0, 1);
|
const osg::Vec3d CameraController::LocalForward = osg::Vec3d(0, 0, 1);
|
||||||
|
|
|
@ -19,6 +19,8 @@ namespace CSVRender
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
static const osg::Vec3d WorldUp;
|
||||||
|
|
||||||
static const osg::Vec3d LocalUp;
|
static const osg::Vec3d LocalUp;
|
||||||
static const osg::Vec3d LocalLeft;
|
static const osg::Vec3d LocalLeft;
|
||||||
static const osg::Vec3d LocalForward;
|
static const osg::Vec3d LocalForward;
|
||||||
|
|
|
@ -321,7 +321,7 @@ void SceneWidget::selectNavigationMode (const std::string& mode)
|
||||||
mCurrentCamControl->setCamera(NULL);
|
mCurrentCamControl->setCamera(NULL);
|
||||||
mCurrentCamControl = mFreeCamControl.get();
|
mCurrentCamControl = mFreeCamControl.get();
|
||||||
mCurrentCamControl->setCamera(getCamera());
|
mCurrentCamControl->setCamera(getCamera());
|
||||||
mFreeCamControl->fixUpAxis(osg::Vec3d(0,0,1));
|
mFreeCamControl->fixUpAxis(CameraController::WorldUp);
|
||||||
}
|
}
|
||||||
else if (mode=="free")
|
else if (mode=="free")
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue