summaryrefslogtreecommitdiff
path: root/indra/newview/llviewercamera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewercamera.cpp')
-rw-r--r--indra/newview/llviewercamera.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp
index a437a8b3b5..831304f428 100644
--- a/indra/newview/llviewercamera.cpp
+++ b/indra/newview/llviewercamera.cpp
@@ -49,10 +49,14 @@
#include "llglheaders.h"
#include "llquaternion.h"
#include "llwindow.h" // getPixelAspectRatio()
+#include "lltracerecording.h"
// System includes
#include <iomanip> // for setprecision
+LLTrace::Count<> LLViewerCamera::sVelocityStat("camera_velocity");
+LLTrace::Count<> LLViewerCamera::sAngularVelocityStat("camera_angular_velocity");
+
U32 LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
//glu pick matrix implementation borrowed from Mesa3D
@@ -163,11 +167,12 @@ void LLViewerCamera::updateCameraLocation(const LLVector3 &center,
F32 drot;
rotation.getAngleAxis(&drot, &x, &y, &z);
- mVelocityStat.addValue(dpos);
- mAngularVelocityStat.addValue(drot);
+ sVelocityStat.add(dpos);
+ sAngularVelocityStat.add(drot);
- mAverageSpeed = mVelocityStat.getMeanPerSec() ;
- mAverageAngularSpeed = mAngularVelocityStat.getMeanPerSec() ;
+ LLTrace::Recording& recording = LLTrace::get_frame_recording().getTotalRecording();
+ mAverageSpeed = LLTrace::get_frame_recording().getPeriodMeanPerSec(sVelocityStat);
+ mAverageAngularSpeed = LLTrace::get_frame_recording().getPeriodMeanPerSec(sAngularVelocityStat);
mCosHalfCameraFOV = cosf(0.5f * getView() * llmax(1.0f, getAspect()));
// update pixel meter ratio using default fov, not modified one