1500 characters remaining

# D3DXTRANSITION_TYPE enumeration

Defines the transition style between values of a mesh animation.

## Syntax

```
typedef enum D3DXTRANSITION_TYPE {
D3DXTRANSITION_LINEAR         = 0x000,
D3DXTRANSITION_EASEINEASEOUT  = 0x001,
D3DXTRANSITION_FORCE_DWORD    = 0x7fffffff
} D3DXTRANSITION_TYPE, *LPD3DXTRANSITION_TYPE;

```

## Constants

D3DXTRANSITION_LINEAR

Linear transition between values.

D3DXTRANSITION_EASEINEASEOUT

Ease-in, ease-out spline transition between values.

D3DXTRANSITION_FORCE_DWORD

Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. This value is not used.

## Remarks

The calculation for the ramp from ease in to ease out is calculated as follows:

Q(t) = 2(x - y)t³ + 3(y - x)t² + x

where the ramp is a function Q(t) with the following properties:

• Q(t) is a cubic spline.
• Q(t) interpolates between x and y as t ranges from 0 to 1.
• Q(t) is horizontal when t = 0 and t = 1.

Mathematically, this translates into:

Q(t) = At³ + Bt² + Ct + D (and therefore, Q'(t) = 3At² + 2Bt + C)
2a) Q(0) = x
2b) Q(1) = y
3a) Q'(0) = 0
3b) Q'(1) = 0

Solving for A, B, C, D:

D = x (from 2a)
C = 0 (from 3a)
3A + 2B = 0 (from 3b)
A + B = y - x (from 2b and D = x)

Therefore:

A = 2(x - y), B = 3(y - x), C = 0, D = x