summaryrefslogtreecommitdiff
path: root/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-01-23 13:16:01 -0800
committerJeff Brown <jeffbrown@google.com>2011-01-24 13:46:57 -0800
commit4519f07e9c6b993fbe7a3d3df24d71d9450a54f1 (patch)
tree3c642e9c740a54941ab46d80ebc5668ce9ab4cc3 /graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
parenta6ce081970a78233ba6b9792149ee5f1390cba7b (diff)
New orientation listener.
The objective in this listener is to be more careful about the signal processing to prevent spurious orientation changes and to make all of the tweakable factors physically meaningful. The calibration is defined in terms of time constants and does not assume a particular discrete sampling rate. This is useful because it allows us to change the accelerometer sampling interval if desired without having to change the calibration. Moreover, the accelerometer sampling interval can vary +/- 20ms from one sample to the next even in normal circumstances. Proposed orientation changes are weighted by confidence factors that vary exponentially in relation to how close the device is to the ideal orientation change posture (screen is vertical, angle is exactly at the midpoint of the orientation quadrant, and no external acceleration beside gravity). When not in an ideal posture, the device takes proportionally longer to settle into a new orientation state. Added a little tool to plot the log output of the WindowOrientationListener. Check the README for more information about how to use it. Change-Id: I787f02d03582ff26367df65eda8d9ce85c5cb343
Diffstat (limited to 'graphics/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions