#include <llviewercamera.h>
Inheritance diagram for LLViewerCamera:
Definition at line 50 of file llviewercamera.h.
LLViewerCamera::LLViewerCamera | ( | ) |
Definition at line 53 of file llviewercamera.cpp.
References calcProjection(), DEFAULT_FIELD_OF_VIEW, f, LLCamera::getFar(), i, mCameraFOVDefault, mGLProjectionMatrix, mPixelMeterRatio, mScreenPixelArea, mZoomFactor, mZoomSubregion, and S32.
BOOL LLViewerCamera::areVertsVisible | ( | LLViewerObject * | volumep, | |
BOOL | all_verts | |||
) |
Definition at line 625 of file llviewercamera.cpp.
References face, FALSE, LLVolume::getNumVolumeFaces(), LLVOVolume::getRelativeXform(), LLViewerObject::getRenderPosition(), LLViewerObject::getRenderRotation(), LLPrimitive::getVolume(), LLVolume::getVolumeFace(), i, LLDrawable::isActive(), LLViewerObject::mDrawable, LLCamera::pointInFrustum(), S32, LLVOVolume::updateRelativeXform(), and v.
Referenced by LLToolSelectRect::handleRectangleSelection().
Definition at line 119 of file llviewercamera.cpp.
References f, LLCamera::getAspect(), LLCamera::getNear(), LLCamera::getView(), LLMatrix4::mMatrix, mProjectionMatrix, and LLMatrix4::zero().
Referenced by getProjection(), and LLViewerCamera().
BOOL LLViewerCamera::cameraUnderWater | ( | ) | const |
Definition at line 620 of file llviewercamera.cpp.
References gAgent, LLCoordFrame::getOrigin(), LLAgent::getRegion(), LLViewerRegion::getWaterHeight(), LLVector3::mV, and VZ.
Referenced by LLDrawPoolWater::render(), LLDrawPoolWater::renderShaderSimple(), and LLDrawPoolWater::shade().
LLStat* LLViewerCamera::getAngularVelocityStat | ( | ) | [inline] |
Definition at line 75 of file llviewercamera.h.
References mAngularVelocityStat.
Referenced by idle(), and LLHoverView::updateHover().
F32 LLViewerCamera::getDefaultFOV | ( | ) | [inline] |
Definition at line 81 of file llviewercamera.h.
References mCameraFOVDefault.
Referenced by LLFloaterAnimPreview::postBuild(), LLImagePreviewSculpted::render(), LLImagePreviewAvatar::render(), LLPreviewAnimation::render(), LLSelectNode::renderOneSilhouette(), update_fov(), and LLAgent::updateCamera().
const LLMatrix4 & LLViewerCamera::getModelview | ( | ) | const |
Definition at line 111 of file llviewercamera.cpp.
References LLCoordFrame::getMatrixToLocal(), mModelviewMatrix, and OGL_TO_CFR_ROTATION.
Referenced by LLManipTranslate::highlightManipulators(), LLManipScale::highlightManipulators(), LLDrawPoolWater::render(), LLDrawPoolWater::renderShaderSimple(), and LLPipeline::setupAvatarLights().
F32 LLViewerCamera::getPixelMeterRatio | ( | ) | const [inline] |
Definition at line 87 of file llviewercamera.h.
References mPixelMeterRatio.
Referenced by LLManip::getSubdivisionLevel(), LLManipTranslate::renderSnapGuides(), LLVOAvatar::setPixelAreaAndAngle(), LLViewerObject::setPixelAreaAndAngle(), LLVOPartGroup::updateGeometry(), and LLManipScale::updateSnapGuides().
void LLViewerCamera::getPixelVectors | ( | const LLVector3 & | pos_agent, | |
LLVector3 & | up, | |||
LLVector3 & | right | |||
) |
Definition at line 577 of file llviewercamera.cpp.
References f, LLCoordFrame::getAtAxis(), LLViewerWindow::getDisplayScale(), LLCoordFrame::getLeftAxis(), LLCoordFrame::getOrigin(), LLWindow::getPixelAspectRatio(), LLCoordFrame::getUpAxis(), LLCamera::getView(), LLCamera::getViewHeightInPixels(), LLViewerWindow::getWindow(), gViewerWindow, LLVector2::mV, right, VX, and VY.
Referenced by hud_render_text(), LLVOAvatar::idleUpdate(), LLHUDIcon::renderIcon(), LLHUDText::renderText(), LLHUDText::updateScreenPos(), and LLHUDText::updateVisibility().
const LLVector3& LLViewerCamera::getPointOfInterest | ( | ) | [inline] |
Definition at line 85 of file llviewercamera.h.
References mLastPointOfInterest.
Referenced by LLAgent::changeCameraToFollow(), and LLSelectNode::renderOneSilhouette().
const LLMatrix4 & LLViewerCamera::getProjection | ( | ) | const |
Definition at line 104 of file llviewercamera.cpp.
References calcProjection(), LLCamera::getFar(), and mProjectionMatrix.
Referenced by LLManipTranslate::highlightManipulators(), and LLManipScale::highlightManipulators().
S32 LLViewerCamera::getScreenPixelArea | ( | ) | const [inline] |
Definition at line 88 of file llviewercamera.h.
References mScreenPixelArea.
Referenced by LLVolumeImplFlexible::doIdleUpdate(), LLSpatialPartition::renderDebug(), LLViewerObject::setPixelAreaAndAngle(), and LLVOVolume::updateTextures().
LLStat* LLViewerCamera::getVelocityStat | ( | ) | [inline] |
Definition at line 74 of file llviewercamera.h.
References mVelocityStat.
Referenced by idle(), LLHUDText::updateAll(), and LLHoverView::updateHover().
F32 LLViewerCamera::getZoomFactor | ( | ) | [inline] |
Definition at line 91 of file llviewercamera.h.
References mZoomFactor.
Referenced by LLViewerWindow::draw(), render_ui_2d(), and setup_hud_matrices().
S16 LLViewerCamera::getZoomSubRegion | ( | ) | [inline] |
Definition at line 92 of file llviewercamera.h.
References mZoomSubregion.
Referenced by LLViewerWindow::draw(), render_ui_2d(), and setup_hud_matrices().
BOOL LLViewerCamera::projectPosAgentToScreen | ( | const LLVector3 & | pos_agent, | |
LLCoordGL & | out_point, | |||
const BOOL | clamp = TRUE | |||
) | const |
Definition at line 337 of file llviewercamera.cpp.
References f, FALSE, LLCoordFrame::getAtAxis(), LLViewerWindow::getDisplayScale(), LLCoordFrame::getOrigin(), LLViewerWindow::getWindowRect(), gGLModelView, gGLViewport, gViewerWindow, lltrunc(), LLVector3::magVec(), LLRectBase< Type >::mBottom, mGLProjectionMatrix, LLRectBase< Type >::mLeft, LLRectBase< Type >::mRight, LLRectBase< Type >::mTop, LLVector2::mV, LLVector3::mV, LLCoord::mX, LLCoord::mY, S32, TRUE, VX, VY, VZ, x, y, and z.
Referenced by LLTracker::drawMarker(), LLToolGrab::handleHoverActive(), LLManipTranslate::handleMouseDownOnPart(), LLToolCamera::handleMouseUp(), LLToolGrab::onMouseCaptureLost(), LLHUDText::renderText(), roundToPixel(), LLHUDText::updateScreenPos(), and LLManipRotate::updateVisiblity().
BOOL LLViewerCamera::projectPosAgentToScreenEdge | ( | const LLVector3 & | pos_agent, | |
LLCoordGL & | out_point | |||
) | const |
Definition at line 441 of file llviewercamera.cpp.
References f, FALSE, LLCoordFrame::getAtAxis(), LLViewerWindow::getDisplayScale(), LLRectBase< Type >::getHeight(), LLCoordFrame::getOrigin(), LLViewerWindow::getVirtualWindowRect(), LLRectBase< Type >::getWidth(), gGLModelView, gGLViewport, gViewerWindow, lltrunc(), LLVector3::magVec(), LLRectBase< Type >::mBottom, mGLProjectionMatrix, LLRectBase< Type >::mLeft, LLRectBase< Type >::mRight, LLRectBase< Type >::mTop, LLVector2::mV, LLVector3::mV, LLCoord::mX, LLCoord::mY, S32, TRUE, VX, VY, VZ, x, y, and z.
Referenced by LLTracker::drawMarker().
void LLViewerCamera::projectScreenToPosAgent | ( | const S32 | screen_x, | |
const S32 | screen_y, | |||
LLVector3 * | pos_agent | |||
) | const |
Definition at line 321 of file llviewercamera.cpp.
References gGLModelView, gGLViewport, mGLProjectionMatrix, LLVector3::setVec(), x, y, and z.
Referenced by LLManipRotate::mouseToRay(), and roundToPixel().
void LLViewerCamera::rotateToLeftEye | ( | ) |
Definition at line 684 of file llviewercamera.cpp.
References LLControlGroup::getF32(), LLCoordFrame::getLeftAxis(), LLCoordFrame::getUpAxis(), gSavedSettings, mCameraTempPosition, mStereoLastPOI, LLVector3::normVec(), and updateCameraLocation().
Referenced by display().
void LLViewerCamera::rotateToRightEye | ( | ) |
Definition at line 702 of file llviewercamera.cpp.
References LLControlGroup::getF32(), LLCoordFrame::getLeftAxis(), LLCoordFrame::getUpAxis(), gSavedSettings, mCameraTempPosition, mStereoLastPOI, LLVector3::normVec(), and updateCameraLocation().
Referenced by display().
Definition at line 593 of file llviewercamera.cpp.
References FALSE, LLCoordFrame::getOrigin(), LLCoord::mX, LLCoord::mY, LLVector3::normVec(), projectPosAgentToScreen(), and projectScreenToPosAgent().
Definition at line 80 of file llviewercamera.h.
References mCameraFOVDefault.
Referenced by LLViewZoomDefault::handleEvent(), and update_fov().
void LLViewerCamera::setPerspective | ( | BOOL | for_selection, | |
S32 | x, | |||
S32 | y_from_bot, | |||
S32 | width, | |||
S32 | height, | |||
BOOL | limit_select_distance, | |||
F32 | z_near = 0 , |
|||
F32 | z_far = 0 | |||
) |
Definition at line 188 of file llviewercamera.cpp.
References bottom, LLCamera::calculateFrustumPlanesFromWindow(), f, FALSE, gAgent, LLControlGroup::getBOOL(), LLControlGroup::getF32(), LLCamera::getFar(), LLCamera::getNear(), LLCoordFrame::getOpenGLTransform(), LLCamera::getView(), LLViewerWindow::getWindowHeight(), LLViewerWindow::getWindowWidth(), gGLModelView, gGLViewport, glGetIntegerv, glLoadMatrixf, glMultMatrixf, glRotatef, glTranslatef, gProjectionMat, gSavedSettings, gViewerWindow, left, llceil(), MAX_FAR_CLIP, LLAgent::mDrawDistance, mGLProjectionMatrix, mZoomFactor, mZoomSubregion, OGL_TO_CFR_ROTATION, RAD_TO_DEG, right, top, TRUE, and updateFrustumPlanes().
Referenced by LLViewerWindow::analyzeHit(), LLToolSelectRect::handleRectangleSelection(), LLViewerWindow::hitObjectOrLandGlobalAsync(), LLVisualParamHint::render(), LLImagePreviewSculpted::render(), LLImagePreviewAvatar::render(), LLPreviewAnimation::render(), and LLViewerWindow::setup3DRender().
Definition at line 90 of file llviewercamera.h.
References mZoomFactor, and mZoomSubregion.
Referenced by display(), and LLViewerWindow::rawSnapshot().
void LLViewerCamera::updateCameraLocation | ( | const LLVector3 & | center, | |
const LLVector3 & | up_direction, | |||
const LLVector3 & | point_of_interest | |||
) |
Definition at line 68 of file llviewercamera.cpp.
References LLStat::addValue(), gAgent, LLQuaternion::getAngleAxis(), LLCoordFrame::getAtAxis(), LLCoordFrame::getOrigin(), LLAgent::getPositionAgent(), mAngularVelocityStat, LLCamera::mAspect, mCameraFOVDefault, mLastPointOfInterest, mPixelMeterRatio, mScreenPixelArea, mVelocityStat, LLCamera::mViewHeightInPixels, S32, LLCoordFrame::setOriginAndLookAt(), LLQuaternion::shortestArc(), tanf, x, y, and z.
Referenced by rotateToLeftEye(), rotateToRightEye(), and LLAgent::updateCamera().
Definition at line 145 of file llviewercamera.cpp.
References LLCamera::calcAgentFrustumPlanes(), LLCamera::getFar(), LLCoordFrame::getOrigin(), glGetIntegerv, i, LLVector3::normVec(), and LLVector3::setVec().
Referenced by display(), LLPipeline::generateReflectionMap(), and setPerspective().
void LLViewerCamera::updateStereoValues | ( | ) |
Definition at line 675 of file llviewercamera.cpp.
References LLCoordFrame::getOrigin(), mCameraTempPosition, mLastPointOfInterest, and mStereoLastPOI.
Referenced by display().
LLStat LLViewerCamera::mAngularVelocityStat [protected] |
Definition at line 106 of file llviewercamera.h.
Referenced by getAngularVelocityStat(), and updateCameraLocation().
F32 LLViewerCamera::mCameraFOVDefault [protected] |
Definition at line 109 of file llviewercamera.h.
Referenced by getDefaultFOV(), LLViewerCamera(), setDefaultFOV(), and updateCameraLocation().
LLVector3 LLViewerCamera::mCameraTempPosition [protected] |
Definition at line 117 of file llviewercamera.h.
Referenced by rotateToLeftEye(), rotateToRightEye(), and updateStereoValues().
Definition at line 122 of file llviewercamera.h.
Referenced by LLViewerCamera(), projectPosAgentToScreen(), projectPosAgentToScreenEdge(), projectScreenToPosAgent(), and setPerspective().
LLVector3 LLViewerCamera::mLastPointOfInterest [protected] |
Definition at line 110 of file llviewercamera.h.
Referenced by getPointOfInterest(), updateCameraLocation(), and updateStereoValues().
LLMatrix4 LLViewerCamera::mModelviewMatrix [mutable, protected] |
F32 LLViewerCamera::mPixelMeterRatio [protected] |
Definition at line 111 of file llviewercamera.h.
Referenced by getPixelMeterRatio(), LLViewerCamera(), and updateCameraLocation().
LLMatrix4 LLViewerCamera::mProjectionMatrix [mutable, protected] |
Definition at line 107 of file llviewercamera.h.
Referenced by calcProjection(), and getProjection().
S32 LLViewerCamera::mScreenPixelArea [protected] |
Definition at line 112 of file llviewercamera.h.
Referenced by getScreenPixelArea(), LLViewerCamera(), and updateCameraLocation().
LLVector3 LLViewerCamera::mStereoLastPOI [protected] |
Definition at line 118 of file llviewercamera.h.
Referenced by rotateToLeftEye(), rotateToRightEye(), and updateStereoValues().
LLStat LLViewerCamera::mVelocityStat [protected] |
Definition at line 105 of file llviewercamera.h.
Referenced by getVelocityStat(), and updateCameraLocation().
F32 LLViewerCamera::mZoomFactor [protected] |
Definition at line 113 of file llviewercamera.h.
Referenced by getZoomFactor(), LLViewerCamera(), setPerspective(), and setZoomParameters().
S16 LLViewerCamera::mZoomSubregion [protected] |
Definition at line 114 of file llviewercamera.h.
Referenced by getZoomSubRegion(), LLViewerCamera(), setPerspective(), and setZoomParameters().