ScreenParams

public class ScreenParams

Defines the physical parameters of a screen to be used with a GVR-compatible viewer.

Public Constructors

ScreenParams(Display display)
Initializes parameters to default values.
ScreenParams(ScreenParams params)
Creates a copy of an existing screen params object.

Public Methods

boolean
equals(Object other)
Compares this instance with the specified object and indicates if they are equal.
float
getBorderSizeMeters()
Returns the display border size.
int
getHeight()
Returns the screen height in pixels.
float
getHeightMeters()
Returns the screen height in meters.
int
getWidth()
Returns the screen width in pixels.
float
getWidthMeters()
Returns the screen width in meters.
void
setBorderSizeMeters(float displayBorderSize)
Size of the display's border around the screen.
void
setHeight(int height)
Sets the screen height in pixels.
void
setWidth(int width)
Sets the screen width in pixels.
String
toString()
Returns a string containing a concise, human-readable description of this object.

Inherited Methods

Public Constructors

public ScreenParams (Display display)

Initializes parameters to default values.

Parameters
display

public ScreenParams (ScreenParams params)

Creates a copy of an existing screen params object.

Parameters
params Screen parameters to copy.

Public Methods

public boolean equals (Object other)

Compares this instance with the specified object and indicates if they are equal.

Parameters
other The object to compare this instance with.
Returns
  • true if the objects are equal, false otherwise.

public float getBorderSizeMeters ()

Returns the display border size.

Returns
  • The display border size in meters.

public int getHeight ()

Returns the screen height in pixels.

Returns
  • The screen height in pixels.

public float getHeightMeters ()

Returns the screen height in meters.

Returns
  • The screen height in meters.

public int getWidth ()

Returns the screen width in pixels.

Returns
  • The screen width in pixels.

public float getWidthMeters ()

Returns the screen width in meters.

Returns
  • The screen width in meters.

public void setBorderSizeMeters (float displayBorderSize)

Size of the display's border around the screen.

Offset in meters from the bottom side of the inserted display to the bottom of the screen. Normally a small border of a few millimeters height when the display is in landscape position.

Parameters
displayBorderSize The display border size in meters.

public void setHeight (int height)

Sets the screen height in pixels.

Parameters
height The screen width in pixels.

public void setWidth (int width)

Sets the screen width in pixels.

Parameters
width The screen size in pixels.

public String toString ()

Returns a string containing a concise, human-readable description of this object.

Returns
  • A printable representation of this object.