#include <llcamera.h>
Inheritance diagram for LLCamera:
Definition at line 75 of file llcamera.h.
anonymous enum |
Definition at line 79 of file llcamera.h.
anonymous enum |
Definition at line 86 of file llcamera.h.
anonymous enum |
Definition at line 93 of file llcamera.h.
anonymous enum |
Definition at line 98 of file llcamera.h.
LLCamera::LLCamera | ( | ) |
LLCamera::LLCamera | ( | F32 | z_field_of_view, | |
F32 | aspect_ratio, | |||
S32 | view_height_in_pixels, | |||
F32 | near_plane, | |||
F32 | far_plane | |||
) |
Definition at line 52 of file llcamera.cpp.
References calculateFrustumPlanes(), DEFAULT_FAR_PLANE, mAspect, MAX_ASPECT_RATIO, MAX_FAR_PLANE, MAX_FIELD_OF_VIEW, MAX_NEAR_PLANE, mFarPlane, MIN_ASPECT_RATIO, MIN_FAR_PLANE, MIN_FIELD_OF_VIEW, MIN_NEAR_PLANE, mNearPlane, and mView.
Definition at line 153 of file llcamera.cpp.
References d, i, mAgentPlaneMask, mAgentPlanes, mask, n, p, S32, and LLVector3::scaledVec().
Referenced by LLOctreeCull::checkObjects(), earlyFail(), LLSpatialBridge::setVisible(), and LLOctreeCull::traverse().
Definition at line 481 of file llcamera.cpp.
References i, mAgentFrustum, mAgentPlaneMask, mAgentPlanes, mask, n, p, and planeFromPoints().
Referenced by LLViewerWindow::hitObjectOrLandGlobalAsync(), and LLViewerCamera::updateFrustumPlanes().
Definition at line 534 of file llcamera.cpp.
References a, b, c, f, mFarPlane, mFrustCenter, mFrustRadiusSquared, mLocalPlanes, PLANE_BOTTOM, PLANE_LEFT, PLANE_RIGHT, PLANE_TOP, LLPlane::setVec(), LLCoordFrame::transformToAbsolute(), and X_AXIS.
void LLCamera::calculateFrustumPlanes | ( | ) | [protected] |
Definition at line 455 of file llcamera.cpp.
References bottom, f, left, mAspect, mFarPlane, mView, right, tanf, and top.
Referenced by calculateFrustumPlanesFromWindow(), LLCamera(), setAspect(), setFar(), setNear(), setView(), and setViewHeightInPixels().
Definition at line 564 of file llcamera.cpp.
References bottom, calculateFrustumPlanes(), f, left, mAspect, mFarPlane, mView, right, tanf, and top.
Referenced by LLViewerCamera::setPerspective().
void LLCamera::calculateWorldFrustumPlanes | ( | ) | [protected] |
Definition at line 578 of file llcamera.cpp.
References d, f, getYaw(), HORIZ_PLANE_LEFT, HORIZ_PLANE_RIGHT, mHorizPlanes, mLocalPlanes, mNearPlane, LLCoordFrame::mOrigin, mWorldPlanePos, mWorldPlanes, LLCoordFrame::mXAxis, LLVector3::normVec(), p, PLANE_LEFT, PLANE_RIGHT, LLCoordFrame::rotateToAbsolute(), LLVector3::rotVec(), and LLCoordFrame::yaw().
F32 LLCamera::getAspect | ( | ) | const [inline] |
Definition at line 135 of file llcamera.h.
References mAspect.
Referenced by LLVOAvatar::buildSkeleton(), LLAgent::calcCustomizeAvatarUIOffset(), LLViewerCamera::calcProjection(), LLNetMap::draw(), LLWorldMapView::drawFrustum(), LLManip::getMousePointOnPlaneGlobal(), LLToolsLookAtSelection::handleEvent(), LLManipTranslate::highlightManipulators(), LLManipScale::highlightManipulators(), LLViewerWindow::mouseDirectionCamera(), LLManip::nearestPointOnLineFromMouse(), operator<<(), LLDynamicTexture::postRender(), LLDynamicTexture::preRender(), LLViewerWindow::renderSelections(), LLSelectMgr::renderSilhouettes(), LLVOAvatar::setPixelAreaAndAngle(), setup_hud_matrices(), LLVOAvatar::updateCharacter(), and LLHUDText::updateScreenPos().
F32 LLCamera::getFar | ( | ) | const [inline] |
Definition at line 137 of file llcamera.h.
References mFarPlane.
Referenced by LLNetMap::draw(), LLWorldMapView::drawFrustum(), LLPipeline::generateReflectionMap(), LLViewerCamera::getProjection(), LLToolSelectRect::handleRectangleSelection(), LLViewerWindow::hitObjectOrLandGlobalAsync(), LLViewerWindow::hitUIElementAsync(), LLViewerCamera::LLViewerCamera(), LLViewerWindow::rawSnapshot(), LLTracker::renderBeacon(), LLPipeline::renderGeom(), LLViewerCamera::setPerspective(), LLViewerCamera::updateFrustumPlanes(), LLVOSky::updateSky(), and LLWorld::updateVisibilities().
F32 LLCamera::getNear | ( | ) | const [inline] |
Definition at line 136 of file llcamera.h.
References mNearPlane.
Referenced by LLViewerCamera::calcProjection(), LLToolSelectRect::handleRectangleSelection(), LLViewerWindow::hitObjectOrLandGlobalAsync(), LLViewerWindow::hitUIElementAsync(), LLMorphView::initialize(), LLDynamicTexture::postRender(), LLDynamicTexture::preRender(), LLViewerWindow::rawSnapshot(), raycast_for_new_obj_pos(), LLViewerCamera::setPerspective(), LLViewerWindow::setup3DRender(), LLVOSky::updateFog(), LLVOAvatar::updateHeadOffset(), and LLHUDText::updateVisibility().
F32 LLCamera::getPitch | ( | ) | const [inline] |
F32 LLCamera::getView | ( | ) | const [inline] |
Definition at line 133 of file llcamera.h.
References mView.
Referenced by LLAgent::calcCustomizeAvatarUIOffset(), LLViewerCamera::calcProjection(), LLVolumeImplFlexible::doIdleUpdate(), LLNetMap::draw(), LLWorldMapView::drawFrustum(), LLViewerCamera::getPixelVectors(), LLToolsLookAtSelection::handleEvent(), LLViewZoomDefault::handleEvent(), LLDrawable::incrementVisible(), LLViewerWindow::mouseDirectionCamera(), LLViewerWindow::mouseDirectionGlobal(), operator<<(), LLDynamicTexture::postRender(), LLDynamicTexture::preRender(), LLManipScale::render(), LLSelectNode::renderOneSilhouette(), LLManipTranslate::renderSnapGuides(), LLManipTranslate::renderTranslationHandles(), LLViewerCamera::setPerspective(), LLVOTree::setPixelAreaAndAngle(), LLVOGrass::setPixelAreaAndAngle(), LLDebugText::update(), LLViewerJoystick::updateCamera(), and LLManipRotate::updateVisiblity().
S32 LLCamera::getViewHeightInPixels | ( | ) | const [inline] |
Definition at line 134 of file llcamera.h.
References mViewHeightInPixels.
Referenced by LLViewerCamera::getPixelVectors(), LLManipScale::render(), LLManipTranslate::renderSnapGuides(), LLManipTranslate::renderTranslationHandles(), LLVOTree::setPixelAreaAndAngle(), LLVOGrass::setPixelAreaAndAngle(), LLVOAvatar::setPixelAreaAndAngle(), and LLManipRotate::updateVisiblity().
const LLVector3& LLCamera::getWorldPlanePos | ( | ) | const [inline] |
F32 LLCamera::getYaw | ( | ) | const [inline] |
Definition at line 139 of file llcamera.h.
References LLCoordFrame::mXAxis, VX, and VY.
Referenced by calculateWorldFrustumPlanes().
Definition at line 333 of file llcamera.cpp.
References angle, f, LLVector3::magVec(), LLCoordFrame::mOrigin, mView, and mViewHeightInPixels.
Definition at line 164 of file llcamera.h.
References f, and sphereInFrustum().
Referenced by LLViewerCamera::areVertsVisible().
size_t LLCamera::readFrustumFromBuffer | ( | const char * | buffer | ) |
Definition at line 97 of file llcamera.cpp.
References calculateFrustumPlanes(), mAspect, MAX_ASPECT_RATIO, and MIN_ASPECT_RATIO.
Referenced by LLPanelDisplay::applyResolution(), LLViewerWindow::hitObjectOrLandGlobalAsync(), LLViewerWindow::hitUIElementAsync(), idle_startup(), LLAgent::init(), LLDynamicTexture::postRender(), LLDynamicTexture::preRender(), LLVisualParamHint::render(), LLImagePreviewSculpted::render(), LLImagePreviewAvatar::render(), and LLViewerWindow::reshape().
Definition at line 115 of file llcamera.cpp.
References calculateFrustumPlanes(), MAX_FAR_PLANE, mFarPlane, and MIN_FAR_PLANE.
Referenced by display_update_camera(), LLToolSelectRect::handleRectangleSelection(), LLViewerWindow::hitObjectOrLandGlobalAsync(), LLViewerWindow::hitUIElementAsync(), LLAgent::init(), LLSpatialPartition::processImagery(), and LLWorld::updateVisibilities().
Definition at line 106 of file llcamera.cpp.
References calculateFrustumPlanes(), MAX_NEAR_PLANE, MIN_NEAR_PLANE, and mNearPlane.
Referenced by display(), LLToolSelectRect::handleRectangleSelection(), LLViewerWindow::hitObjectOrLandGlobalAsync(), LLViewerWindow::hitUIElementAsync(), LLAgent::init(), LLMorphView::initialize(), LLDynamicTexture::postRender(), LLDynamicTexture::preRender(), and LLMorphView::shutdown().
Definition at line 81 of file llcamera.cpp.
References calculateFrustumPlanes(), MAX_FIELD_OF_VIEW, MIN_FIELD_OF_VIEW, and mView.
Referenced by LLViewZoomDefault::handleEvent(), LLViewerWindow::hitObjectOrLandGlobalAsync(), LLViewerWindow::hitUIElementAsync(), LLAgent::init(), LLDynamicTexture::postRender(), LLDynamicTexture::preRender(), LLImagePreviewSculpted::render(), LLImagePreviewAvatar::render(), LLPreviewAnimation::render(), update_fov(), LLViewerJoystick::updateCamera(), and LLAgent::updateCamera().
Definition at line 89 of file llcamera.cpp.
References calculateFrustumPlanes(), and mViewHeightInPixels.
Referenced by idle_startup(), LLAgent::init(), and LLViewerWindow::reshape().
Definition at line 309 of file llcamera.cpp.
References d, i, and mAgentPlanes.
Referenced by LLToolSelectRect::handleRectangleSelection(), LLSpatialPartition::isVisible(), pointInFrustum(), sphereInFrustumFull(), LLWorld::updateVisibilities(), LLSurfacePatch::updateVisibility(), and LLHUDText::updateVisibility().
Definition at line 213 of file llcamera.cpp.
References FALSE, mFarPlane, MIN_NEAR_PLANE, mLocalPlanes, LLCoordFrame::mOrigin, LLCoordFrame::mXAxis, LLCoordFrame::mYAxis, LLCoordFrame::mZAxis, PLANE_BOTTOM, PLANE_LEFT, PLANE_RIGHT, PLANE_TOP, TRUE, VX, VY, VZ, x, y, and z.
F32 LLCamera::visibleDistance | ( | const LLVector3 & | pos, | |
F32 | rad, | |||
F32 | fudgescale = 1.0f , |
|||
U32 | planemask = PLANE_ALL_MASK | |||
) | const |
Definition at line 365 of file llcamera.cpp.
References LLPlane::dist(), LLVector3::magVec(), mFixedDistance, LLCoordFrame::mOrigin, mWorldPlanes, LLCoordFrame::mXAxis, p, and PLANE_NUM.
F32 LLCamera::visibleHorizDistance | ( | const LLVector3 & | pos, | |
F32 | rad, | |||
F32 | fudgescale = 1.0f , |
|||
U32 | planemask = HORIZ_PLANE_ALL_MASK | |||
) | const |
Definition at line 397 of file llcamera.cpp.
References LLPlane::dist(), HORIZ_PLANE_NUM, LLVector3::magVec(), mFixedDistance, mHorizPlanes, LLCoordFrame::mOrigin, and p.
size_t LLCamera::writeFrustumToBuffer | ( | char * | buffer | ) | const |
std::ostream& operator<< | ( | std::ostream & | s, | |
const LLCamera & | C | |||
) | [friend] |
Definition at line 424 of file llcamera.cpp.
Definition at line 121 of file llcamera.h.
Referenced by calcAgentFrustumPlanes(), and LLViewerWindow::hitObjectOrLandGlobalAsync().
U8 LLCamera::mAgentPlaneMask[6] [protected] |
Definition at line 118 of file llcamera.h.
Referenced by AABBInFrustum(), and calcAgentFrustumPlanes().
LLPlane LLCamera::mAgentPlanes[6] [protected] |
Definition at line 117 of file llcamera.h.
Referenced by AABBInFrustum(), calcAgentFrustumPlanes(), and sphereInFrustum().
F32 LLCamera::mAspect [protected] |
Definition at line 106 of file llcamera.h.
Referenced by calculateFrustumPlanes(), calculateFrustumPlanesFromWindow(), getAspect(), LLCamera(), readFrustumFromBuffer(), setAspect(), LLViewerCamera::updateCameraLocation(), and writeFrustumToBuffer().
F32 LLCamera::mFarPlane [protected] |
Definition at line 109 of file llcamera.h.
Referenced by calculateFrustumPlanes(), calculateFrustumPlanesFromWindow(), getFar(), LLCamera(), operator<<(), readFrustumFromBuffer(), setFar(), sphereInFrustumOld(), sphereInFrustumQuick(), and writeFrustumToBuffer().
F32 LLCamera::mFixedDistance [protected] |
Definition at line 111 of file llcamera.h.
Referenced by setFixedDistance(), visibleDistance(), and visibleHorizDistance().
LLVector3 LLCamera::mFrustCenter [protected] |
Definition at line 112 of file llcamera.h.
Referenced by calculateFrustumPlanes(), and sphereInFrustumQuick().
F32 LLCamera::mFrustRadiusSquared [protected] |
LLPlane LLCamera::mHorizPlanes[HORIZ_PLANE_NUM] [protected] |
Definition at line 116 of file llcamera.h.
Referenced by calculateWorldFrustumPlanes(), and visibleHorizDistance().
LLPlane LLCamera::mLocalPlanes[4] [protected] |
Definition at line 110 of file llcamera.h.
Referenced by calculateFrustumPlanes(), calculateWorldFrustumPlanes(), operator<<(), and sphereInFrustumOld().
F32 LLCamera::mNearPlane [protected] |
Definition at line 108 of file llcamera.h.
Referenced by calculateWorldFrustumPlanes(), getNear(), LLCamera(), operator<<(), readFrustumFromBuffer(), setNear(), and writeFrustumToBuffer().
F32 LLCamera::mView [protected] |
Definition at line 105 of file llcamera.h.
Referenced by calculateFrustumPlanes(), calculateFrustumPlanesFromWindow(), getView(), heightInPixels(), LLCamera(), readFrustumFromBuffer(), setView(), and writeFrustumToBuffer().
S32 LLCamera::mViewHeightInPixels [protected] |
Definition at line 107 of file llcamera.h.
Referenced by getViewHeightInPixels(), heightInPixels(), setViewHeightInPixels(), and LLViewerCamera::updateCameraLocation().
LLVector3 LLCamera::mWorldPlanePos [protected] |
Definition at line 119 of file llcamera.h.
Referenced by calculateWorldFrustumPlanes(), and getWorldPlanePos().
LLPlane LLCamera::mWorldPlanes[PLANE_NUM] [protected] |
Definition at line 115 of file llcamera.h.
Referenced by calculateWorldFrustumPlanes(), getWorldPlane(), and visibleDistance().