float01descriptor - eisclimber/ExPresS-XR GitHub Wiki

Float01Descriptor

Class in ExPresSXR.Interaction.ValueRangeInteractable

Inherits from ValueDescriptor\<V\>

Summary

A range to interpolate a float between 0.0f and 1.0f (both inclusive), whilst supporting snapping.

public class Float01Descriptor : ValueDescriptor<float>

Methods

Name Description
IsMaxValue(float) Checks if the provided value is considered maximal.
IsMinValue(float) Checks if the provided value is considered minimal.
IsValueSnappingEnabled() Allows checking if snapping is enabled and is used internally to emit the correct events.
This function must be implemented as snapping must be implemented individually. If no snapping will be performed, simply return false.

Properties

Name Description
DefaultMaxValue Accessor defining the default max value.
There can be multiple max values, but this is the one used in the editor for setting the value.
Make sure it evaluates to a valid max value according to IsMaxValue(V) .
DefaultMinValue Accessor defining the default min value.
There can be multiple min values, but this is the one used in the editor for setting the value.
Make sure it evaluates to a valid min value according to IsMinValue(V) .
EnforceSnap If true, no snapping will be performed, even if snaps are configured. This can be used to have a smooth motion
and only snap in certain situations like after a grab has been released.
NumSteps Number of evenly spaced steps to snap the value to. Anything below 1 will deactivate snapping.
Pressed If the button is pressed or not.
Value Inheriting directly from ValueDescriptor and redefining value here to add the Range-attribute.
⚠️ **GitHub.com Fallback** ⚠️