void Deconstruct( System.Single& Length, Sandbox.Curve& FrequencyCurve, Sandbox.Curve& AmplitudeCurve )

book_4_sparkGenerated
code_blocksInput

Description

The Deconstruct method is a member of the HapticPattern class in the Sandbox namespace. This method is used to deconstruct a HapticPattern object into its constituent parts: the length of the pattern, the frequency curve, and the amplitude curve. This is useful for extracting these components for further manipulation or analysis.

Usage

To use the Deconstruct method, you need to have an instance of the HapticPattern class. You can then call this method to deconstruct the pattern into its length, frequency curve, and amplitude curve. The method takes three out parameters, which will be populated with the respective values from the HapticPattern instance.

Example usage:

HapticPattern pattern = new HapticPattern();
pattern.Length = 5.0f;
pattern.FrequencyCurve = new Curve();
pattern.AmplitudeCurve = new Curve();

pattern.Deconstruct(out float length, out Curve frequencyCurve, out Curve amplitudeCurve);

After calling Deconstruct, the variables length, frequencyCurve, and amplitudeCurve will contain the respective values from the HapticPattern instance.

Example

HapticPattern pattern = new HapticPattern();
pattern.Length = 5.0f;
pattern.FrequencyCurve = new Curve();
pattern.AmplitudeCurve = new Curve();

pattern.Deconstruct(out float length, out Curve frequencyCurve, out Curve amplitudeCurve);

// Now you can use length, frequencyCurve, and amplitudeCurve as needed.