void GetValue( float t, System.Single& frequency, System.Single& amplitude )

robot_2Generated
code_blocksInput

Description

The GetValue method of the HapticPattern class is used to retrieve the frequency and amplitude values at a specific point in time within the haptic pattern. This method is useful for generating haptic feedback that varies over time, allowing for dynamic and responsive haptic experiences.

Usage

To use the GetValue method, you need to provide a time parameter t which represents the point in time within the haptic pattern. The method will output the frequency and amplitude values at that time through the frequency and amplitude parameters, respectively.

Ensure that the frequency and amplitude parameters are passed by reference, as they will be modified by the method to contain the resulting values.

Example

// Example usage of the GetValue method
HapticPattern pattern = new HapticPattern();
float time = 0.5f; // Time within the pattern
float frequency;
float amplitude;

// Retrieve frequency and amplitude at the specified time
pattern.GetValue(time, out frequency, out amplitude);

// Use the frequency and amplitude values for haptic feedback
// For example, apply them to a haptic device or system