void PointerController::setPosition(float x, float y) { #if DEBUG_POINTER_UPDATES ALOGD("Set pointer position to x=%0.3f, y=%0.3f", x, y); #endif AutoMutex _l(mLock); setPositionLocked(x, y); }
void PointerController::move(float deltaX, float deltaY) { #if DEBUG_POINTER_UPDATES ALOGD("Move pointer by deltaX=%0.3f, deltaY=%0.3f", deltaX, deltaY); #endif if (deltaX == 0.0f && deltaY == 0.0f) { return; } AutoMutex _l(mLock); setPositionLocked(mLocked.pointerX + deltaX, mLocked.pointerY + deltaY); }
void LLFollowCam::copyParams(LLFollowCamParams& params) { setPositionLag(params.getPositionLag()); setFocusLag(params.getFocusLag()); setFocusThreshold( params.getFocusThreshold()); setPositionThreshold(params.getPositionThreshold()); setPitch(params.getPitch()); setFocusOffset(params.getFocusOffset()); setBehindnessAngle(params.getBehindnessAngle()); setBehindnessLag(params.getBehindnessLag()); setPositionLocked(params.getPositionLocked()); setFocusLocked(params.getFocusLocked()); setDistance(params.getDistance()); if (params.getUsePosition()) { setPosition(params.getPosition()); } if (params.getUseFocus()) { setFocus(params.getFocus()); } }