# BrushFamily.InputModel

Artifact: [androidx.ink:ink-brush](https://developer.android.com/jetpack/androidx/releases/ink) [View Source](https://cs.android.com/search?q=file:androidx/ink/brush/BrushFamily.kt+class:androidx.ink.brush.BrushFamily.InputModel) Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

*** ** * ** ***

Common/AllAndroid/JVMNative/C/iOS
- Cmn

  ```
  abstract class BrushFamily.InputModel
  ```
Known direct subclasses [BrushFamily.InputModel.SlidingWindowModel](https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily.InputModel.SlidingWindowModel)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily.InputModel.SlidingWindowModel` | An `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily.InputModel` that averages nearby inputs together within a sliding time window. |

*** ** * ** ***

Specifies a model for turning a sequence of raw hardware inputs (e.g. from a stylus, touchscreen, or mouse) into a sequence of smoothed, modeled inputs. Raw hardware inputs tend to be noisy, and must be smoothed before being passed into a brush's behaviors and extruded into a mesh in order to get a good-looking stroke.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily.InputModel.SlidingWindowModel : https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily.InputModel` An `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily.InputModel` that averages nearby inputs together within a sliding time window. |

| ### Public companion properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily.InputModel` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily.InputModel#DEFAULT_INPUT_MODEL()` The default `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily.InputModel` that will be used by a `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily` when none is specified. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily.InputModel` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily.InputModel#PASSTHROUGH_MODEL()` A naive input model that passes raw inputs through unchanged, performing only base-minimal modeling to derive velocity and acceleration values for the modeled inputs. | Cmn |

| ### Public functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/Version` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily.InputModel#calculateMinimumRequiredVersion()()` Returns the minimum required `https://developer.android.com/reference/kotlin/androidx/ink/brush/Version` for this `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily.InputModel`. | Cmn |

## Public companion properties

### DEFAULT_INPUT_MODEL

Cmn

```
val DEFAULT_INPUT_MODEL: BrushFamily.InputModel
```

The default `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily.InputModel` that will be used by a `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily` when none is specified. Currently, this is the `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily.InputModel.SlidingWindowModel`, with default parameters.

### PASSTHROUGH_MODEL

Cmn

```
val PASSTHROUGH_MODEL: BrushFamily.InputModel
```

A naive input model that passes raw inputs through unchanged, performing only base-minimal modeling to derive velocity and acceleration values for the modeled inputs. This can be useful as a point of comparison for other input models, or for callers who wish to do their own input modeling prior to passing inputs into Ink.

## Public functions

### calculateMinimumRequiredVersion

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
fun calculateMinimumRequiredVersion(): Version
```

Returns the minimum required `https://developer.android.com/reference/kotlin/androidx/ink/brush/Version` for this `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily.InputModel`.

By default, decoding a `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily` containing an `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily.InputModel` with a minimum required version higher than `https://developer.android.com/reference/kotlin/androidx/ink/brush/Version#MAX_SUPPORTED()` will fail.