diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2019-11-04 20:35:34 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2019-11-04 20:35:34 +0200 |
commit | c75d443c8359f0bceee2df2adc0a67b2890922ea (patch) | |
tree | 03814e15ba8c31a82ab43a050f6cdbec02cbf437 /indra/newview/llagentcamera.cpp | |
parent | b371c5a35d5a4324deb21aafe25f48fd4560e29d (diff) |
SL-12186 WIP Updating UI for camera controls, including presets
Diffstat (limited to 'indra/newview/llagentcamera.cpp')
-rw-r--r-- | indra/newview/llagentcamera.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index bbe1354fc3..3e56c1dd71 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -210,10 +210,12 @@ void LLAgentCamera::init() mCameraOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getControl("CameraOffsetRearView"); mCameraOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getControl("CameraOffsetFrontView"); mCameraOffsetInitial[CAMERA_PRESET_GROUP_VIEW] = gSavedSettings.getControl("CameraOffsetGroupView"); + mCameraOffsetInitial[CAMERA_PRESET_CUSTOM] = gSavedSettings.getControl("CameraOffsetCustomPreset"); mFocusOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getControl("FocusOffsetRearView"); mFocusOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getControl("FocusOffsetFrontView"); mFocusOffsetInitial[CAMERA_PRESET_GROUP_VIEW] = gSavedSettings.getControl("FocusOffsetGroupView"); + mFocusOffsetInitial[CAMERA_PRESET_CUSTOM] = gSavedSettings.getControl("FocusOffsetCustomPreset"); mCameraCollidePlane.clearVec(); mCurrentCameraDistance = getCameraOffsetInitial().magVec() * gSavedSettings.getF32("CameraOffsetScale"); @@ -1936,6 +1938,21 @@ LLVector3 LLAgentCamera::getCameraOffsetInitial() return convert_from_llsd<LLVector3>(mCameraOffsetInitial[mCameraPreset]->get(), TYPE_VEC3, ""); } +LLVector3d LLAgentCamera::getFocusOffsetInitial() +{ + return convert_from_llsd<LLVector3d>(mFocusOffsetInitial[mCameraPreset]->get(), TYPE_VEC3D, ""); +} + +std::string LLAgentCamera::getCameraOffsetCtrlName() +{ + return mCameraOffsetInitial[mCameraPreset]->getName(); +} + +std::string LLAgentCamera::getFocusOffsetCtrlName() +{ + return mFocusOffsetInitial[mCameraPreset]->getName(); +} + F32 LLAgentCamera::getCameraMaxZoomDistance() { // Ignore "DisableCameraConstraints", we don't want to be out of draw range when we focus onto objects or avatars |