Class GCDualSenseAdaptiveTrigger

  • All Implemented Interfaces:
    NSObject

    public class GCDualSenseAdaptiveTrigger
    extends GCControllerButtonInput
    DualSense triggers are required to be analog inputs. Common uses would be acceleration and decelleration in a driving game for example. GCDualSenseAdaptiveTrigger represents an adaptive trigger on the Sony DualSense controller, allowing you to specify a dynamic resistance force that is applied when pulling the trigger. This can, for example, be used to emulate the feeling of pulling back a bow string, firing a weapon, or pulling a lever.
    See Also:
    API-Since: 14.5
    • Constructor Detail

      • GCDualSenseAdaptiveTrigger

        protected GCDualSenseAdaptiveTrigger​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • armPosition

        public float armPosition()
        A normalized float from [0-1], with 0 representing the lowest possible trigger arm position and 1 representing the maximum trigger arm position.
        See Also:
        GCDualSenseAdaptiveTriggerStatus
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • mode

        public long mode()
        The mode that the adaptive trigger is currently in. This property reflects the physical state of the triggers - and requires a response from the controller. It does not update immediately after calling -[GCDualSenseAdaptiveTrigger setMode...].
        See Also:
        GCDualSenseAdaptiveTriggerMode
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setModeFeedbackWithStartPositionResistiveStrength

        public void setModeFeedbackWithStartPositionResistiveStrength​(float startPosition,
                                                                      float resistiveStrength)
        Sets the adaptive trigger to feedback mode. The start position and strength of the effect can be set arbitrarily. The trigger arm will continue to provide a constant degree of feedback whenever it is depressed further than the start position.
        Parameters:
        startPosition - - A normalized float from [0-1], with 0 representing the smallest possible trigger depression and 1 representing the maximum trigger depression.
        resistiveStrength - - A normalized float from [0-1], with 0 representing the minimum effect strength (off entirely) and 1 representing the maximum effect strength.
      • setModeOff

        public void setModeOff()
        Sets the adaptive trigger to off mode. This turns off the adaptive trigger effect.
      • setModeVibrationWithStartPositionAmplitudeFrequency

        public void setModeVibrationWithStartPositionAmplitudeFrequency​(float startPosition,
                                                                        float amplitude,
                                                                        float frequency)
        Sets the adaptive trigger to vibration mode. The start position, amplitude, and frequency of the effect can be set arbitrarily. The trigger arm will continue to strike against the trigger whenever it is depressed further than the start position, providing a "sense of vibration".
        Parameters:
        startPosition - - A normalized float from [0-1], with 0 representing the smallest possible depression and 1 representing the maximum trigger depression. The effect will begin once the trigger is depressed beyond this point.
        amplitude - - A normalized float from [0-1], with 0 representing the minimum effect strength (off entirely) and 1 representing the maximum effect strength.
        frequency - - A normalized float from [0-1], with 0 representing the minimum frequency and 1 representing the maximum frequency of the vibration effect.
      • setModeWeaponWithStartPositionEndPositionResistiveStrength

        public void setModeWeaponWithStartPositionEndPositionResistiveStrength​(float startPosition,
                                                                               float endPosition,
                                                                               float resistiveStrength)
        Sets the adaptive trigger to weapon mode. The start position, end position, and strength of the effect can be set arbitrarily; however the end position must be larger than the start position. The trigger arm will continue to provide a constant degree of feedback whenever it is depressed further than the start position. Once the trigger arm has been depressed past the end position, the strength of the effect will immediately fall to zero, providing a "sense of release" similar to that provided by pulling the trigger of a weapon.
        Parameters:
        startPosition - - A normalized float from [0-1], with 0 representing the smallest possible depression and 1 representing the maximum trigger depression. The effect will begin once the trigger is depressed beyond this point.
        endPosition - - A normalized float from [0-1], with 0 representing the smallest possible depression and 1 representing the maximum trigger depression. Must be greater than startPosition. The effect will end once the trigger is depressed beyond this point.
        resistiveStrength - - A normalized float from [0-1], with 0 representing the minimum effect strength (off entirely) and 1 representing the maximum effect strength.
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • status

        public long status()
        The current status of the adaptive trigger - whether it is ready to apply a load, is currently applying a load, or has finished applying a load.
        See Also:
        GCDualSenseAdaptiveTriggerStatus
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • setModeFeedbackWithResistiveStrengths

        public void setModeFeedbackWithResistiveStrengths​(GCDualSenseAdaptiveTriggerPositionalResistiveStrengths positionalResistiveStrengths)
        Sets the adaptive trigger to feedback mode. The strength of the effect can be set for each possible trigger position. The trigger arm will provide a degree of feedback based on the resistive strength for a given position.
        Parameters:
        positionalResistiveStrengths - - Positional normalized floats from [0-1], with 0 representing the minimum effect strength (off entirely) and 1 representing the maximum effect strength. API-Since: 15.4
      • setModeSlopeFeedbackWithStartPositionEndPositionStartStrengthEndStrength

        public void setModeSlopeFeedbackWithStartPositionEndPositionStartStrengthEndStrength​(float startPosition,
                                                                                             float endPosition,
                                                                                             float startStrength,
                                                                                             float endStrength)
        Sets the adaptive trigger to slope feedback mode. The start position, end position, start strength, and end strength of the effect can be set arbitrarily; however the end position must be larger than the start position. The trigger arm will provide a linearly interpolated degree of feedback whenever it is depressed between the start and end positions based on the starting and ending strengths.
        Parameters:
        startPosition - - A normalized float from [0-1], with 0 representing the smallest possible trigger depression and 1 representing the maximum trigger depression. The effect will begin once the trigger is depressed beyond this point.
        endPosition - - A normalized float from [0-1], with 0 representing the smallest possible depression and 1 representing the maximum trigger depression. Must be greater than startPosition. The effect will end once the trigger is depressed beyond this point.
        startStrength - - A normalized float from [0-1], with 0 representing the minimum effect strength (off entirely) and 1 representing the maximum effect strength. The effect will begin at startStrength once the trigger is depressed beyond startPosition.
        endStrength - - A normalized float from [0-1], with 0 representing the minimum effect strength (off entirely) and 1 representing the maximum effect strength. The effect will end at endStrength once the trigger is depressed to endPosition. API-Since: 15.4
      • setModeVibrationWithAmplitudesFrequency

        public void setModeVibrationWithAmplitudesFrequency​(GCDualSenseAdaptiveTriggerPositionalAmplitudes positionalAmplitudes,
                                                            float frequency)
        Sets the adaptive trigger to vibration mode. The amplitude of the effect can be set for each possible trigger position. The trigger arm will provide a degree of feedback based on the amplitude for a given position. The trigger arm will continue to strike against the trigger, providing a "sense of vibration".
        Parameters:
        positionalAmplitudes - - Positional normalized floats from [0-1], with 0 representing the minimum effect strength (off entirely) and 1 representing the maximum effect strength.
        frequency - - A normalized float from [0-1], with 0 representing the minimum frequency and 1 representing the maximum frequency of the vibration effect. API-Since: 15.4
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.