Class Oscillator
- java.lang.Object
-
- androidx.constraintlayout.core.motion.utils.Oscillator
-
public class Oscillator extends java.lang.ObjectThis generates variable frequency oscillation curves
-
-
Field Summary
Fields Modifier and Type Field Description static intBOUNCEstatic intCOS_WAVEstatic intCUSTOMstatic intREVERSE_SAW_WAVEstatic intSAW_WAVEstatic intSIN_WAVEstatic intSQUARE_WAVEstatic java.lang.StringTAGstatic intTRIANGLE_WAVE
-
Constructor Summary
Constructors Constructor Description Oscillator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPoint(double position, float period)doublegetSlope(double time, double phase, double dphase)doublegetValue(double time, double phase)voidnormalize()After adding point every thing must be normalizedvoidsetType(int type, java.lang.String customType)java.lang.StringtoString()
-
-
-
Field Detail
-
TAG
public static java.lang.String TAG
-
SIN_WAVE
public static final int SIN_WAVE
- See Also:
- Constant Field Values
-
SQUARE_WAVE
public static final int SQUARE_WAVE
- See Also:
- Constant Field Values
-
TRIANGLE_WAVE
public static final int TRIANGLE_WAVE
- See Also:
- Constant Field Values
-
SAW_WAVE
public static final int SAW_WAVE
- See Also:
- Constant Field Values
-
REVERSE_SAW_WAVE
public static final int REVERSE_SAW_WAVE
- See Also:
- Constant Field Values
-
COS_WAVE
public static final int COS_WAVE
- See Also:
- Constant Field Values
-
BOUNCE
public static final int BOUNCE
- See Also:
- Constant Field Values
-
CUSTOM
public static final int CUSTOM
- See Also:
- Constant Field Values
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
setType
public void setType(int type, java.lang.String customType)
-
addPoint
public void addPoint(double position, float period)
-
normalize
public void normalize()
After adding point every thing must be normalized
-
getValue
public double getValue(double time, double phase)
-
getSlope
public double getSlope(double time, double phase, double dphase)
-
-