LLAgentCamera update. Culled a bunch of dead code from llappviewer. Moved build-mode toggle off into lltoolmgr.

This commit is contained in:
Shyotl
2012-04-22 19:42:37 -05:00
parent 71a29e347e
commit 3cc37fb12b
11 changed files with 354 additions and 304 deletions

View File

@@ -46,6 +46,19 @@ enum ECameraMode
CAMERA_MODE_FOLLOW
};
/** Camera Presets for CAMERA_MODE_THIRD_PERSON */
enum ECameraPreset
{
/** Default preset, what the Third Person Mode actually was */
CAMERA_PRESET_REAR_VIEW,
/** "Looking at the Avatar from the front" */
CAMERA_PRESET_FRONT_VIEW,
/** "Above and to the left, over the shoulder, pulled back a little on the zoom" */
CAMERA_PRESET_GROUP_VIEW
};
//------------------------------------------------------------------------
// LLAgentCamera
//------------------------------------------------------------------------
@@ -94,9 +107,28 @@ private:
ECameraMode mCameraMode; // Target mode after transition animation is done
ECameraMode mLastCameraMode;
F32 mUIOffset;
//--------------------------------------------------------------------
// Preset
//--------------------------------------------------------------------
public:
void switchCameraPreset(ECameraPreset preset);
private:
/** Determines default camera offset depending on the current camera preset */
LLVector3 getCameraOffsetInitial();
/** Camera preset in Third Person Mode */
ECameraPreset mCameraPreset;
/** Initial camera offsets */
std::map<ECameraPreset, LLPointer<LLControlVariable> > mCameraOffsetInitial;
/** Initial focus offsets */
std::map<ECameraPreset, LLPointer<LLControlVariable> > mFocusOffsetInitial;
//--------------------------------------------------------------------
// Position
//--------------------------------------------------------------------
public:
LLVector3d getCameraPositionGlobal() const;
const LLVector3 &getCameraPositionAgent() const;
@@ -185,7 +217,6 @@ public:
private:
LLVector3d mCameraFocusOffset; // Offset from focus point in build mode
LLVector3d mCameraFocusOffsetTarget; // Target towards which we are lerping the camera's focus offset
LLVector3 mCameraOffsetDefault;
BOOL mFocusOnAvatar;
LLVector3d mFocusGlobal;
LLVector3d mFocusTargetGlobal;