#include <llfollowcam.h>
Inheritance diagram for LLFollowCam:
Definition at line 120 of file llfollowcam.h.
LLFollowCam::LLFollowCam | ( | ) |
Definition at line 260 of file llfollowcam.cpp.
References LLQuaternion::DEFAULT, LLFollowCamParams::mDistance, mPitchSineAndCosineNeedToBeUpdated, mSimulatedDistance, mSubjectPosition, mSubjectRotation, mUpVector, mZoomedToMinimumDistance, LLVector3::z_axis, and LLVector3::zero.
LLFollowCam::~LLFollowCam | ( | ) | [virtual] |
Definition at line 668 of file llfollowcam.cpp.
void LLFollowCam::calculatePitchSineAndCosine | ( | ) | [protected] |
Definition at line 508 of file llfollowcam.cpp.
References DEG_TO_RAD, LLFollowCamParams::mPitch, mPitchCos, and mPitchSin.
Referenced by update().
void LLFollowCam::copyParams | ( | LLFollowCamParams & | params | ) |
Definition at line 272 of file llfollowcam.cpp.
References params, LLFollowCamParams::setBehindnessAngle(), LLFollowCamParams::setBehindnessLag(), setDistance(), setFocus(), LLFollowCamParams::setFocusLag(), setFocusLocked(), LLFollowCamParams::setFocusOffset(), LLFollowCamParams::setFocusThreshold(), setPitch(), setPosition(), LLFollowCamParams::setPositionLag(), setPositionLocked(), and LLFollowCamParams::setPositionThreshold().
Referenced by LLAgent::updateCamera().
LLVector3 LLFollowCam::getSimulatedFocus | ( | ) | const |
Definition at line 653 of file llfollowcam.cpp.
References mRelativeFocus, mSubjectPosition, and mSubjectRotation.
Referenced by LLAgent::calcFocusPositionTargetGlobal().
LLVector3 LLFollowCam::getSimulatedPosition | ( | ) | const |
Definition at line 647 of file llfollowcam.cpp.
References mRelativePos, mSubjectPosition, and mSubjectRotation.
Referenced by LLAgent::calcCameraPositionTargetGlobal().
LLVector3 LLFollowCam::getUpVector | ( | ) |
Definition at line 659 of file llfollowcam.cpp.
References mUpVector.
Referenced by LLAgent::updateCamera().
bool LLFollowCam::isZoomedToMinimumDistance | ( | ) |
Definition at line 563 of file llfollowcam.cpp.
References mZoomedToMinimumDistance.
Referenced by LLAgent::handleScrollWheel().
void LLFollowCam::reset | ( | const LLVector3 | position, | |
const LLVector3 | focus, | |||
const LLVector3 | upVector | |||
) |
Definition at line 570 of file llfollowcam.cpp.
References f, mUpVector, p, setFocus(), setPosition(), and u.
Referenced by LLAgent::changeCameraToFollow().
Reimplemented from LLFollowCamParams.
Definition at line 590 of file llfollowcam.cpp.
References LLFollowCamParams::mDistance, mSimulatedDistance, mZoomedToMinimumDistance, and LLFollowCamParams::setDistance().
Referenced by copyParams().
Reimplemented from LLFollowCamParams.
Definition at line 613 of file llfollowcam.cpp.
References f, gAgent, LLAgent::getPosGlobalFromAgent(), LLFollowCamParams::mFocus, LLFollowCamParams::mFocusLocked, mRelativeFocus, mSimulatedFocusGlobal, mSubjectPosition, mSubjectRotation, and LLFollowCamParams::setFocus().
Referenced by copyParams(), and reset().
void LLFollowCam::setFocusLocked | ( | bool | ) | [virtual] |
Reimplemented from LLFollowCamParams.
Definition at line 636 of file llfollowcam.cpp.
References gAgent, LLAgent::getPosAgentFromGlobal(), mRelativeFocus, mSimulatedFocusGlobal, mSubjectPosition, mSubjectRotation, and LLFollowCamParams::setFocusLocked().
Referenced by copyParams().
Definition at line 578 of file llfollowcam.cpp.
References LLFollowCamParams::mMaxCameraDistantFromSubject.
Referenced by LLAgent::LLAgent().
Reimplemented from LLFollowCamParams.
Definition at line 584 of file llfollowcam.cpp.
References mPitchSineAndCosineNeedToBeUpdated, and LLFollowCamParams::setPitch().
Referenced by copyParams().
Reimplemented from LLFollowCamParams.
Definition at line 600 of file llfollowcam.cpp.
References gAgent, LLAgent::getPosGlobalFromAgent(), LLFollowCamParams::mPosition, LLFollowCamParams::mPositionLocked, mRelativePos, mSimulatedPositionGlobal, mSubjectPosition, mSubjectRotation, p, and LLFollowCamParams::setPosition().
Referenced by copyParams(), and reset().
void LLFollowCam::setPositionLocked | ( | bool | ) | [virtual] |
Reimplemented from LLFollowCamParams.
Definition at line 626 of file llfollowcam.cpp.
References gAgent, LLAgent::getPosAgentFromGlobal(), mRelativePos, mSimulatedPositionGlobal, mSubjectPosition, mSubjectRotation, and LLFollowCamParams::setPositionLocked().
Referenced by copyParams().
void LLFollowCam::setSubjectPositionAndRotation | ( | const LLVector3 | p, | |
const LLQuaternion | r | |||
) |
Definition at line 516 of file llfollowcam.cpp.
References mSubjectPosition, mSubjectRotation, p, and r.
Referenced by LLAgent::updateCamera().
void LLFollowCam::update | ( | ) |
Definition at line 298 of file llfollowcam.cpp.
References calculatePitchSineAndCosine(), DISTANCE_EPSILON, f, gAgent, LLCriticalDamp::getInterpolant(), LLAgent::getPosAgentFromGlobal(), LLAgent::getPosGlobalFromAgent(), lerp(), LLVector3::magVec(), LLFollowCamParams::mFocus, LLFollowCamParams::mFocusLag, LLFollowCamParams::mFocusLocked, LLFollowCamParams::mFocusOffset, LLFollowCamParams::mFocusThreshold, LLFollowCamParams::mMaxCameraDistantFromSubject, mPitchCos, mPitchSin, mPitchSineAndCosineNeedToBeUpdated, LLFollowCamParams::mPositionLag, LLFollowCamParams::mPositionLocked, LLFollowCamParams::mPositionThreshold, mRelativeFocus, mRelativePos, mSimulatedDistance, mSimulatedFocusGlobal, mSimulatedPositionGlobal, mSubjectPosition, mSubjectRotation, mUpVector, LLVector3::mV, LLVector3::setVec(), updateBehindnessConstraint(), VX, VY, VZ, and LLVector3::z_axis.
Referenced by LLAgent::updateCamera().
BOOL LLFollowCam::updateBehindnessConstraint | ( | LLVector3 | focus, | |
LLVector3 & | cam_position | |||
) | [protected] |
Definition at line 457 of file llfollowcam.cpp.
References LLQuaternion::DEFAULT, f, FALSE, FOLLOW_CAM_BEHINDNESS_EPSILON, FOLLOW_CAM_MAX_BEHINDNESS_ANGLE, LLQuaternion::getAngleAxis(), LLCriticalDamp::getInterpolant(), LLVector3::magVec(), LLFollowCamParams::mBehindnessLag, LLFollowCamParams::mBehindnessMaxAngle, mSubjectRotation, LLVector3::mV, LLVector3::normVec(), RAD_TO_DEG, LLVector3::setVec(), LLQuaternion::shortestArc(), slerp(), TRUE, and VZ.
Referenced by update().
Definition at line 524 of file llfollowcam.cpp.
References f, FOLLOW_CAM_MIN_DISTANCE, FOLLOW_CAM_MIN_ZOOM_AMOUNT, FOLLOW_CAM_ZOOM_FACTOR, LLFollowCamParams::mMaxCameraDistantFromSubject, mSimulatedDistance, and mZoomedToMinimumDistance.
Referenced by LLAgent::handleScrollWheel().
F32 LLFollowCam::mFocusLagTimeScale [protected] |
Definition at line 173 of file llfollowcam.h.
F32 LLFollowCam::mPitchCos [protected] |
Definition at line 174 of file llfollowcam.h.
Referenced by calculatePitchSineAndCosine(), and update().
F32 LLFollowCam::mPitchSin [protected] |
Definition at line 175 of file llfollowcam.h.
Referenced by calculatePitchSineAndCosine(), and update().
bool LLFollowCam::mPitchSineAndCosineNeedToBeUpdated [protected] |
Definition at line 191 of file llfollowcam.h.
Referenced by LLFollowCam(), setPitch(), and update().
F32 LLFollowCam::mPositionLagTimeScale [protected] |
Definition at line 172 of file llfollowcam.h.
LLVector3 LLFollowCam::mRelativeFocus [protected] |
Definition at line 188 of file llfollowcam.h.
Referenced by getSimulatedFocus(), setFocus(), setFocusLocked(), and update().
LLVector3 LLFollowCam::mRelativePos [protected] |
Definition at line 189 of file llfollowcam.h.
Referenced by getSimulatedPosition(), setPosition(), setPositionLocked(), and update().
F32 LLFollowCam::mSimulatedDistance [protected] |
Definition at line 178 of file llfollowcam.h.
Referenced by LLFollowCam(), setDistance(), update(), and zoom().
LLGlobalVec LLFollowCam::mSimulatedFocusGlobal [protected] |
Definition at line 177 of file llfollowcam.h.
Referenced by setFocus(), setFocusLocked(), and update().
LLGlobalVec LLFollowCam::mSimulatedPositionGlobal [protected] |
Definition at line 176 of file llfollowcam.h.
Referenced by setPosition(), setPositionLocked(), and update().
LLVector3 LLFollowCam::mSubjectPosition [protected] |
Definition at line 185 of file llfollowcam.h.
Referenced by getSimulatedFocus(), getSimulatedPosition(), LLFollowCam(), setFocus(), setFocusLocked(), setPosition(), setPositionLocked(), setSubjectPositionAndRotation(), and update().
LLQuaternion LLFollowCam::mSubjectRotation [protected] |
Definition at line 186 of file llfollowcam.h.
Referenced by getSimulatedFocus(), getSimulatedPosition(), LLFollowCam(), setFocus(), setFocusLocked(), setPosition(), setPositionLocked(), setSubjectPositionAndRotation(), update(), and updateBehindnessConstraint().
LLFrameTimer LLFollowCam::mTimer [protected] |
Definition at line 184 of file llfollowcam.h.
LLVector3 LLFollowCam::mUpVector [protected] |
Definition at line 187 of file llfollowcam.h.
Referenced by getUpVector(), LLFollowCam(), reset(), and update().
bool LLFollowCam::mZoomedToMinimumDistance [protected] |
Definition at line 183 of file llfollowcam.h.
Referenced by isZoomedToMinimumDistance(), LLFollowCam(), setDistance(), and zoom().