Home | History | Annotate | Download | only in include

Lines Matching full:effect

33  *   - Create an effect (::SDL_HapticEffect).
34 * - Upload the effect with SDL_HapticNewEffect().
35 * - Run the effect with SDL_HapticRunEffect().
36 * - (optional) Free the effect with SDL_HapticDestroyEffect().
52 * // Play effect at 50% strength for 2 seconds
65 * SDL_HapticEffect effect;
74 * SDL_HapticClose(haptic); // No sine effect
78 * // Create the effect
79 * memset( &effect, 0, sizeof(SDL_HapticEffect) ); // 0 is safe default
80 * effect.type = SDL_HAPTIC_SINE;
81 * effect.periodic.direction.type = SDL_HAPTIC_POLAR; // Polar coordinates
82 * effect.periodic.direction.dir[0] = 18000; // Force comes from south
83 * effect.periodic.period = 1000; // 1000 ms
84 * effect.periodic.magnitude = 20000; // 20000/32767 strength
85 * effect.periodic.length = 5000; // 5 seconds long
86 * effect.periodic.attack_length = 1000; // Takes 1 second to get max strength
87 * effect.periodic.fade_length = 1000; // Takes 1 second to fade away
89 * // Upload the effect
90 * effect_id = SDL_HapticNewEffect( haptic, &effect );
92 * // Test the effect
94 * SDL_Delay( 5000); // Wait for the effect to finish
96 * // We destroy the effect, although closing the device also does this
151 * \brief Constant effect supported.
153 * Constant haptic effect.
160 * \brief Sine wave effect supported.
162 * Periodic haptic effect that simulates sine waves.
169 * \brief Left/Right effect supported.
171 * Haptic effect for direct control over high/low frequency motors.
183 * \brief Triangle wave effect supported.
185 * Periodic haptic effect that simulates triangular waves.
192 * \brief Sawtoothup wave effect supported.
194 * Periodic haptic effect that simulates saw tooth up waves.
201 * \brief Sawtoothdown wave effect supported.
203 * Periodic haptic effect that simulates saw tooth down waves.
210 * \brief Ramp effect supported.
212 * Ramp haptic effect.
219 * \brief Spring effect supported - uses axes position.
221 * Condition haptic effect that simulates a spring. Effect is based on the
229 * \brief Damper effect supported - uses axes velocity.
231 * Condition haptic effect that simulates dampening. Effect is based on the
239 * \brief Inertia effect supported - uses axes acceleration.
241 * Condition haptic effect that simulates inertia. Effect is based on the axes
249 * \brief Friction effect supported - uses axes movement.
251 * Condition haptic effect that simulates friction. Effect is based on the
259 * \brief Custom effect is supported.
261 * User defined custom haptic effect.
288 * \brief Device can be queried for effect status.
290 * Device can be queried for effect status.
402 * The Z axis represents the height of the effect if supported, otherwise
447 * \brief A structure containing a template for a Constant effect.
449 * The struct is exclusive to the ::SDL_HAPTIC_CONSTANT effect.
451 * A constant effect applies a constant force in the specified direction
461 SDL_HapticDirection direction; /**< Direction of the effect. */
464 Uint32 length; /**< Duration of the effect. */
465 Uint16 delay; /**< Delay before starting the effect. */
468 Uint16 button; /**< Button that triggers the effect. */
472 Sint16 level; /**< Strength of the constant effect. */
482 * \brief A structure containing a template for a Periodic effect.
491 * A periodic effect consists in a wave-shaped effect that repeats itself
544 SDL_HapticDirection direction; /**< Direction of the effect. */
547 Uint32 length; /**< Duration of the effect. */
548 Uint16 delay; /**< Delay before starting the effect. */
551 Uint16 button; /**< Button that triggers the effect. */
568 * \brief A structure containing a template for a Condition effect.
571 * - ::SDL_HAPTIC_SPRING: Effect based on axes position.
572 * - ::SDL_HAPTIC_DAMPER: Effect based on axes velocity.
573 * - ::SDL_HAPTIC_INERTIA: Effect based on axes acceleration.
574 * - ::SDL_HAPTIC_FRICTION: Effect based on axes movement.
577 * The condition effect specific members have three parameters. The first
596 SDL_HapticDirection direction; /**< Direction of the effect - Not used ATM. */
599 Uint32 length; /**< Duration of the effect. */
600 Uint16 delay; /**< Delay before starting the effect. */
603 Uint16 button; /**< Button that triggers the effect. */
616 * \brief A structure containing a template for a Ramp effect.
618 * This struct is exclusively for the ::SDL_HAPTIC_RAMP effect.
620 * The ramp effect starts at start strength and ends at end strength.
622 * the effects get added to the ramp effect making the effect become
632 SDL_HapticDirection direction; /**< Direction of the effect. */
635 Uint32 length; /**< Duration of the effect. */
636 Uint16 delay; /**< Delay before starting the effect. */
639 Uint16 button; /**< Button that triggers the effect. */
654 * \brief A structure containing a template for a Left/Right effect.
656 * This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect.
658 * The Left/Right effect is used to explicitly control the large and small
671 Uint32 length; /**< Duration of the effect. */
679 * \brief A structure containing a template for the ::SDL_HAPTIC_CUSTOM effect.
681 * A custom force feedback effect is much like a periodic effect, where the
685 * If channels is one, the effect is rotated using the defined direction.
695 SDL_HapticDirection direction; /**< Direction of the effect. */
698 Uint32 length; /**< Duration of the effect. */
699 Uint16 delay; /**< Delay before starting the effect. */
702 Uint16 button; /**< Button that triggers the effect. */
719 * \brief The generic template for any haptic effect.
726 * ::SDL_HAPTIC_INFINITY. Fade will also not be used since effect never ends.
728 * Additionally, the ::SDL_HAPTIC_RAMP effect does not support a duration of
741 * Uint32 length; // Duration of effect (ms).
742 * Uint16 delay; // Delay before starting effect.
745 * Uint16 button; // Button that triggers effect.
746 * Uint16 interval; // How soon before effect can be triggered again.
756 * Here we have an example of a constant effect evolution in time:
761 | effect level --> _________________
778 * effect level.
790 Uint16 type; /**< Effect type. */
791 SDL_HapticConstant constant; /**< Constant effect. */
792 SDL_HapticPeriodic periodic; /**< Periodic effect. */
793 SDL_HapticCondition condition; /**< Condition effect. */
794 SDL_HapticRamp ramp; /**< Ramp effect. */
795 SDL_HapticLeftRight leftright; /**< Left/Right effect. */
796 SDL_HapticCustom custom; /**< Custom effect. */
928 * approximation. Always check to see if your created effect was actually
931 * \param haptic The haptic device to query effect max.
962 * printf("We have constant haptic effect!");
983 * \brief Checks to see if effect is supported by haptic.
986 * \param effect Effect to check to see if it is supported.
987 * \return SDL_TRUE if effect is supported, SDL_FALSE if it isn't or -1 on error.
994 effect);
997 * \brief Creates a new haptic effect on the device.
999 * \param haptic Haptic device to create the effect on.
1000 * \param effect Properties of the effect to create.
1001 * \return The id of the effect on success or -1 on error.
1008 SDL_HapticEffect * effect);
1011 * \brief Updates the properties of an effect.
1014 * direction may be strange. Specifically the effect may reupload itself
1018 * \param haptic Haptic device that has the effect.
1019 * \param effect Effect to update.
1020 * \param data New effect properties to use.
1028 int effect,
1032 * \brief Runs the haptic effect on its associated haptic device.
1034 * If iterations are ::SDL_HAPTIC_INFINITY, it'll run the effect over and over
1036 * effect to last forever, set ::SDL_HAPTIC_INFINITY in the effect's length
1039 * \param haptic Haptic device to run the effect on.
1040 * \param effect Identifier of the haptic effect to run.
1041 * \param iterations Number of iterations to run the effect. Use
1050 int effect,
1054 * \brief Stops the haptic effect on its associated haptic device.
1056 * \param haptic Haptic device to stop the effect on.
1057 * \param effect Identifier of the effect to stop.
1064 int effect);
1067 * \brief Destroys a haptic effect on the device.
1069 * This will stop the effect if it's running. Effects are automatically
1072 * \param haptic Device to destroy the effect on.
1073 * \param effect Identifier of the effect to destroy.
1078 int effect);
1081 * \brief Gets the status of the current effect on the haptic device.
1085 * \param haptic Haptic device to query the effect status on.
1086 * \param effect Identifier of the effect to query its status.
1093 int effect);
1170 * \return SDL_TRUE if effect is supported, SDL_FALSE if it isn't or -1 on error.
1194 * \param haptic Haptic device to play rumble effect on.