D3DXColorlerp function

xiaoxiao2021-03-06  62

D3DXColorlerp function

Linearize two color values ​​to create a new color value.

definition:

D3DXColor * D3DXColorlerp (

D3DXColor * Pout,

Const d3dxcolor * pc1,

Const d3dxcolor * pc2,

Float S

);

parameter:

pout

[IN, OUT] points to a result of returning a D3DxColor structure.

PC1

[in] points the source color value of the D3DxColor structure.

PC2

[in] points the source color value of the D3DxColor structure.

s

[in] This parameter is the coefficient when the PC1 and PC2 is interpolated. Its value is not limited.

return value:

The return value is the result of two color interpolation results to the D3DxColor structure.

Description:

The return value is the same as the value of the POUT parameter. This function can make this function into other parameters by return values. The two color values ​​are calculated by the following formula, as shown below:

Pout-> r = pc1-> r s * (pc2-> r - pc1-> r);

If there are two colors that are A and B, if s is 0, a color. If S is 1, return to the color.

Function information:

HEADER

D3DX9Math.h

Import Library

D3DX9.LIB

Minimum operation systems

WINDOWS 98

related functions:

D3DxColorModulate, D3DxColorNegative, D3DxColorscale

转载请注明原文地址:https://www.9cbs.com/read-111719.html

New Post(0)