FakeXrExtensions.FakeReformOptions


class FakeXrExtensions.FakeReformOptions


Fake ReformOptions.

Summary

Public functions

Vec3

Current size of the content, in meters.

Int

Which reform actions are enabled.

Consumer<ReformEvent!>

Returns the callback that will receive reform events.

Executor

Returns the executor that events will be handled on.

Float

The aspect ratio of the content on resizing.

Int

Behaviour flags.

Boolean

Returns the current value of forceShowResizeOverlay.

Vec3

Maximum size of the content, in meters.

Vec3

Minimum size of the content, in meters.

Int

Returns the current value of scaleWithDistanceMode.

ReformOptions

By default, the current size is set to (1, 1, 1).

ReformOptions

By default, only ALLOW_MOVE is enabled.

ReformOptions

Sets the callback that will receive reform events.

ReformOptions

Sets the executor that events will be handled on.

ReformOptions
setFixedAspectRatio(fixedAspectRatio: Float)

The aspect ratio determined by taking the panel's width over its height.

ReformOptions

By default, the flags are set to 0.

ReformOptions

If forceShowResizeOverlay is set to true, the resize overlay will always be show (until forceShowResizeOverlay is changed to false).

ReformOptions

By default, the maximum size is set to (1, 1, 1).

ReformOptions

By default, the minimum size is set to (1, 1, 1).

ReformOptions
setScaleWithDistanceMode(scaleWithDistanceMode: Int)

If scaleWithDistanceMode is set, and FLAG_SCALE_WITH_DISTANCE is also in use, the scale the system suggests (or automatically applies when FLAG_ALLOW_SYSTEM_MOVEMENT is also in use) follows scaleWithDistanceMode:

Public functions

getCurrentSize

Added in 1.0.0-alpha02
fun getCurrentSize(): Vec3

Current size of the content, in meters. This is the local size (does not include any scale factors)

getEnabledReform

Added in 1.0.0-alpha02
fun getEnabledReform(): Int

Which reform actions are enabled.

getEventCallback

Added in 1.0.0-alpha02
fun getEventCallback(): Consumer<ReformEvent!>

Returns the callback that will receive reform events.

getEventExecutor

Added in 1.0.0-alpha02
fun getEventExecutor(): Executor

Returns the executor that events will be handled on.

getFixedAspectRatio

Added in 1.0.0-alpha02
fun getFixedAspectRatio(): Float

The aspect ratio of the content on resizing. <= 0.0f when there are no preferences.

getFlags

Added in 1.0.0-alpha02
fun getFlags(): Int

Behaviour flags.

getForceShowResizeOverlay

Added in 1.0.0-alpha02
fun getForceShowResizeOverlay(): Boolean

Returns the current value of forceShowResizeOverlay.

getMaximumSize

Added in 1.0.0-alpha02
fun getMaximumSize(): Vec3

Maximum size of the content, in meters. This is a local size.

getMinimumSize

Added in 1.0.0-alpha02
fun getMinimumSize(): Vec3

Minimum size of the content, in meters. This is a local size.

getScaleWithDistanceMode

Added in 1.0.0-alpha02
fun getScaleWithDistanceMode(): Int

Returns the current value of scaleWithDistanceMode.

setCurrentSize

Added in 1.0.0-alpha02
fun setCurrentSize(vec3: Vec3): ReformOptions

By default, the current size is set to (1, 1, 1).

setEnabledReform

Added in 1.0.0-alpha02
fun setEnabledReform(i: Int): ReformOptions

By default, only ALLOW_MOVE is enabled.

setEventCallback

Added in 1.0.0-alpha02
fun setEventCallback(consumer: Consumer<ReformEvent!>): ReformOptions

Sets the callback that will receive reform events.

setEventExecutor

Added in 1.0.0-alpha02
fun setEventExecutor(executor: Executor): ReformOptions

Sets the executor that events will be handled on.

setFixedAspectRatio

Added in 1.0.0-alpha02
fun setFixedAspectRatio(fixedAspectRatio: Float): ReformOptions

The aspect ratio determined by taking the panel's width over its height. An aspect ratio value less than 0 will be ignored. A value <= 0.0f means there are no preferences.

This method does not immediately resize the entity. The new aspect ratio will be applied the next time the user resizes the entity through the reform UI. During this resize operation, the entity's current area will be preserved.

If a different resizing behavior is desired, such as fixing the width and adjusting the height, the client can manually resize the entity to the preferred dimensions before calling this method. No automatic resizing will occur when using the reform UI then.

setFlags

Added in 1.0.0-alpha02
fun setFlags(i: Int): ReformOptions

By default, the flags are set to 0.

setForceShowResizeOverlay

Added in 1.0.0-alpha02
fun setForceShowResizeOverlay(show: Boolean): ReformOptions

If forceShowResizeOverlay is set to true, the resize overlay will always be show (until forceShowResizeOverlay is changed to false). This can be used by apps to implement their own resize affordances.

setMaximumSize

Added in 1.0.0-alpha02
fun setMaximumSize(vec3: Vec3): ReformOptions

By default, the maximum size is set to (1, 1, 1).

setMinimumSize

Added in 1.0.0-alpha02
fun setMinimumSize(vec3: Vec3): ReformOptions

By default, the minimum size is set to (1, 1, 1).

setScaleWithDistanceMode

Added in 1.0.0-alpha02
fun setScaleWithDistanceMode(scaleWithDistanceMode: Int): ReformOptions

If scaleWithDistanceMode is set, and FLAG_SCALE_WITH_DISTANCE is also in use, the scale the system suggests (or automatically applies when FLAG_ALLOW_SYSTEM_MOVEMENT is also in use) follows scaleWithDistanceMode:

SCALE_WITH_DISTANCE_MODE_DEFAULT: The panel scales in the same way as home space mode. SCALE_WITH_DISTANCE_MODE_DMM: The panel scales in a way that the user-perceived panel size never changes.

When FLAG_SCALE_WITH_DISTANCE is not in use, scaleWithDistanceMode is ignored.