ViewController API enhancements
This commit is contained in:
parent
bbd27f1332
commit
d58d79facf
@ -29,7 +29,7 @@ import static org.oscim.utils.FastMath.clamp;
|
|||||||
|
|
||||||
public class ViewController extends Viewport {
|
public class ViewController extends Viewport {
|
||||||
|
|
||||||
protected float mPivotY = 0.0f;
|
private float mPivotY = 0.0f;
|
||||||
|
|
||||||
private final float[] mat = new float[16];
|
private final float[] mat = new float[16];
|
||||||
|
|
||||||
@ -71,6 +71,15 @@ public class ViewController extends Viewport {
|
|||||||
updateMatrices();
|
updateMatrices();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get pivot height relative to view center. E.g. 0.5 is usually preferred
|
||||||
|
* for navigation, moving the center to 25% of the view height.
|
||||||
|
* Range is [-1, 1].
|
||||||
|
*/
|
||||||
|
public float getMapViewCenter() {
|
||||||
|
return mPivotY;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set pivot height relative to view center. E.g. 0.5 is usually preferred
|
* Set pivot height relative to view center. E.g. 0.5 is usually preferred
|
||||||
* for navigation, moving the center to 25% of the view height.
|
* for navigation, moving the center to 25% of the view height.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user