summaryrefslogtreecommitdiff
path: root/indra/newview/llagentcamera.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llagentcamera.h')
-rw-r--r--indra/newview/llagentcamera.h43
1 files changed, 30 insertions, 13 deletions
diff --git a/indra/newview/llagentcamera.h b/indra/newview/llagentcamera.h
index a4bc8434b0..128974666e 100644
--- a/indra/newview/llagentcamera.h
+++ b/indra/newview/llagentcamera.h
@@ -56,7 +56,10 @@ enum ECameraPreset
CAMERA_PRESET_FRONT_VIEW,
/** "Above and to the left, over the shoulder, pulled back a little on the zoom" */
- CAMERA_PRESET_GROUP_VIEW
+ CAMERA_PRESET_GROUP_VIEW,
+
+ /** Current view when a preset is saved */
+ CAMERA_PRESET_CUSTOM
};
//------------------------------------------------------------------------
@@ -109,20 +112,27 @@ private:
//--------------------------------------------------------------------
public:
void switchCameraPreset(ECameraPreset preset);
-private:
/** Determines default camera offset depending on the current camera preset */
LLVector3 getCameraOffsetInitial();
+ /** Determines default focus offset depending on the current camera preset */
+ LLVector3d getFocusOffsetInitial();
+
+ LLVector3 getCurrentCameraOffset();
+ LLVector3d getCurrentFocusOffset();
+ bool isJoystickCameraUsed();
+
+private:
/** Determines maximum camera distance from target for mouselook, opposite to LAND_MIN_ZOOM */
F32 getCameraMaxZoomDistance();
/** Camera preset in Third Person Mode */
ECameraPreset mCameraPreset;
- /** Initial camera offsets */
- std::map<ECameraPreset, LLPointer<LLControlVariable> > mCameraOffsetInitial;
+ /** Initial camera offset */
+ LLPointer<LLControlVariable> mCameraOffsetInitial;
- /** Initial focus offsets */
- std::map<ECameraPreset, LLPointer<LLControlVariable> > mFocusOffsetInitial;
+ /** Initial focus offset */
+ LLPointer<LLControlVariable> mFocusOffsetInitial;
//--------------------------------------------------------------------
// Position
@@ -256,15 +266,16 @@ public:
void cameraOrbitAround(const F32 radians); // Rotate camera CCW radians about build focus point
void cameraOrbitOver(const F32 radians); // Rotate camera forward radians over build focus point
void cameraOrbitIn(const F32 meters); // Move camera in toward build focus point
-
+ void resetCameraOrbit();
+ void resetOrbitDiff();
//--------------------------------------------------------------------
// Zoom
//--------------------------------------------------------------------
public:
- void handleScrollWheel(S32 clicks); // Mousewheel driven zoom
- void cameraZoomIn(const F32 factor); // Zoom in by fraction of current distance
- F32 getCameraZoomFraction(); // Get camera zoom as fraction of minimum and maximum zoom
- void setCameraZoomFraction(F32 fraction); // Set camera zoom as fraction of minimum and maximum zoom
+ void handleScrollWheel(S32 clicks); // Mousewheel driven zoom
+ void cameraZoomIn(const F32 factor); // Zoom in by fraction of current distance
+ F32 getCameraZoomFraction(bool get_third_person = false); // Get camera zoom as fraction of minimum and maximum zoom
+ void setCameraZoomFraction(F32 fraction); // Set camera zoom as fraction of minimum and maximum zoom
F32 calcCameraFOVZoomFactor();
F32 getAgentHUDTargetZoom();
@@ -274,8 +285,9 @@ public:
public:
void cameraPanIn(const F32 meters);
void cameraPanLeft(const F32 meters);
- void cameraPanUp(const F32 meters);
-
+ void cameraPanUp(const F32 meters);
+ void resetCameraPan();
+ void resetPanDiff();
//--------------------------------------------------------------------
// View
//--------------------------------------------------------------------
@@ -362,6 +374,9 @@ private:
F32 mOrbitInKey;
F32 mOrbitOutKey;
+ F32 mOrbitAroundRadians;
+ F32 mOrbitOverAngle;
+
//--------------------------------------------------------------------
// Pan
//--------------------------------------------------------------------
@@ -389,6 +404,8 @@ private:
F32 mPanInKey;
F32 mPanOutKey;
+ LLVector3d mPanFocusDiff;
+
/** Keys
** **
*******************************************************************************/