mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-28 13:47:58 +00:00
Cleanups
This commit is contained in:
parent
9ca27adb59
commit
d5d04babdd
@ -16,9 +16,6 @@
|
||||
#if _MSC_VER >= 1200
|
||||
#pragma warning(push)
|
||||
#endif
|
||||
#pragma warning(disable:4201) // anonymous unions warning
|
||||
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
@ -1272,9 +1269,6 @@ D3DXCOLOR* WINAPI D3DXColorAdjustContrast
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
//--------------------------
|
||||
// Misc
|
||||
//--------------------------
|
||||
@ -1292,8 +1286,6 @@ FLOAT WINAPI D3DXFresnelTerm
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// Matrix Stack
|
||||
@ -1436,159 +1428,24 @@ extern "C" {
|
||||
#define D3DXSH_MINORDER 2
|
||||
#define D3DXSH_MAXORDER 6
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// D3DXSHEvalDirection:
|
||||
// --------------------
|
||||
// Evaluates the Spherical Harmonic basis functions
|
||||
//
|
||||
// Parameters:
|
||||
// pOut
|
||||
// Output SH coefficients - basis function Ylm is stored at l*l + m+l
|
||||
// This is the pointer that is returned.
|
||||
// Order
|
||||
// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1
|
||||
// pDir
|
||||
// Direction to evaluate in - assumed to be normalized
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
FLOAT* WINAPI D3DXSHEvalDirection
|
||||
( FLOAT *pOut, UINT Order, CONST D3DXVECTOR3 *pDir );
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// D3DXSHRotate:
|
||||
// --------------------
|
||||
// Rotates SH vector by a rotation matrix
|
||||
//
|
||||
// Parameters:
|
||||
// pOut
|
||||
// Output SH coefficients - basis function Ylm is stored at l*l + m+l
|
||||
// This is the pointer that is returned (should not alias with pIn.)
|
||||
// Order
|
||||
// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1
|
||||
// pMatrix
|
||||
// Matrix used for rotation - rotation sub matrix should be orthogonal
|
||||
// and have a unit determinant.
|
||||
// pIn
|
||||
// Input SH coeffs (rotated), incorect results if this is also output.
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
FLOAT* WINAPI D3DXSHRotate
|
||||
( FLOAT *pOut, UINT Order, CONST D3DXMATRIX *pMatrix, CONST FLOAT *pIn );
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// D3DXSHRotateZ:
|
||||
// --------------------
|
||||
// Rotates the SH vector in the Z axis by an angle
|
||||
//
|
||||
// Parameters:
|
||||
// pOut
|
||||
// Output SH coefficients - basis function Ylm is stored at l*l + m+l
|
||||
// This is the pointer that is returned (should not alias with pIn.)
|
||||
// Order
|
||||
// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1
|
||||
// Angle
|
||||
// Angle in radians to rotate around the Z axis.
|
||||
// pIn
|
||||
// Input SH coeffs (rotated), incorect results if this is also output.
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
|
||||
FLOAT* WINAPI D3DXSHRotateZ
|
||||
( FLOAT *pOut, UINT Order, FLOAT Angle, CONST FLOAT *pIn );
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// D3DXSHAdd:
|
||||
// --------------------
|
||||
// Adds two SH vectors, pOut[i] = pA[i] + pB[i];
|
||||
//
|
||||
// Parameters:
|
||||
// pOut
|
||||
// Output SH coefficients - basis function Ylm is stored at l*l + m+l
|
||||
// This is the pointer that is returned.
|
||||
// Order
|
||||
// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1
|
||||
// pA
|
||||
// Input SH coeffs.
|
||||
// pB
|
||||
// Input SH coeffs (second vector.)
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
FLOAT* WINAPI D3DXSHAdd
|
||||
( FLOAT *pOut, UINT Order, CONST FLOAT *pA, CONST FLOAT *pB );
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// D3DXSHScale:
|
||||
// --------------------
|
||||
// Adds two SH vectors, pOut[i] = pA[i]*Scale;
|
||||
//
|
||||
// Parameters:
|
||||
// pOut
|
||||
// Output SH coefficients - basis function Ylm is stored at l*l + m+l
|
||||
// This is the pointer that is returned.
|
||||
// Order
|
||||
// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1
|
||||
// pIn
|
||||
// Input SH coeffs.
|
||||
// Scale
|
||||
// Scale factor.
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
FLOAT* WINAPI D3DXSHScale
|
||||
( FLOAT *pOut, UINT Order, CONST FLOAT *pIn, CONST FLOAT Scale );
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// D3DXSHDot:
|
||||
// --------------------
|
||||
// Computes the dot product of two SH vectors
|
||||
//
|
||||
// Parameters:
|
||||
// Order
|
||||
// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1
|
||||
// pA
|
||||
// Input SH coeffs.
|
||||
// pB
|
||||
// Second set of input SH coeffs.
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
FLOAT WINAPI D3DXSHDot
|
||||
( UINT Order, CONST FLOAT *pA, CONST FLOAT *pB );
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// D3DXSHMultiply[O]:
|
||||
// --------------------
|
||||
// Computes the product of two functions represented using SH (f and g), where:
|
||||
// pOut[i] = int(y_i(s) * f(s) * g(s)), where y_i(s) is the ith SH basis
|
||||
// function, f(s) and g(s) are SH functions (sum_i(y_i(s)*c_i)). The order O
|
||||
// determines the lengths of the arrays, where there should always be O^2
|
||||
// coefficients. In general the product of two SH functions of order O generates
|
||||
// and SH function of order 2*O - 1, but we truncate the result. This means
|
||||
// that the product commutes (f*g == g*f) but doesn't associate
|
||||
// (f*(g*h) != (f*g)*h.
|
||||
//
|
||||
// Parameters:
|
||||
// pOut
|
||||
// Output SH coefficients - basis function Ylm is stored at l*l + m+l
|
||||
// This is the pointer that is returned.
|
||||
// pF
|
||||
// Input SH coeffs for first function.
|
||||
// pG
|
||||
// Second set of input SH coeffs.
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
FLOAT* WINAPI D3DXSHMultiply2( FLOAT *pOut, CONST FLOAT *pF, CONST FLOAT *pG);
|
||||
FLOAT* WINAPI D3DXSHMultiply3( FLOAT *pOut, CONST FLOAT *pF, CONST FLOAT *pG);
|
||||
FLOAT* WINAPI D3DXSHMultiply4( FLOAT *pOut, CONST FLOAT *pF, CONST FLOAT *pG);
|
||||
@ -1602,148 +1459,21 @@ FLOAT* WINAPI D3DXSHMultiply6( FLOAT *pOut, CONST FLOAT *pF, CONST FLOAT *pG);
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// D3DXSHEvalDirectionalLight:
|
||||
// --------------------
|
||||
// Evaluates a directional light and returns spectral SH data. The output
|
||||
// vector is computed so that if the intensity of R/G/B is unit the resulting
|
||||
// exit radiance of a point directly under the light on a diffuse object with
|
||||
// an albedo of 1 would be 1.0. This will compute 3 spectral samples, pROut
|
||||
// has to be specified, while pGout and pBout are optional.
|
||||
//
|
||||
// Parameters:
|
||||
// Order
|
||||
// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1
|
||||
// pDir
|
||||
// Direction light is coming from (assumed to be normalized.)
|
||||
// RIntensity
|
||||
// Red intensity of light.
|
||||
// GIntensity
|
||||
// Green intensity of light.
|
||||
// BIntensity
|
||||
// Blue intensity of light.
|
||||
// pROut
|
||||
// Output SH vector for Red.
|
||||
// pGOut
|
||||
// Output SH vector for Green (optional.)
|
||||
// pBOut
|
||||
// Output SH vector for Blue (optional.)
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
HRESULT WINAPI D3DXSHEvalDirectionalLight
|
||||
( UINT Order, CONST D3DXVECTOR3 *pDir,
|
||||
FLOAT RIntensity, FLOAT GIntensity, FLOAT BIntensity,
|
||||
FLOAT *pROut, FLOAT *pGOut, FLOAT *pBOut );
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// D3DXSHEvalSphericalLight:
|
||||
// --------------------
|
||||
// Evaluates a spherical light and returns spectral SH data. There is no
|
||||
// normalization of the intensity of the light like there is for directional
|
||||
// lights, care has to be taken when specifiying the intensities. This will
|
||||
// compute 3 spectral samples, pROut has to be specified, while pGout and
|
||||
// pBout are optional.
|
||||
//
|
||||
// Parameters:
|
||||
// Order
|
||||
// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1
|
||||
// pPos
|
||||
// Position of light - reciever is assumed to be at the origin.
|
||||
// Radius
|
||||
// Radius of the spherical light source.
|
||||
// RIntensity
|
||||
// Red intensity of light.
|
||||
// GIntensity
|
||||
// Green intensity of light.
|
||||
// BIntensity
|
||||
// Blue intensity of light.
|
||||
// pROut
|
||||
// Output SH vector for Red.
|
||||
// pGOut
|
||||
// Output SH vector for Green (optional.)
|
||||
// pBOut
|
||||
// Output SH vector for Blue (optional.)
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
HRESULT WINAPI D3DXSHEvalSphericalLight
|
||||
( UINT Order, CONST D3DXVECTOR3 *pPos, FLOAT Radius,
|
||||
FLOAT RIntensity, FLOAT GIntensity, FLOAT BIntensity,
|
||||
FLOAT *pROut, FLOAT *pGOut, FLOAT *pBOut );
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// D3DXSHEvalConeLight:
|
||||
// --------------------
|
||||
// Evaluates a light that is a cone of constant intensity and returns spectral
|
||||
// SH data. The output vector is computed so that if the intensity of R/G/B is
|
||||
// unit the resulting exit radiance of a point directly under the light oriented
|
||||
// in the cone direction on a diffuse object with an albedo of 1 would be 1.0.
|
||||
// This will compute 3 spectral samples, pROut has to be specified, while pGout
|
||||
// and pBout are optional.
|
||||
//
|
||||
// Parameters:
|
||||
// Order
|
||||
// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1
|
||||
// pDir
|
||||
// Direction light is coming from (assumed to be normalized.)
|
||||
// Radius
|
||||
// Radius of cone in radians.
|
||||
// RIntensity
|
||||
// Red intensity of light.
|
||||
// GIntensity
|
||||
// Green intensity of light.
|
||||
// BIntensity
|
||||
// Blue intensity of light.
|
||||
// pROut
|
||||
// Output SH vector for Red.
|
||||
// pGOut
|
||||
// Output SH vector for Green (optional.)
|
||||
// pBOut
|
||||
// Output SH vector for Blue (optional.)
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
HRESULT WINAPI D3DXSHEvalConeLight
|
||||
( UINT Order, CONST D3DXVECTOR3 *pDir, FLOAT Radius,
|
||||
FLOAT RIntensity, FLOAT GIntensity, FLOAT BIntensity,
|
||||
FLOAT *pROut, FLOAT *pGOut, FLOAT *pBOut );
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// D3DXSHEvalHemisphereLight:
|
||||
// --------------------
|
||||
// Evaluates a light that is a linear interpolant between two colors over the
|
||||
// sphere. The interpolant is linear along the axis of the two points, not
|
||||
// over the surface of the sphere (ie: if the axis was (0,0,1) it is linear in
|
||||
// Z, not in the azimuthal angle.) The resulting spherical lighting function
|
||||
// is normalized so that a point on a perfectly diffuse surface with no
|
||||
// shadowing and a normal pointed in the direction pDir would result in exit
|
||||
// radiance with a value of 1 if the top color was white and the bottom color
|
||||
// was black. This is a very simple model where Top represents the intensity
|
||||
// of the "sky" and Bottom represents the intensity of the "ground".
|
||||
//
|
||||
// Parameters:
|
||||
// Order
|
||||
// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1
|
||||
// pDir
|
||||
// Axis of the hemisphere.
|
||||
// Top
|
||||
// Color of the upper hemisphere.
|
||||
// Bottom
|
||||
// Color of the lower hemisphere.
|
||||
// pROut
|
||||
// Output SH vector for Red.
|
||||
// pGOut
|
||||
// Output SH vector for Green
|
||||
// pBOut
|
||||
// Output SH vector for Blue
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
HRESULT WINAPI D3DXSHEvalHemisphereLight
|
||||
( UINT Order, CONST D3DXVECTOR3 *pDir, D3DXCOLOR Top, D3DXCOLOR Bottom,
|
||||
FLOAT *pROut, FLOAT *pGOut, FLOAT *pBOut );
|
||||
|
@ -64,11 +64,6 @@ D3DXFLOAT16::operator != ( CONST D3DXFLOAT16& f ) const
|
||||
D3DXINLINE
|
||||
D3DXVECTOR2::D3DXVECTOR2( CONST FLOAT *pf )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pf)
|
||||
return;
|
||||
#endif
|
||||
|
||||
x = pf[0];
|
||||
y = pf[1];
|
||||
}
|
||||
@ -76,11 +71,6 @@ D3DXVECTOR2::D3DXVECTOR2( CONST FLOAT *pf )
|
||||
D3DXINLINE
|
||||
D3DXVECTOR2::D3DXVECTOR2( CONST D3DXFLOAT16 *pf )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pf)
|
||||
return;
|
||||
#endif
|
||||
|
||||
D3DXFloat16To32Array(&x, pf, 2);
|
||||
}
|
||||
|
||||
@ -208,22 +198,12 @@ D3DXVECTOR2::operator != ( CONST D3DXVECTOR2& v ) const
|
||||
D3DXINLINE
|
||||
D3DXVECTOR2_16F::D3DXVECTOR2_16F( CONST FLOAT *pf )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pf)
|
||||
return;
|
||||
#endif
|
||||
|
||||
D3DXFloat32To16Array(&x, pf, 2);
|
||||
}
|
||||
|
||||
D3DXINLINE
|
||||
D3DXVECTOR2_16F::D3DXVECTOR2_16F( CONST D3DXFLOAT16 *pf )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pf)
|
||||
return;
|
||||
#endif
|
||||
|
||||
*((DWORD *) &x) = *((DWORD *) &pf[0]);
|
||||
}
|
||||
|
||||
@ -269,11 +249,6 @@ D3DXVECTOR2_16F::operator != ( CONST D3DXVECTOR2_16F &v ) const
|
||||
D3DXINLINE
|
||||
D3DXVECTOR3::D3DXVECTOR3( CONST FLOAT *pf )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pf)
|
||||
return;
|
||||
#endif
|
||||
|
||||
x = pf[0];
|
||||
y = pf[1];
|
||||
z = pf[2];
|
||||
@ -290,11 +265,6 @@ D3DXVECTOR3::D3DXVECTOR3( CONST D3DVECTOR& v )
|
||||
D3DXINLINE
|
||||
D3DXVECTOR3::D3DXVECTOR3( CONST D3DXFLOAT16 *pf )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pf)
|
||||
return;
|
||||
#endif
|
||||
|
||||
D3DXFloat16To32Array(&x, pf, 3);
|
||||
}
|
||||
|
||||
@ -429,11 +399,6 @@ D3DXVECTOR3::operator != ( CONST D3DXVECTOR3& v ) const
|
||||
D3DXINLINE
|
||||
D3DXVECTOR3_16F::D3DXVECTOR3_16F( CONST FLOAT *pf )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pf)
|
||||
return;
|
||||
#endif
|
||||
|
||||
D3DXFloat32To16Array(&x, pf, 3);
|
||||
}
|
||||
|
||||
@ -448,11 +413,6 @@ D3DXVECTOR3_16F::D3DXVECTOR3_16F( CONST D3DVECTOR& v )
|
||||
D3DXINLINE
|
||||
D3DXVECTOR3_16F::D3DXVECTOR3_16F( CONST D3DXFLOAT16 *pf )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pf)
|
||||
return;
|
||||
#endif
|
||||
|
||||
*((DWORD *) &x) = *((DWORD *) &pf[0]);
|
||||
*((WORD *) &z) = *((WORD *) &pf[2]);
|
||||
}
|
||||
@ -502,11 +462,6 @@ D3DXVECTOR3_16F::operator != ( CONST D3DXVECTOR3_16F &v ) const
|
||||
D3DXINLINE
|
||||
D3DXVECTOR4::D3DXVECTOR4( CONST FLOAT *pf )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pf)
|
||||
return;
|
||||
#endif
|
||||
|
||||
x = pf[0];
|
||||
y = pf[1];
|
||||
z = pf[2];
|
||||
@ -516,11 +471,6 @@ D3DXVECTOR4::D3DXVECTOR4( CONST FLOAT *pf )
|
||||
D3DXINLINE
|
||||
D3DXVECTOR4::D3DXVECTOR4( CONST D3DXFLOAT16 *pf )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pf)
|
||||
return;
|
||||
#endif
|
||||
|
||||
D3DXFloat16To32Array(&x, pf, 4);
|
||||
}
|
||||
|
||||
@ -668,22 +618,12 @@ D3DXVECTOR4::operator != ( CONST D3DXVECTOR4& v ) const
|
||||
D3DXINLINE
|
||||
D3DXVECTOR4_16F::D3DXVECTOR4_16F( CONST FLOAT *pf )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pf)
|
||||
return;
|
||||
#endif
|
||||
|
||||
D3DXFloat32To16Array(&x, pf, 4);
|
||||
}
|
||||
|
||||
D3DXINLINE
|
||||
D3DXVECTOR4_16F::D3DXVECTOR4_16F( CONST D3DXFLOAT16 *pf )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pf)
|
||||
return;
|
||||
#endif
|
||||
|
||||
*((DWORD *) &x) = *((DWORD *) &pf[0]);
|
||||
*((DWORD *) &z) = *((DWORD *) &pf[2]);
|
||||
}
|
||||
@ -743,11 +683,6 @@ D3DXVECTOR4_16F::operator != ( CONST D3DXVECTOR4_16F &v ) const
|
||||
D3DXINLINE
|
||||
D3DXMATRIX::D3DXMATRIX( CONST FLOAT* pf )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pf)
|
||||
return;
|
||||
#endif
|
||||
|
||||
memcpy(&_11, pf, sizeof(D3DXMATRIX));
|
||||
}
|
||||
|
||||
@ -760,11 +695,6 @@ D3DXMATRIX::D3DXMATRIX( CONST D3DMATRIX& mat )
|
||||
D3DXINLINE
|
||||
D3DXMATRIX::D3DXMATRIX( CONST D3DXFLOAT16* pf )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pf)
|
||||
return;
|
||||
#endif
|
||||
|
||||
D3DXFloat16To32Array(&_11, pf, 16);
|
||||
}
|
||||
|
||||
@ -1053,11 +983,6 @@ _D3DXMATRIXA16::operator=(CONST D3DXMATRIX& rhs)
|
||||
D3DXINLINE
|
||||
D3DXQUATERNION::D3DXQUATERNION( CONST FLOAT* pf )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pf)
|
||||
return;
|
||||
#endif
|
||||
|
||||
x = pf[0];
|
||||
y = pf[1];
|
||||
z = pf[2];
|
||||
@ -1067,11 +992,6 @@ D3DXQUATERNION::D3DXQUATERNION( CONST FLOAT* pf )
|
||||
D3DXINLINE
|
||||
D3DXQUATERNION::D3DXQUATERNION( CONST D3DXFLOAT16* pf )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pf)
|
||||
return;
|
||||
#endif
|
||||
|
||||
D3DXFloat16To32Array(&x, pf, 4);
|
||||
}
|
||||
|
||||
@ -1226,11 +1146,6 @@ D3DXQUATERNION::operator != ( CONST D3DXQUATERNION& q ) const
|
||||
D3DXINLINE
|
||||
D3DXPLANE::D3DXPLANE( CONST FLOAT* pf )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pf)
|
||||
return;
|
||||
#endif
|
||||
|
||||
a = pf[0];
|
||||
b = pf[1];
|
||||
c = pf[2];
|
||||
@ -1240,11 +1155,6 @@ D3DXPLANE::D3DXPLANE( CONST FLOAT* pf )
|
||||
D3DXINLINE
|
||||
D3DXPLANE::D3DXPLANE( CONST D3DXFLOAT16* pf )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pf)
|
||||
return;
|
||||
#endif
|
||||
|
||||
D3DXFloat16To32Array(&a, pf, 4);
|
||||
}
|
||||
|
||||
@ -1361,11 +1271,6 @@ D3DXCOLOR::D3DXCOLOR( DWORD dw )
|
||||
D3DXINLINE
|
||||
D3DXCOLOR::D3DXCOLOR( CONST FLOAT* pf )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pf)
|
||||
return;
|
||||
#endif
|
||||
|
||||
r = pf[0];
|
||||
g = pf[1];
|
||||
b = pf[2];
|
||||
@ -1375,11 +1280,6 @@ D3DXCOLOR::D3DXCOLOR( CONST FLOAT* pf )
|
||||
D3DXINLINE
|
||||
D3DXCOLOR::D3DXCOLOR( CONST D3DXFLOAT16* pf )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pf)
|
||||
return;
|
||||
#endif
|
||||
|
||||
D3DXFloat16To32Array(&r, pf, 4);
|
||||
}
|
||||
|
||||
@ -1576,11 +1476,6 @@ D3DXCOLOR::operator != ( CONST D3DXCOLOR& c ) const
|
||||
D3DXINLINE FLOAT D3DXVec2Length
|
||||
( CONST D3DXVECTOR2 *pV )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pV)
|
||||
return 0.0f;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
return sqrtf(pV->x * pV->x + pV->y * pV->y);
|
||||
#else
|
||||
@ -1591,44 +1486,24 @@ D3DXINLINE FLOAT D3DXVec2Length
|
||||
D3DXINLINE FLOAT D3DXVec2LengthSq
|
||||
( CONST D3DXVECTOR2 *pV )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pV)
|
||||
return 0.0f;
|
||||
#endif
|
||||
|
||||
return pV->x * pV->x + pV->y * pV->y;
|
||||
}
|
||||
|
||||
D3DXINLINE FLOAT D3DXVec2Dot
|
||||
( CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pV1 || !pV2)
|
||||
return 0.0f;
|
||||
#endif
|
||||
|
||||
return pV1->x * pV2->x + pV1->y * pV2->y;
|
||||
}
|
||||
|
||||
D3DXINLINE FLOAT D3DXVec2CCW
|
||||
( CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pV1 || !pV2)
|
||||
return 0.0f;
|
||||
#endif
|
||||
|
||||
return pV1->x * pV2->y - pV1->y * pV2->x;
|
||||
}
|
||||
|
||||
D3DXINLINE D3DXVECTOR2* D3DXVec2Add
|
||||
( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pV1 || !pV2)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->x = pV1->x + pV2->x;
|
||||
pOut->y = pV1->y + pV2->y;
|
||||
return pOut;
|
||||
@ -1637,11 +1512,6 @@ D3DXINLINE D3DXVECTOR2* D3DXVec2Add
|
||||
D3DXINLINE D3DXVECTOR2* D3DXVec2Subtract
|
||||
( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pV1 || !pV2)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->x = pV1->x - pV2->x;
|
||||
pOut->y = pV1->y - pV2->y;
|
||||
return pOut;
|
||||
@ -1650,11 +1520,6 @@ D3DXINLINE D3DXVECTOR2* D3DXVec2Subtract
|
||||
D3DXINLINE D3DXVECTOR2* D3DXVec2Minimize
|
||||
( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pV1 || !pV2)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->x = pV1->x < pV2->x ? pV1->x : pV2->x;
|
||||
pOut->y = pV1->y < pV2->y ? pV1->y : pV2->y;
|
||||
return pOut;
|
||||
@ -1663,11 +1528,6 @@ D3DXINLINE D3DXVECTOR2* D3DXVec2Minimize
|
||||
D3DXINLINE D3DXVECTOR2* D3DXVec2Maximize
|
||||
( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pV1 || !pV2)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->x = pV1->x > pV2->x ? pV1->x : pV2->x;
|
||||
pOut->y = pV1->y > pV2->y ? pV1->y : pV2->y;
|
||||
return pOut;
|
||||
@ -1676,11 +1536,6 @@ D3DXINLINE D3DXVECTOR2* D3DXVec2Maximize
|
||||
D3DXINLINE D3DXVECTOR2* D3DXVec2Scale
|
||||
( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV, FLOAT s )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pV)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->x = pV->x * s;
|
||||
pOut->y = pV->y * s;
|
||||
return pOut;
|
||||
@ -1690,11 +1545,6 @@ D3DXINLINE D3DXVECTOR2* D3DXVec2Lerp
|
||||
( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2,
|
||||
FLOAT s )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pV1 || !pV2)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->x = pV1->x + s * (pV2->x - pV1->x);
|
||||
pOut->y = pV1->y + s * (pV2->y - pV1->y);
|
||||
return pOut;
|
||||
@ -1708,11 +1558,6 @@ D3DXINLINE D3DXVECTOR2* D3DXVec2Lerp
|
||||
D3DXINLINE FLOAT D3DXVec3Length
|
||||
( CONST D3DXVECTOR3 *pV )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pV)
|
||||
return 0.0f;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
return sqrtf(pV->x * pV->x + pV->y * pV->y + pV->z * pV->z);
|
||||
#else
|
||||
@ -1723,22 +1568,12 @@ D3DXINLINE FLOAT D3DXVec3Length
|
||||
D3DXINLINE FLOAT D3DXVec3LengthSq
|
||||
( CONST D3DXVECTOR3 *pV )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pV)
|
||||
return 0.0f;
|
||||
#endif
|
||||
|
||||
return pV->x * pV->x + pV->y * pV->y + pV->z * pV->z;
|
||||
}
|
||||
|
||||
D3DXINLINE FLOAT D3DXVec3Dot
|
||||
( CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pV1 || !pV2)
|
||||
return 0.0f;
|
||||
#endif
|
||||
|
||||
return pV1->x * pV2->x + pV1->y * pV2->y + pV1->z * pV2->z;
|
||||
}
|
||||
|
||||
@ -1747,11 +1582,6 @@ D3DXINLINE D3DXVECTOR3* D3DXVec3Cross
|
||||
{
|
||||
D3DXVECTOR3 v;
|
||||
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pV1 || !pV2)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
v.x = pV1->y * pV2->z - pV1->z * pV2->y;
|
||||
v.y = pV1->z * pV2->x - pV1->x * pV2->z;
|
||||
v.z = pV1->x * pV2->y - pV1->y * pV2->x;
|
||||
@ -1763,11 +1593,6 @@ D3DXINLINE D3DXVECTOR3* D3DXVec3Cross
|
||||
D3DXINLINE D3DXVECTOR3* D3DXVec3Add
|
||||
( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pV1 || !pV2)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->x = pV1->x + pV2->x;
|
||||
pOut->y = pV1->y + pV2->y;
|
||||
pOut->z = pV1->z + pV2->z;
|
||||
@ -1777,11 +1602,6 @@ D3DXINLINE D3DXVECTOR3* D3DXVec3Add
|
||||
D3DXINLINE D3DXVECTOR3* D3DXVec3Subtract
|
||||
( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pV1 || !pV2)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->x = pV1->x - pV2->x;
|
||||
pOut->y = pV1->y - pV2->y;
|
||||
pOut->z = pV1->z - pV2->z;
|
||||
@ -1791,11 +1611,6 @@ D3DXINLINE D3DXVECTOR3* D3DXVec3Subtract
|
||||
D3DXINLINE D3DXVECTOR3* D3DXVec3Minimize
|
||||
( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pV1 || !pV2)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->x = pV1->x < pV2->x ? pV1->x : pV2->x;
|
||||
pOut->y = pV1->y < pV2->y ? pV1->y : pV2->y;
|
||||
pOut->z = pV1->z < pV2->z ? pV1->z : pV2->z;
|
||||
@ -1805,11 +1620,6 @@ D3DXINLINE D3DXVECTOR3* D3DXVec3Minimize
|
||||
D3DXINLINE D3DXVECTOR3* D3DXVec3Maximize
|
||||
( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pV1 || !pV2)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->x = pV1->x > pV2->x ? pV1->x : pV2->x;
|
||||
pOut->y = pV1->y > pV2->y ? pV1->y : pV2->y;
|
||||
pOut->z = pV1->z > pV2->z ? pV1->z : pV2->z;
|
||||
@ -1819,11 +1629,6 @@ D3DXINLINE D3DXVECTOR3* D3DXVec3Maximize
|
||||
D3DXINLINE D3DXVECTOR3* D3DXVec3Scale
|
||||
( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, FLOAT s)
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pV)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->x = pV->x * s;
|
||||
pOut->y = pV->y * s;
|
||||
pOut->z = pV->z * s;
|
||||
@ -1834,11 +1639,6 @@ D3DXINLINE D3DXVECTOR3* D3DXVec3Lerp
|
||||
( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2,
|
||||
FLOAT s )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pV1 || !pV2)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->x = pV1->x + s * (pV2->x - pV1->x);
|
||||
pOut->y = pV1->y + s * (pV2->y - pV1->y);
|
||||
pOut->z = pV1->z + s * (pV2->z - pV1->z);
|
||||
@ -1853,11 +1653,6 @@ D3DXINLINE D3DXVECTOR3* D3DXVec3Lerp
|
||||
D3DXINLINE FLOAT D3DXVec4Length
|
||||
( CONST D3DXVECTOR4 *pV )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pV)
|
||||
return 0.0f;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
return sqrtf(pV->x * pV->x + pV->y * pV->y + pV->z * pV->z + pV->w * pV->w);
|
||||
#else
|
||||
@ -1868,33 +1663,18 @@ D3DXINLINE FLOAT D3DXVec4Length
|
||||
D3DXINLINE FLOAT D3DXVec4LengthSq
|
||||
( CONST D3DXVECTOR4 *pV )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pV)
|
||||
return 0.0f;
|
||||
#endif
|
||||
|
||||
return pV->x * pV->x + pV->y * pV->y + pV->z * pV->z + pV->w * pV->w;
|
||||
}
|
||||
|
||||
D3DXINLINE FLOAT D3DXVec4Dot
|
||||
( CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2 )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pV1 || !pV2)
|
||||
return 0.0f;
|
||||
#endif
|
||||
|
||||
return pV1->x * pV2->x + pV1->y * pV2->y + pV1->z * pV2->z + pV1->w * pV2->w;
|
||||
}
|
||||
|
||||
D3DXINLINE D3DXVECTOR4* D3DXVec4Add
|
||||
( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2)
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pV1 || !pV2)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->x = pV1->x + pV2->x;
|
||||
pOut->y = pV1->y + pV2->y;
|
||||
pOut->z = pV1->z + pV2->z;
|
||||
@ -1905,11 +1685,6 @@ D3DXINLINE D3DXVECTOR4* D3DXVec4Add
|
||||
D3DXINLINE D3DXVECTOR4* D3DXVec4Subtract
|
||||
( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2)
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pV1 || !pV2)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->x = pV1->x - pV2->x;
|
||||
pOut->y = pV1->y - pV2->y;
|
||||
pOut->z = pV1->z - pV2->z;
|
||||
@ -1920,11 +1695,6 @@ D3DXINLINE D3DXVECTOR4* D3DXVec4Subtract
|
||||
D3DXINLINE D3DXVECTOR4* D3DXVec4Minimize
|
||||
( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2)
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pV1 || !pV2)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->x = pV1->x < pV2->x ? pV1->x : pV2->x;
|
||||
pOut->y = pV1->y < pV2->y ? pV1->y : pV2->y;
|
||||
pOut->z = pV1->z < pV2->z ? pV1->z : pV2->z;
|
||||
@ -1935,11 +1705,6 @@ D3DXINLINE D3DXVECTOR4* D3DXVec4Minimize
|
||||
D3DXINLINE D3DXVECTOR4* D3DXVec4Maximize
|
||||
( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2)
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pV1 || !pV2)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->x = pV1->x > pV2->x ? pV1->x : pV2->x;
|
||||
pOut->y = pV1->y > pV2->y ? pV1->y : pV2->y;
|
||||
pOut->z = pV1->z > pV2->z ? pV1->z : pV2->z;
|
||||
@ -1950,11 +1715,6 @@ D3DXINLINE D3DXVECTOR4* D3DXVec4Maximize
|
||||
D3DXINLINE D3DXVECTOR4* D3DXVec4Scale
|
||||
( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV, FLOAT s)
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pV)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->x = pV->x * s;
|
||||
pOut->y = pV->y * s;
|
||||
pOut->z = pV->z * s;
|
||||
@ -1966,11 +1726,6 @@ D3DXINLINE D3DXVECTOR4* D3DXVec4Lerp
|
||||
( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2,
|
||||
FLOAT s )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pV1 || !pV2)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->x = pV1->x + s * (pV2->x - pV1->x);
|
||||
pOut->y = pV1->y + s * (pV2->y - pV1->y);
|
||||
pOut->z = pV1->z + s * (pV2->z - pV1->z);
|
||||
@ -1986,11 +1741,6 @@ D3DXINLINE D3DXVECTOR4* D3DXVec4Lerp
|
||||
D3DXINLINE D3DXMATRIX* D3DXMatrixIdentity
|
||||
( D3DXMATRIX *pOut )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->m[0][1] = pOut->m[0][2] = pOut->m[0][3] =
|
||||
pOut->m[1][0] = pOut->m[1][2] = pOut->m[1][3] =
|
||||
pOut->m[2][0] = pOut->m[2][1] = pOut->m[2][3] =
|
||||
@ -2004,11 +1754,6 @@ D3DXINLINE D3DXMATRIX* D3DXMatrixIdentity
|
||||
D3DXINLINE BOOL D3DXMatrixIsIdentity
|
||||
( CONST D3DXMATRIX *pM )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pM)
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
return pM->m[0][0] == 1.0f && pM->m[0][1] == 0.0f && pM->m[0][2] == 0.0f && pM->m[0][3] == 0.0f &&
|
||||
pM->m[1][0] == 0.0f && pM->m[1][1] == 1.0f && pM->m[1][2] == 0.0f && pM->m[1][3] == 0.0f &&
|
||||
pM->m[2][0] == 0.0f && pM->m[2][1] == 0.0f && pM->m[2][2] == 1.0f && pM->m[2][3] == 0.0f &&
|
||||
@ -2023,11 +1768,6 @@ D3DXINLINE BOOL D3DXMatrixIsIdentity
|
||||
D3DXINLINE FLOAT D3DXQuaternionLength
|
||||
( CONST D3DXQUATERNION *pQ )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pQ)
|
||||
return 0.0f;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
return sqrtf(pQ->x * pQ->x + pQ->y * pQ->y + pQ->z * pQ->z + pQ->w * pQ->w);
|
||||
#else
|
||||
@ -2038,22 +1778,12 @@ D3DXINLINE FLOAT D3DXQuaternionLength
|
||||
D3DXINLINE FLOAT D3DXQuaternionLengthSq
|
||||
( CONST D3DXQUATERNION *pQ )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pQ)
|
||||
return 0.0f;
|
||||
#endif
|
||||
|
||||
return pQ->x * pQ->x + pQ->y * pQ->y + pQ->z * pQ->z + pQ->w * pQ->w;
|
||||
}
|
||||
|
||||
D3DXINLINE FLOAT D3DXQuaternionDot
|
||||
( CONST D3DXQUATERNION *pQ1, CONST D3DXQUATERNION *pQ2 )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pQ1 || !pQ2)
|
||||
return 0.0f;
|
||||
#endif
|
||||
|
||||
return pQ1->x * pQ2->x + pQ1->y * pQ2->y + pQ1->z * pQ2->z + pQ1->w * pQ2->w;
|
||||
}
|
||||
|
||||
@ -2061,11 +1791,6 @@ D3DXINLINE FLOAT D3DXQuaternionDot
|
||||
D3DXINLINE D3DXQUATERNION* D3DXQuaternionIdentity
|
||||
( D3DXQUATERNION *pOut )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->x = pOut->y = pOut->z = 0.0f;
|
||||
pOut->w = 1.0f;
|
||||
return pOut;
|
||||
@ -2074,11 +1799,6 @@ D3DXINLINE D3DXQUATERNION* D3DXQuaternionIdentity
|
||||
D3DXINLINE BOOL D3DXQuaternionIsIdentity
|
||||
( CONST D3DXQUATERNION *pQ )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pQ)
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
return pQ->x == 0.0f && pQ->y == 0.0f && pQ->z == 0.0f && pQ->w == 1.0f;
|
||||
}
|
||||
|
||||
@ -2086,11 +1806,6 @@ D3DXINLINE BOOL D3DXQuaternionIsIdentity
|
||||
D3DXINLINE D3DXQUATERNION* D3DXQuaternionConjugate
|
||||
( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ )
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pQ)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->x = -pQ->x;
|
||||
pOut->y = -pQ->y;
|
||||
pOut->z = -pQ->z;
|
||||
@ -2106,44 +1821,24 @@ D3DXINLINE D3DXQUATERNION* D3DXQuaternionConjugate
|
||||
D3DXINLINE FLOAT D3DXPlaneDot
|
||||
( CONST D3DXPLANE *pP, CONST D3DXVECTOR4 *pV)
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pP || !pV)
|
||||
return 0.0f;
|
||||
#endif
|
||||
|
||||
return pP->a * pV->x + pP->b * pV->y + pP->c * pV->z + pP->d * pV->w;
|
||||
}
|
||||
|
||||
D3DXINLINE FLOAT D3DXPlaneDotCoord
|
||||
( CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV)
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pP || !pV)
|
||||
return 0.0f;
|
||||
#endif
|
||||
|
||||
return pP->a * pV->x + pP->b * pV->y + pP->c * pV->z + pP->d;
|
||||
}
|
||||
|
||||
D3DXINLINE FLOAT D3DXPlaneDotNormal
|
||||
( CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV)
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pP || !pV)
|
||||
return 0.0f;
|
||||
#endif
|
||||
|
||||
return pP->a * pV->x + pP->b * pV->y + pP->c * pV->z;
|
||||
}
|
||||
|
||||
D3DXINLINE D3DXPLANE* D3DXPlaneScale
|
||||
(D3DXPLANE *pOut, CONST D3DXPLANE *pP, FLOAT s)
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pP)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->a = pP->a * s;
|
||||
pOut->b = pP->b * s;
|
||||
pOut->c = pP->c * s;
|
||||
@ -2159,11 +1854,6 @@ D3DXINLINE D3DXPLANE* D3DXPlaneScale
|
||||
D3DXINLINE D3DXCOLOR* D3DXColorNegative
|
||||
(D3DXCOLOR *pOut, CONST D3DXCOLOR *pC)
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pC)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->r = 1.0f - pC->r;
|
||||
pOut->g = 1.0f - pC->g;
|
||||
pOut->b = 1.0f - pC->b;
|
||||
@ -2174,11 +1864,6 @@ D3DXINLINE D3DXCOLOR* D3DXColorNegative
|
||||
D3DXINLINE D3DXCOLOR* D3DXColorAdd
|
||||
(D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2)
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pC1 || !pC2)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->r = pC1->r + pC2->r;
|
||||
pOut->g = pC1->g + pC2->g;
|
||||
pOut->b = pC1->b + pC2->b;
|
||||
@ -2189,11 +1874,6 @@ D3DXINLINE D3DXCOLOR* D3DXColorAdd
|
||||
D3DXINLINE D3DXCOLOR* D3DXColorSubtract
|
||||
(D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2)
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pC1 || !pC2)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->r = pC1->r - pC2->r;
|
||||
pOut->g = pC1->g - pC2->g;
|
||||
pOut->b = pC1->b - pC2->b;
|
||||
@ -2204,11 +1884,6 @@ D3DXINLINE D3DXCOLOR* D3DXColorSubtract
|
||||
D3DXINLINE D3DXCOLOR* D3DXColorScale
|
||||
(D3DXCOLOR *pOut, CONST D3DXCOLOR *pC, FLOAT s)
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pC)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->r = pC->r * s;
|
||||
pOut->g = pC->g * s;
|
||||
pOut->b = pC->b * s;
|
||||
@ -2219,11 +1894,6 @@ D3DXINLINE D3DXCOLOR* D3DXColorScale
|
||||
D3DXINLINE D3DXCOLOR* D3DXColorModulate
|
||||
(D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2)
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pC1 || !pC2)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->r = pC1->r * pC2->r;
|
||||
pOut->g = pC1->g * pC2->g;
|
||||
pOut->b = pC1->b * pC2->b;
|
||||
@ -2234,11 +1904,6 @@ D3DXINLINE D3DXCOLOR* D3DXColorModulate
|
||||
D3DXINLINE D3DXCOLOR* D3DXColorLerp
|
||||
(D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2, FLOAT s)
|
||||
{
|
||||
#ifdef D3DX_DEBUG
|
||||
if(!pOut || !pC1 || !pC2)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
pOut->r = pC1->r + s * (pC2->r - pC1->r);
|
||||
pOut->g = pC1->g + s * (pC2->g - pC1->g);
|
||||
pOut->b = pC1->b + s * (pC2->b - pC1->b);
|
||||
|
Loading…
Reference in New Issue
Block a user