FakeXrExtensions.FakeReformOptions


public class FakeXrExtensions.FakeReformOptions


Fake ReformOptions.

Summary

Public methods

@NonNull Vec3

Current size of the content, in meters.

int

Which reform actions are enabled.

@NonNull Consumer<ReformEvent>

Returns the callback that will receive reform events.

@NonNull Executor

Returns the executor that events will be handled on.

float

The aspect ratio of the content on resizing.

int

Behaviour flags.

@NonNull Vec3

Maximum size of the content, in meters.

@NonNull Vec3

Minimum size of the content, in meters.

int

Returns the current value of scaleWithDistanceMode.

@NonNull ReformOptions

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

@NonNull ReformOptions

By default, only ALLOW_MOVE is enabled.

@NonNull ReformOptions

Sets the callback that will receive reform events.

@NonNull ReformOptions

Sets the executor that events will be handled on.

@NonNull ReformOptions
setFixedAspectRatio(float fixedAspectRatio)

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

@NonNull ReformOptions
setFlags(int i)

By default, the flags are set to 0.

@NonNull ReformOptions

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

@NonNull ReformOptions

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

@NonNull ReformOptions
setScaleWithDistanceMode(int scaleWithDistanceMode)

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 fields

currentSize

Added in 1.0.0-alpha01
public Vec3 currentSize

fixedAspectRatio

Added in 1.0.0-alpha01
public float fixedAspectRatio

maximumSize

Added in 1.0.0-alpha01
public Vec3 maximumSize

minimumSize

Added in 1.0.0-alpha01
public Vec3 minimumSize

scaleWithDistanceMode

Added in 1.0.0-alpha01
public int scaleWithDistanceMode

Public methods

getCurrentSize

Added in 1.0.0-alpha01
public @NonNull Vec3 getCurrentSize()

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

getEnabledReform

Added in 1.0.0-alpha01
public int getEnabledReform()

Which reform actions are enabled.

getEventCallback

Added in 1.0.0-alpha01
public @NonNull Consumer<ReformEventgetEventCallback()

Returns the callback that will receive reform events.

getEventExecutor

Added in 1.0.0-alpha01
public @NonNull Executor getEventExecutor()

Returns the executor that events will be handled on.

getFixedAspectRatio

Added in 1.0.0-alpha01
public float getFixedAspectRatio()

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

getFlags

Added in 1.0.0-alpha01
public int getFlags()

Behaviour flags.

getMaximumSize

Added in 1.0.0-alpha01
public @NonNull Vec3 getMaximumSize()

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

getMinimumSize

Added in 1.0.0-alpha01
public @NonNull Vec3 getMinimumSize()

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

getScaleWithDistanceMode

Added in 1.0.0-alpha01
public int getScaleWithDistanceMode()

Returns the current value of scaleWithDistanceMode.

setCurrentSize

Added in 1.0.0-alpha01
public @NonNull ReformOptions setCurrentSize(@NonNull Vec3 vec3)

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

setEnabledReform

Added in 1.0.0-alpha01
public @NonNull ReformOptions setEnabledReform(int i)

By default, only ALLOW_MOVE is enabled.

setEventCallback

Added in 1.0.0-alpha01
public @NonNull ReformOptions setEventCallback(@NonNull Consumer<ReformEvent> consumer)

Sets the callback that will receive reform events.

setEventExecutor

Added in 1.0.0-alpha01
public @NonNull ReformOptions setEventExecutor(@NonNull Executor executor)

Sets the executor that events will be handled on.

setFixedAspectRatio

Added in 1.0.0-alpha01
public @NonNull ReformOptions setFixedAspectRatio(float fixedAspectRatio)

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-alpha01
public @NonNull ReformOptions setFlags(int i)

By default, the flags are set to 0.

setMaximumSize

Added in 1.0.0-alpha01
public @NonNull ReformOptions setMaximumSize(@NonNull Vec3 vec3)

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

setMinimumSize

Added in 1.0.0-alpha01
public @NonNull ReformOptions setMinimumSize(@NonNull Vec3 vec3)

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

setScaleWithDistanceMode

Added in 1.0.0-alpha01
public @NonNull ReformOptions setScaleWithDistanceMode(int scaleWithDistanceMode)

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.