LLSnapshotLivePreview Class Reference

Inheritance diagram for LLSnapshotLivePreview:

Inheritance graph
[legend]
Collaboration diagram for LLSnapshotLivePreview:

Collaboration graph
[legend]
List of all members.

Public Types

 SNAPSHOT_POSTCARD
 SNAPSHOT_TEXTURE
 SNAPSHOT_BITMAP
enum  ESnapshotType { SNAPSHOT_POSTCARD, SNAPSHOT_TEXTURE, SNAPSHOT_BITMAP }

Public Member Functions

 LLSnapshotLivePreview (const LLRect &rect)
 ~LLSnapshotLivePreview ()
virtual EWidgetType getWidgetType () const
virtual LLString getWidgetTag () const
void draw ()
void reshape (S32 width, S32 height, BOOL called_from_parent)
void setSize (S32 w, S32 h)
void getSize (S32 &w, S32 &h) const
S32 getDataSize () const
ESnapshotType getSnapshotType () const
BOOL getSnapshotUpToDate () const
BOOL isSnapshotActive ()
LLImageGLgetCurrentImage ()
F32 getImageAspect ()
LLRect getImageRect ()
BOOL isImageScaled ()
void setSnapshotType (ESnapshotType type)
void setSnapshotQuality (S32 quality)
void setSnapshotBufferType (LLViewerWindow::ESnapshotType type)
void updateSnapshot (BOOL new_snapshot)
LLFloaterPostcardsavePostcard ()
void saveTexture ()
BOOL saveLocal ()

Static Public Member Functions

static void onIdle (void *snapshot_preview)

Static Public Attributes

static std::set< LLSnapshotLivePreview * > sList

Protected Attributes

LLColor4 mColor
LLPointer< LLImageGLmViewerImage [2]
LLRect mImageRect [2]
S32 mWidth [2]
S32 mHeight [2]
BOOL mImageScaled [2]
S32 mCurImageIndex
LLPointer< LLImageRawmRawImage
LLPointer< LLImageRawmRawImageEncoded
LLPointer< LLImageJPEGmJPEGImage
LLFrameTimer mSnapshotDelayTimer
S32 mShineCountdown
LLFrameTimer mShineAnimTimer
F32 mFlashAlpha
BOOL mNeedsFlash
LLVector3d mPosTakenGlobal
S32 mSnapshotQuality
S32 mDataSize
ESnapshotType mSnapshotType
BOOL mSnapshotUpToDate
LLFrameTimer mFallAnimTimer
LLVector3 mCameraPos
LLQuaternion mCameraRot
BOOL mSnapshotActive
LLViewerWindow::ESnapshotType mSnapshotBufferType

Detailed Description

---------------------------------------------------------------------------- Class LLSnapshotLivePreview ----------------------------------------------------------------------------

Definition at line 94 of file llfloatersnapshot.cpp.


Member Enumeration Documentation

enum LLSnapshotLivePreview::ESnapshotType

Enumerator:
SNAPSHOT_POSTCARD 
SNAPSHOT_TEXTURE 
SNAPSHOT_BITMAP 

Definition at line 97 of file llfloatersnapshot.cpp.


Constructor & Destructor Documentation

LLSnapshotLivePreview::LLSnapshotLivePreview ( const LLRect rect  ) 

Definition at line 169 of file llfloatersnapshot.cpp.

References f, FALSE, LLViewerWindow::getWindowDisplayHeight(), LLViewerWindow::getWindowDisplayWidth(), gViewerWindow, mHeight, mImageScaled, mSnapshotDelayTimer, mWidth, LLView::setFollowsAll(), LLFrameTimer::setTimerExpirySec(), sList, and LLFrameTimer::start().

LLSnapshotLivePreview::~LLSnapshotLivePreview (  ) 

Definition at line 201 of file llfloatersnapshot.cpp.

References mJPEGImage, mRawImage, mRawImageEncoded, NULL, and sList.


Member Function Documentation

void LLSnapshotLivePreview::draw (  )  [virtual]

Reimplemented from LLView.

Definition at line 309 of file llfloatersnapshot.cpp.

References LLViewerImage::bindTexture(), BORDER_WIDTH, clamp_rescale(), f, FALL_TIME, FALSE, LLFrameTimer::getElapsedTimeF32(), LLRectBase< Type >::getHeight(), LLCriticalDamp::getInterpolant(), LLView::getLocalRect(), LLFrameTimer::getStarted(), LLView::getVisible(), LLRectBase< Type >::getWidth(), LLViewerWindow::getWindowHeight(), LLViewerWindow::getWindowWidth(), gl_drop_shadow(), gl_rect_2d(), glBegin, glColor4f, glColor4fv, glEnd, glPopMatrix, glRotatef, glTranslatef, gViewerWindow, lerp(), llmin(), llround(), LLRectBase< Type >::mBottom, mCurImageIndex, mFallAnimTimer, mFlashAlpha, mHeight, mImageRect, mImageScaled, LLRectBase< Type >::mLeft, mNeedsFlash, mRawImageEncoded, LLView::mRect, LLRectBase< Type >::mRight, mShineAnimTimer, mShineCountdown, mSnapshotUpToDate, LLRectBase< Type >::mTop, LLColor4::mV, mViewerImage, mWidth, LLPointer< Type >::notNull(), rescale(), S32, SHINE_OPACITY, SHINE_TIME, SHINE_WIDTH, LLFrameTimer::start(), LLFrameTimer::stop(), and LLRectBase< Type >::stretch().

LLImageGL * LLSnapshotLivePreview::getCurrentImage (  ) 

Definition at line 212 of file llfloatersnapshot.cpp.

References mCurImageIndex, and mViewerImage.

Referenced by LLFloaterSnapshot::draw(), and savePostcard().

S32 LLSnapshotLivePreview::getDataSize (  )  const [inline]

Definition at line 115 of file llfloatersnapshot.cpp.

References mDataSize.

Referenced by LLFloaterSnapshot::draw().

F32 LLSnapshotLivePreview::getImageAspect (  ) 

Definition at line 217 of file llfloatersnapshot.cpp.

References LLControlGroup::getBOOL(), LLRectBase< Type >::getHeight(), LLRectBase< Type >::getWidth(), gSavedSettings, mCurImageIndex, mHeight, LLView::mRect, mViewerImage, and mWidth.

Referenced by LLFloaterSnapshot::draw().

LLRect LLSnapshotLivePreview::getImageRect (  ) 

Definition at line 237 of file llfloatersnapshot.cpp.

References mCurImageIndex, and mImageRect.

void LLSnapshotLivePreview::getSize ( S32 w,
S32 h 
) const

Definition at line 639 of file llfloatersnapshot.cpp.

References mCurImageIndex, mHeight, and mWidth.

Referenced by LLFloaterSnapshot::draw(), LLFloaterSnapshot::Impl::onCommitCustomResolution(), and LLFloaterSnapshot::Impl::onCommitResolution().

ESnapshotType LLSnapshotLivePreview::getSnapshotType (  )  const [inline]

Definition at line 117 of file llfloatersnapshot.cpp.

References mSnapshotType.

Referenced by LLFloaterSnapshot::draw(), LLFloaterSnapshot::Impl::onClickKeep(), and onIdle().

BOOL LLSnapshotLivePreview::getSnapshotUpToDate (  )  const [inline]

Definition at line 118 of file llfloatersnapshot.cpp.

References mSnapshotUpToDate.

Referenced by LLFloaterSnapshot::draw(), and reshape().

LLString LLSnapshotLivePreview::getWidgetTag (  )  const [virtual]

Implements LLView.

Definition at line 304 of file llfloatersnapshot.cpp.

References LL_SNAPSHOT_LIVE_PREVIEW_TAG.

EWidgetType LLSnapshotLivePreview::getWidgetType (  )  const [virtual]

Implements LLView.

Definition at line 299 of file llfloatersnapshot.cpp.

References WIDGET_TYPE_SNAPSHOT_LIVE_PREVIEW.

BOOL LLSnapshotLivePreview::isImageScaled (  ) 

Definition at line 242 of file llfloatersnapshot.cpp.

References mCurImageIndex, and mImageScaled.

Referenced by LLFloaterSnapshot::draw(), and savePostcard().

BOOL LLSnapshotLivePreview::isSnapshotActive (  )  [inline]

Definition at line 119 of file llfloatersnapshot.cpp.

References mSnapshotActive.

Referenced by LLFloaterSnapshot::draw().

void LLSnapshotLivePreview::onIdle ( void snapshot_preview  )  [static]

Definition at line 510 of file llfloatersnapshot.cpp.

References LLViewerImage::bindTexture(), LLWindow::decBusyCount(), dot(), FALSE, gAgent, gCamera, LLControlGroup::getBOOL(), LLAgent::getCameraPositionGlobal(), LLCoordFrame::getOrigin(), LLCoordFrame::getQuaternion(), getSnapshotType(), LLFrameTimer::getStarted(), LLView::getWindow(), gSavedSettings, gToolCamera, gViewerWindow, LLFrameTimer::hasExpired(), LLTool::hasMouseCapture(), LLWindow::incBusyCount(), llclamp(), mCameraPos, mCameraRot, mCurImageIndex, mDataSize, mHeight, mImageScaled, mJPEGImage, mPosTakenGlobal, mRawImage, mRawImageEncoded, mShineCountdown, mSnapshotActive, mSnapshotBufferType, mSnapshotDelayTimer, mSnapshotQuality, mSnapshotUpToDate, mViewerImage, mWidth, NULL, LLViewerWindow::rawSnapshot(), LLView::setEnabled(), LLView::setVisible(), SNAPSHOT_POSTCARD, SNAPSHOT_TEXTURE, LLFrameTimer::stop(), TRUE, and updateSnapshot().

Referenced by LLFloaterSnapshot::update().

void LLSnapshotLivePreview::reshape ( S32  width,
S32  height,
BOOL  called_from_parent 
) [virtual]

Reimplemented from LLView.

Definition at line 499 of file llfloatersnapshot.cpp.

References LLRectBase< Type >::getHeight(), getSnapshotUpToDate(), LLRectBase< Type >::getWidth(), LLView::mRect, LLView::reshape(), and updateSnapshot().

BOOL LLSnapshotLivePreview::saveLocal (  ) 

Definition at line 705 of file llfloatersnapshot.cpp.

References gViewerWindow, mRawImage, and LLViewerWindow::saveImageNumbered().

Referenced by LLFloaterSnapshot::Impl::onClickKeep().

LLFloaterPostcard * LLSnapshotLivePreview::savePostcard (  ) 

Definition at line 645 of file llfloatersnapshot.cpp.

References f, getCurrentImage(), isImageScaled(), llmin(), mCurImageIndex, mHeight, mJPEGImage, mPosTakenGlobal, mViewerImage, mWidth, NULL, LLVector2::setVec(), and LLFloaterPostcard::showFromSnapshot().

Referenced by LLFloaterSnapshot::Impl::onClickKeep().

void LLSnapshotLivePreview::saveTexture (  ) 

Definition at line 664 of file llfloatersnapshot.cpp.

References LLViewerWindow::alertXml(), LLAssetType::AT_SNAPSHOT_CATEGORY, LLAssetType::AT_TEXTURE, LLAgent::buildFullname(), LLAgent::buildLocationString(), gAgent, LLUUID::generate(), LLAgent::getSecureSessionID(), gVFS, gViewerStats, gViewerWindow, LLViewerStats::incStat(), LLInventoryType::IT_SNAPSHOT, llendl, llwarns, LLTransactionID::makeAssetID(), mRawImage, PERM_ALL, LLViewerStats::ST_SNAPSHOT_COUNT, upload_new_resource(), and LLVFile::writeFile().

Referenced by LLFloaterSnapshot::Impl::onClickKeep().

void LLSnapshotLivePreview::setSize ( S32  w,
S32  h 
)

Definition at line 633 of file llfloatersnapshot.cpp.

References mCurImageIndex, mHeight, and mWidth.

Referenced by LLFloaterSnapshot::Impl::onCommitCustomResolution(), and LLFloaterSnapshot::Impl::onCommitResolution().

void LLSnapshotLivePreview::setSnapshotBufferType ( LLViewerWindow::ESnapshotType  type  )  [inline]

Definition at line 127 of file llfloatersnapshot.cpp.

References mSnapshotBufferType.

Referenced by LLFloaterSnapshot::Impl::onCommitLayerTypes(), and LLFloaterSnapshot::Impl::updateControls().

void LLSnapshotLivePreview::setSnapshotQuality ( S32  quality  ) 

Definition at line 290 of file llfloatersnapshot.cpp.

References gSavedSettings, mSnapshotQuality, and LLControlGroup::setS32().

void LLSnapshotLivePreview::setSnapshotType ( ESnapshotType  type  )  [inline]

Definition at line 125 of file llfloatersnapshot.cpp.

References mSnapshotType.

Referenced by LLFloaterSnapshot::Impl::updateControls().

void LLSnapshotLivePreview::updateSnapshot ( BOOL  new_snapshot  ) 

Definition at line 247 of file llfloatersnapshot.cpp.

References FALSE, LLControlGroup::getBOOL(), LLRectBase< Type >::getHeight(), LLRectBase< Type >::getWidth(), gSavedSettings, llround(), LLRectBase< Type >::mBottom, mCurImageIndex, mFallAnimTimer, mHeight, mImageRect, LLRectBase< Type >::mLeft, LLView::mRect, LLRectBase< Type >::mRight, mShineAnimTimer, mSnapshotDelayTimer, mSnapshotUpToDate, LLRectBase< Type >::mTop, mWidth, S32, LLRectBase< Type >::set(), LLFrameTimer::setTimerExpirySec(), SNAPSHOT_TIME_DELAY, LLFrameTimer::start(), and LLFrameTimer::stop().

Referenced by LLFloaterSnapshot::Impl::checkAutoSnapshot(), LLFloaterSnapshot::Impl::onClickNewSnapshot(), LLFloaterSnapshot::Impl::onCommitSnapshotType(), onIdle(), and reshape().


Member Data Documentation

LLVector3 LLSnapshotLivePreview::mCameraPos [protected]

Definition at line 158 of file llfloatersnapshot.cpp.

Referenced by onIdle().

LLQuaternion LLSnapshotLivePreview::mCameraRot [protected]

Definition at line 159 of file llfloatersnapshot.cpp.

Referenced by onIdle().

LLColor4 LLSnapshotLivePreview::mColor [protected]

Definition at line 136 of file llfloatersnapshot.cpp.

S32 LLSnapshotLivePreview::mCurImageIndex [protected]

Definition at line 143 of file llfloatersnapshot.cpp.

Referenced by draw(), getCurrentImage(), getImageAspect(), getImageRect(), getSize(), isImageScaled(), onIdle(), savePostcard(), setSize(), and updateSnapshot().

S32 LLSnapshotLivePreview::mDataSize [protected]

Definition at line 154 of file llfloatersnapshot.cpp.

Referenced by getDataSize(), and onIdle().

LLFrameTimer LLSnapshotLivePreview::mFallAnimTimer [protected]

Definition at line 157 of file llfloatersnapshot.cpp.

Referenced by draw(), and updateSnapshot().

F32 LLSnapshotLivePreview::mFlashAlpha [protected]

Definition at line 150 of file llfloatersnapshot.cpp.

Referenced by draw().

S32 LLSnapshotLivePreview::mHeight[2] [protected]

Definition at line 140 of file llfloatersnapshot.cpp.

Referenced by draw(), getImageAspect(), getSize(), LLSnapshotLivePreview(), onIdle(), savePostcard(), setSize(), and updateSnapshot().

LLRect LLSnapshotLivePreview::mImageRect[2] [protected]

Definition at line 138 of file llfloatersnapshot.cpp.

Referenced by draw(), getImageRect(), and updateSnapshot().

BOOL LLSnapshotLivePreview::mImageScaled[2] [protected]

Definition at line 141 of file llfloatersnapshot.cpp.

Referenced by draw(), isImageScaled(), LLSnapshotLivePreview(), and onIdle().

LLPointer<LLImageJPEG> LLSnapshotLivePreview::mJPEGImage [protected]

Definition at line 146 of file llfloatersnapshot.cpp.

Referenced by onIdle(), savePostcard(), and ~LLSnapshotLivePreview().

BOOL LLSnapshotLivePreview::mNeedsFlash [protected]

Definition at line 151 of file llfloatersnapshot.cpp.

Referenced by draw().

LLVector3d LLSnapshotLivePreview::mPosTakenGlobal [protected]

Definition at line 152 of file llfloatersnapshot.cpp.

Referenced by onIdle(), and savePostcard().

LLPointer<LLImageRaw> LLSnapshotLivePreview::mRawImage [protected]

Definition at line 144 of file llfloatersnapshot.cpp.

Referenced by onIdle(), saveLocal(), saveTexture(), and ~LLSnapshotLivePreview().

LLPointer<LLImageRaw> LLSnapshotLivePreview::mRawImageEncoded [protected]

Definition at line 145 of file llfloatersnapshot.cpp.

Referenced by draw(), onIdle(), and ~LLSnapshotLivePreview().

LLFrameTimer LLSnapshotLivePreview::mShineAnimTimer [protected]

Definition at line 149 of file llfloatersnapshot.cpp.

Referenced by draw(), and updateSnapshot().

S32 LLSnapshotLivePreview::mShineCountdown [protected]

Definition at line 148 of file llfloatersnapshot.cpp.

Referenced by draw(), and onIdle().

BOOL LLSnapshotLivePreview::mSnapshotActive [protected]

Definition at line 160 of file llfloatersnapshot.cpp.

Referenced by isSnapshotActive(), and onIdle().

LLViewerWindow::ESnapshotType LLSnapshotLivePreview::mSnapshotBufferType [protected]

Definition at line 161 of file llfloatersnapshot.cpp.

Referenced by onIdle(), and setSnapshotBufferType().

LLFrameTimer LLSnapshotLivePreview::mSnapshotDelayTimer [protected]

Definition at line 147 of file llfloatersnapshot.cpp.

Referenced by LLSnapshotLivePreview(), onIdle(), and updateSnapshot().

S32 LLSnapshotLivePreview::mSnapshotQuality [protected]

Definition at line 153 of file llfloatersnapshot.cpp.

Referenced by onIdle(), and setSnapshotQuality().

ESnapshotType LLSnapshotLivePreview::mSnapshotType [protected]

Definition at line 155 of file llfloatersnapshot.cpp.

Referenced by getSnapshotType(), and setSnapshotType().

BOOL LLSnapshotLivePreview::mSnapshotUpToDate [protected]

Definition at line 156 of file llfloatersnapshot.cpp.

Referenced by draw(), getSnapshotUpToDate(), onIdle(), and updateSnapshot().

LLPointer<LLImageGL> LLSnapshotLivePreview::mViewerImage[2] [protected]

Definition at line 137 of file llfloatersnapshot.cpp.

Referenced by draw(), getCurrentImage(), getImageAspect(), onIdle(), and savePostcard().

S32 LLSnapshotLivePreview::mWidth[2] [protected]

Definition at line 139 of file llfloatersnapshot.cpp.

Referenced by draw(), getImageAspect(), getSize(), LLSnapshotLivePreview(), onIdle(), savePostcard(), setSize(), and updateSnapshot().

std::set< LLSnapshotLivePreview * > LLSnapshotLivePreview::sList [static]

Definition at line 164 of file llfloatersnapshot.cpp.

Referenced by LLSnapshotLivePreview(), LLFloaterSnapshot::update(), and ~LLSnapshotLivePreview().


The documentation for this class was generated from the following file:
Generated on Thu Jul 1 06:11:47 2010 for Second Life Viewer by  doxygen 1.4.7