public class VRGuiManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
wantsReposition |
Constructor and Description |
---|
VRGuiManager(VREnvironment environment)
Create a new GUI manager attached to the given app state.
|
Modifier and Type | Method and Description |
---|---|
void |
adjustGuiDistance(float adjustAmount)
Adjust the GUI distance from the observer.
|
Vector2f |
getCanvasSize()
Get the GUI canvas size.
|
Vector2f |
getCanvasToWindowRatio()
Get the ratio between the
GUI canvas size and the application main windows (if available) or the screen size. |
float |
getGuiDistance()
Get the GUI distance from the observer.
|
float |
getGUIScale()
Get the GUI scale.
|
float |
getPositioningElasticity() |
VRGUIPositioningMode |
getPositioningMode()
Get the GUI
positioning mode . |
boolean |
isCurverSurface()
Get if the GUI has to use curved surface.
|
boolean |
isGuiOverdraw()
Get if the GUI has to be displayed even if it is behind objects.
|
boolean |
isWantsReposition() |
void |
positionGui()
Inform this manager that it has to position the GUI.
|
void |
positionGuiNow(float tpf)
Position the GUI without delay.
|
void |
setCurvedSurface(boolean set)
Set if the GUI has to use curved surface.
|
void |
setGuiDistance(float newGuiDistance)
Set the GUI distance from the observer.
|
void |
setGuiOverdraw(boolean set)
Set if the GUI has to be displayed even if it is behind objects.
|
void |
setGuiScale(float scale)
Set the GUI scale.
|
void |
setPositioningElasticity(float elastic)
Makes auto GUI positioning happen not immediately, but like an
elastic connected to the headset.
|
void |
setPositioningMode(VRGUIPositioningMode mode)
Set the GUI
positioning mode . |
void |
setupGui(Camera leftCam,
Camera rightCam,
ViewPort left,
ViewPort right)
Set up the GUI.
|
void |
setWantsReposition(boolean wantsReposition) |
void |
updateGuiQuadGeometricState()
Update the GUI geometric state.
|
public VRGuiManager(VREnvironment environment)
environment
- the VR environment to which this manager is attached to.public boolean isWantsReposition()
public void setWantsReposition(boolean wantsReposition)
public void setPositioningElasticity(float elastic)
elastic
- amount of elasticitypublic float getPositioningElasticity()
public VRGUIPositioningMode getPositioningMode()
positioning mode
.positioning mode
.setPositioningMode(VRGUIPositioningMode)
public void setPositioningMode(VRGUIPositioningMode mode)
positioning mode
.mode
- the GUI positioning mode
.getPositioningMode()
public Vector2f getCanvasSize()
public Vector2f getCanvasToWindowRatio()
GUI canvas size
and the application main windows (if available) or the screen size.GUI canvas size
and the application main windows (if available).getCanvasSize()
public void positionGui()
public void updateGuiQuadGeometricState()
public void positionGuiNow(float tpf)
tpf
- the time per frame.public float getGuiDistance()
setGuiDistance(float)
public void setGuiDistance(float newGuiDistance)
newGuiDistance
- the GUI distance from the observer.getGuiDistance()
public float getGUIScale()
setGuiScale(float)
public void setGuiScale(float scale)
scale
- the GUI scale.getGUIScale()
public void adjustGuiDistance(float adjustAmount)
GUI distance
by the given value.adjustAmount
- the increment (if positive) / decrement (if negative) value of the GUI distance.public void setupGui(Camera leftCam, Camera rightCam, ViewPort left, ViewPort right)
leftCam
- the left-eye camera.rightCam
- the right-eye camera.left
- the left-eye viewport.right
- the right-eye viewport.public boolean isCurverSurface()
true
if the GUI has to use curved surface and false
otherwise.setCurvedSurface(boolean)
public void setCurvedSurface(boolean set)
set
- true
if the GUI has to use curved surface and false
otherwise.isCurverSurface()
public boolean isGuiOverdraw()
true
if the GUI has to use curved surface and false
otherwise.setGuiOverdraw(boolean)
public void setGuiOverdraw(boolean set)
set
- true
if the GUI has to use curved surface and false
otherwise.isGuiOverdraw()