# AnimationVector

# AnimationVector

Artifact:[androidx.compose.animation:animation-core](https://developer.android.com/jetpack/androidx/releases/compose-animation)  
[View Source](https://cs.android.com/search?q=file:androidx/compose/animation/core/AnimationVectors.kt+class:androidx.compose.animation.core.AnimationVector)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.0.0)
Common/All
  - Cmn  

  ```
  sealed class AnimationVector
```  
Known direct subclasses  
[AnimationVector1D](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector1D),[AnimationVector2D](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector2D),[AnimationVector3D](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector3D),[AnimationVector4D](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector4D)  

|-----------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------|
| [AnimationVector1D](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector1D) | This class defines a 1D vector.                                                                 |
| [AnimationVector2D](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector2D) | This class defines a 2D vector that contains two Float values for the two dimensions.           |
| [AnimationVector3D](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector3D) | This class defines a 3D vector that contains three Float value fields for the three dimensions. |
| [AnimationVector4D](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector4D) | This class defines a 4D vector that contains four Float fields for its four dimensions.         |

*** ** * ** ***

[AnimationVector](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector)class that is the base class of[AnimationVector1D](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector1D),[AnimationVector2D](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector2D),[AnimationVector3D](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector3D)and[AnimationVector4D](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector4D). In order to animate any arbitrary type, it is required to provide a[TwoWayConverter](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/TwoWayConverter)that defines how to convert that arbitrary type T to an[AnimationVector](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector), and vice versa. Depending on how many dimensions this type T has, it may need to be converted to any of the subclasses of[AnimationVector](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector). For example, a position based object should be converted to[AnimationVector2D](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector2D), whereas an object that describes rectangle bounds should convert to[AnimationVector4D](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector4D).

## Summary

|                                                       ### Protected constructors                                                        |
|-----------------------------------------------------------------------------------------------------------------------------------------|-----|
| [AnimationVector](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector#AnimationVector())`()` | Cmn |

## Protected constructors

### AnimationVector

Cmn  

```
protected AnimationVector()
```