include: Pack HID_DESCRIPTOR.
[wine/zf.git] / include / d3dx10math.h
blobc8bcfd2ce4e1f898aeac9842224be67bf9cfc62d
1 /*
2 * Copyright (C) 2016 Alistair Leslie-Hughes
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "d3dx10.h"
21 /* This guard is the same as D3DX9 to prevent double-inclusion */
22 #ifndef __D3DX9MATH_H__
23 #define __D3DX9MATH_H__
25 #include <math.h>
27 typedef enum _D3DX_CPU_OPTIMIZATION
29 D3DX_NOT_OPTIMIZED,
30 D3DX_3DNOW_OPTIMIZED,
31 D3DX_SSE2_OPTIMIZED,
32 D3DX_SSE_OPTIMIZED
33 } D3DX_CPU_OPTIMIZATION;
35 typedef struct D3DXFLOAT16
37 #ifdef __cplusplus
38 D3DXFLOAT16();
39 D3DXFLOAT16(float f);
40 D3DXFLOAT16(const D3DXFLOAT16 &f);
42 operator float();
44 BOOL operator==(const D3DXFLOAT16 &f) const;
45 BOOL operator!=(const D3DXFLOAT16 &f) const;
46 #endif
47 WORD value;
48 } D3DXFLOAT16, *LPD3DXFLOAT16;
50 typedef struct D3DXCOLOR
52 #ifdef __cplusplus
53 public:
54 D3DXCOLOR(){};
55 D3DXCOLOR(UINT color);
56 D3DXCOLOR(const float *color);
57 D3DXCOLOR(const D3DXFLOAT16 *color);
58 D3DXCOLOR(float r, float g, float b, float a);
60 operator UINT() const;
61 operator float *();
62 operator const float *() const;
64 D3DXCOLOR & operator+=(const D3DXCOLOR &color);
65 D3DXCOLOR & operator-=(const D3DXCOLOR &color);
66 D3DXCOLOR & operator*=(float n);
67 D3DXCOLOR & operator/=(float n);
69 D3DXCOLOR operator+() const;
70 D3DXCOLOR operator-() const;
72 D3DXCOLOR operator+(const D3DXCOLOR &color) const;
73 D3DXCOLOR operator-(const D3DXCOLOR &color) const;
74 D3DXCOLOR operator*(float n) const;
75 D3DXCOLOR operator/(float n) const;
77 friend D3DXCOLOR operator*(float n, const D3DXCOLOR &color);
79 BOOL operator==(const D3DXCOLOR &color) const;
80 BOOL operator!=(const D3DXCOLOR &color) const;
81 #endif
82 float r, g, b, a;
83 } D3DXCOLOR, *LPD3DXCOLOR;
85 #ifdef __cplusplus
86 extern "C" {
87 #endif
89 D3DXCOLOR *D3DXColorAdd(D3DXCOLOR *out, D3DXCOLOR c1, D3DXCOLOR c2);
90 D3DXCOLOR *D3DXColorLerp(D3DXCOLOR *out, D3DXCOLOR c1, D3DXCOLOR c2, float s);
91 D3DXCOLOR *D3DXColorModulate(D3DXCOLOR *out, D3DXCOLOR c1, D3DXCOLOR c2);
92 D3DXCOLOR *D3DXColorScale(D3DXCOLOR *out, D3DXCOLOR c, float s);
93 D3DXCOLOR *D3DXColorSubtract(D3DXCOLOR *out, D3DXCOLOR c1, D3DXCOLOR c2);
94 D3DX_CPU_OPTIMIZATION WINAPI D3DXCpuOptimizations(BOOL enable);
96 #ifdef __cplusplus
98 #endif
100 #endif /* __D3DX9MATH_H__ */