diff options
author | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
commit | ce28e056c20bf2723f565bbf464b87781ec248a2 (patch) | |
tree | ef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/newview/llfloateranimpreview.cpp | |
parent | Second Life viewer sources 1.19.1.4b (diff) | |
download | meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2 meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz |
Second Life viewer sources 1.20.2
Diffstat (limited to 'linden/indra/newview/llfloateranimpreview.cpp')
-rw-r--r-- | linden/indra/newview/llfloateranimpreview.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/linden/indra/newview/llfloateranimpreview.cpp b/linden/indra/newview/llfloateranimpreview.cpp index 0b486b3..6892b8d 100644 --- a/linden/indra/newview/llfloateranimpreview.cpp +++ b/linden/indra/newview/llfloateranimpreview.cpp | |||
@@ -61,7 +61,7 @@ | |||
61 | #include "llviewermenufile.h" // upload_new_resource() | 61 | #include "llviewermenufile.h" // upload_new_resource() |
62 | #include "llvoavatar.h" | 62 | #include "llvoavatar.h" |
63 | #include "pipeline.h" | 63 | #include "pipeline.h" |
64 | #include "llvieweruictrlfactory.h" | 64 | #include "lluictrlfactory.h" |
65 | 65 | ||
66 | S32 LLFloaterAnimPreview::sUploadAmount = 10; | 66 | S32 LLFloaterAnimPreview::sUploadAmount = 10; |
67 | 67 | ||
@@ -143,7 +143,7 @@ BOOL LLFloaterAnimPreview::postBuild() | |||
143 | S32 btn_left = PREVIEW_HPAD; | 143 | S32 btn_left = PREVIEW_HPAD; |
144 | 144 | ||
145 | r.set( btn_left, y, btn_left + 32, y - BTN_HEIGHT ); | 145 | r.set( btn_left, y, btn_left + 32, y - BTN_HEIGHT ); |
146 | mPlayButton = LLViewerUICtrlFactory::getButtonByName(this, "play_btn"); | 146 | mPlayButton = getChild<LLButton>( "play_btn"); |
147 | if (!mPlayButton) | 147 | if (!mPlayButton) |
148 | { | 148 | { |
149 | mPlayButton = new LLButton("play_btn", LLRect(0,0,0,0)); | 149 | mPlayButton = new LLButton("play_btn", LLRect(0,0,0,0)); |
@@ -157,7 +157,7 @@ BOOL LLFloaterAnimPreview::postBuild() | |||
157 | 157 | ||
158 | mPlayButton->setScaleImage(TRUE); | 158 | mPlayButton->setScaleImage(TRUE); |
159 | 159 | ||
160 | mStopButton = LLViewerUICtrlFactory::getButtonByName(this, "stop_btn"); | 160 | mStopButton = getChild<LLButton>( "stop_btn"); |
161 | if (!mStopButton) | 161 | if (!mStopButton) |
162 | { | 162 | { |
163 | mStopButton = new LLButton("stop_btn", LLRect(0,0,0,0)); | 163 | mStopButton = new LLButton("stop_btn", LLRect(0,0,0,0)); |
@@ -265,7 +265,7 @@ BOOL LLFloaterAnimPreview::postBuild() | |||
265 | //temp.mV[VZ] = 0.f; | 265 | //temp.mV[VZ] = 0.f; |
266 | F32 pelvis_max_displacement = pelvis_offset + (temp.magVec() * 0.5f) + 1.f; | 266 | F32 pelvis_max_displacement = pelvis_offset + (temp.magVec() * 0.5f) + 1.f; |
267 | 267 | ||
268 | F32 camera_zoom = gCamera->getDefaultFOV() / (2.f * atan(pelvis_max_displacement / PREVIEW_CAMERA_DISTANCE)); | 268 | F32 camera_zoom = LLViewerCamera::getInstance()->getDefaultFOV() / (2.f * atan(pelvis_max_displacement / PREVIEW_CAMERA_DISTANCE)); |
269 | 269 | ||
270 | mAnimPreview->setZoom(camera_zoom); | 270 | mAnimPreview->setZoom(camera_zoom); |
271 | 271 | ||
@@ -1015,7 +1015,7 @@ LLPreviewAnimation::LLPreviewAnimation(S32 width, S32 height) : LLDynamicTexture | |||
1015 | mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable); | 1015 | mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable); |
1016 | mDummyAvatar->startMotion(ANIM_AGENT_STAND, 5.f); | 1016 | mDummyAvatar->startMotion(ANIM_AGENT_STAND, 5.f); |
1017 | mDummyAvatar->mSkirtLOD.setVisible(FALSE, TRUE); | 1017 | mDummyAvatar->mSkirtLOD.setVisible(FALSE, TRUE); |
1018 | gPipeline.markVisible(mDummyAvatar->mDrawable, *gCamera); | 1018 | gPipeline.markVisible(mDummyAvatar->mDrawable, *LLViewerCamera::getInstance()); |
1019 | 1019 | ||
1020 | // stop extraneous animations | 1020 | // stop extraneous animations |
1021 | mDummyAvatar->stopMotion( ANIM_AGENT_HEAD_ROT, TRUE ); | 1021 | mDummyAvatar->stopMotion( ANIM_AGENT_HEAD_ROT, TRUE ); |
@@ -1069,15 +1069,15 @@ BOOL LLPreviewAnimation::render() | |||
1069 | LLQuaternion(mCameraYaw, LLVector3::z_axis); | 1069 | LLQuaternion(mCameraYaw, LLVector3::z_axis); |
1070 | 1070 | ||
1071 | LLQuaternion av_rot = avatarp->mRoot.getWorldRotation() * camera_rot; | 1071 | LLQuaternion av_rot = avatarp->mRoot.getWorldRotation() * camera_rot; |
1072 | gCamera->setOriginAndLookAt( | 1072 | LLViewerCamera::getInstance()->setOriginAndLookAt( |
1073 | target_pos + ((LLVector3(mCameraDistance, 0.f, 0.f) + mCameraOffset) * av_rot), // camera | 1073 | target_pos + ((LLVector3(mCameraDistance, 0.f, 0.f) + mCameraOffset) * av_rot), // camera |
1074 | LLVector3::z_axis, // up | 1074 | LLVector3::z_axis, // up |
1075 | target_pos + (mCameraOffset * av_rot) ); // point of interest | 1075 | target_pos + (mCameraOffset * av_rot) ); // point of interest |
1076 | 1076 | ||
1077 | gCamera->setView(gCamera->getDefaultFOV() / mCameraZoom); | 1077 | LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom); |
1078 | gCamera->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mWidth, mHeight, FALSE); | 1078 | LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mWidth, mHeight, FALSE); |
1079 | 1079 | ||
1080 | mCameraRelPos = gCamera->getOrigin() - avatarp->mHeadp->getWorldPosition(); | 1080 | mCameraRelPos = LLViewerCamera::getInstance()->getOrigin() - avatarp->mHeadp->getWorldPosition(); |
1081 | 1081 | ||
1082 | //avatarp->setAnimationData("LookAtPoint", (void *)&mCameraRelPos); | 1082 | //avatarp->setAnimationData("LookAtPoint", (void *)&mCameraRelPos); |
1083 | 1083 | ||