pygf 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pygf/__init__.py ADDED
@@ -0,0 +1,173 @@
1
+ from .alias import (
2
+ color3d,
3
+ color3f,
4
+ color3h,
5
+ color4d,
6
+ color4f,
7
+ color4h,
8
+ frame4d,
9
+ normal3d,
10
+ normal3f,
11
+ normal3h,
12
+ point3d,
13
+ point3f,
14
+ point3h,
15
+ texCoord2d,
16
+ texCoord2f,
17
+ texCoord2h,
18
+ texCoord3d,
19
+ texCoord3f,
20
+ texCoord3h,
21
+ vector3d,
22
+ vector3f,
23
+ vector3h,
24
+ )
25
+ from .bool2 import bool2
26
+ from .bool3 import bool3
27
+ from .bool4 import bool4
28
+ from .double2 import double2
29
+ from .double3 import double3
30
+ from .double4 import double4
31
+ from .float2 import float2
32
+ from .float3 import float3
33
+ from .float4 import float4
34
+ from .funcs import (
35
+ abs,
36
+ acos,
37
+ acosh,
38
+ all,
39
+ any,
40
+ asin,
41
+ asinh,
42
+ atan,
43
+ atanh,
44
+ ceil,
45
+ clamp,
46
+ conjugate,
47
+ cos,
48
+ cosh,
49
+ cross,
50
+ determinant,
51
+ distance,
52
+ dot,
53
+ equal,
54
+ exp,
55
+ exp2,
56
+ exp10,
57
+ faceforward,
58
+ floor,
59
+ fract,
60
+ greaterThan,
61
+ greaterThanEqual,
62
+ inverse,
63
+ inversesqrt,
64
+ length,
65
+ lessThan,
66
+ lessThanEqual,
67
+ log,
68
+ log2,
69
+ log10,
70
+ matrixCompMult,
71
+ max,
72
+ min,
73
+ mix,
74
+ mod,
75
+ normalize,
76
+ not_,
77
+ notEqual,
78
+ outerProduct,
79
+ pow,
80
+ reflect,
81
+ refract,
82
+ round,
83
+ roundEven,
84
+ sign,
85
+ sin,
86
+ sinh,
87
+ sizeof,
88
+ smoothstep,
89
+ sqrt,
90
+ step,
91
+ tan,
92
+ tanh,
93
+ trace,
94
+ transpose,
95
+ trunc,
96
+ )
97
+ from .genMat import MatType, genMat
98
+ from .genMat2 import Mat2Type, genMat2
99
+ from .genMat3 import Mat3Type, genMat3
100
+ from .genMat4 import Mat4Type, genMat4
101
+ from .genQuat import QuatType, genQuat
102
+ from .genType import MathForm, genType
103
+ from .genVec import VecType, genVec
104
+ from .genVec2 import Vec2Type, genVec2
105
+ from .genVec3 import Vec3Type, genVec3
106
+ from .genVec4 import Vec4Type, genVec4
107
+ from .half2 import half2
108
+ from .half3 import half3
109
+ from .half4 import half4
110
+ from .helper import Number, patch_nparray
111
+ from .int2 import int2
112
+ from .int3 import int3
113
+ from .int4 import int4
114
+ from .matrix2b import matrix2b
115
+ from .matrix2d import matrix2d
116
+ from .matrix2f import matrix2f
117
+ from .matrix3b import matrix3b
118
+ from .matrix3d import matrix3d
119
+ from .matrix3f import matrix3f
120
+ from .matrix4b import matrix4b
121
+ from .matrix4d import matrix4d
122
+ from .matrix4f import matrix4f
123
+ from .quatb import quatb
124
+ from .quatd import quatd
125
+ from .quatf import quatf
126
+ from .quath import quath
127
+ from .uint2 import uint2
128
+ from .uint3 import uint3
129
+ from .uint4 import uint4
130
+
131
+ __all__ = [
132
+ "MathForm",
133
+ "genType", "Number",
134
+ "genVec", "VecType",
135
+ "genVec2", "Vec2Type",
136
+ "genVec3", "Vec3Type",
137
+ "genVec4", "Vec4Type",
138
+ "genMat", "MatType",
139
+ "genMat2", "Mat2Type",
140
+ "genMat3", "Mat3Type",
141
+ "genMat4", "Mat4Type",
142
+ "genQuat", "QuatType",
143
+ "bool2", "bool3", "bool4",
144
+ "int2", "int3", "int4",
145
+ "uint2", "uint3", "uint4",
146
+ "half2", "half3", "half4",
147
+ "float2", "float3", "float4",
148
+ "double2", "double3", "double4",
149
+ "matrix2b", "matrix3b", "matrix4b",
150
+ "matrix2f", "matrix3f", "matrix4f",
151
+ "matrix2d", "matrix3d", "matrix4d",
152
+ "quatb", "quatf", "quatd", "quath",
153
+ "color3h", "color3f", "color3d",
154
+ "color4h", "color4f", "color4d",
155
+ "texCoord2h", "texCoord2f", "texCoord2d",
156
+ "texCoord3h", "texCoord3f", "texCoord3d",
157
+ "normal3h", "normal3f", "normal3d",
158
+ "point3h", "point3f", "point3d",
159
+ "vector3h", "vector3f", "vector3d",
160
+ "frame4d",
161
+
162
+ "abs", "sign", "floor", "ceil", "trunc", "round", "roundEven", "fract", "mod",
163
+ "min", "max", "clamp", "mix", "step", "smoothstep", "sqrt", "inversesqrt",
164
+ "pow", "exp", "exp2", "exp10", "log", "log2", "log10",
165
+ "sin", "cos", "tan", "asin", "acos", "atan",
166
+ "sinh", "cosh", "tanh", "asinh", "acosh", "atanh",
167
+ "length", "normalize", "distance", "dot", "cross", "faceforward", "reflect", "refract",
168
+ "transpose", "determinant", "inverse", "trace", "conjugate",
169
+ "matrixCompMult", "outerProduct", "lessThan", "lessThanEqual",
170
+ "greaterThan", "greaterThanEqual", "equal", "notEqual", "any", "all", "not_", "sizeof"
171
+ ]
172
+
173
+ patch_nparray()
pygf/alias.py ADDED
@@ -0,0 +1,84 @@
1
+ from .double2 import double2
2
+ from .double3 import double3
3
+ from .double4 import double4
4
+ from .float2 import float2
5
+ from .float3 import float3
6
+ from .float4 import float4
7
+ from .half2 import half2
8
+ from .half3 import half3
9
+ from .half4 import half4
10
+ from .matrix4d import matrix4d
11
+
12
+
13
+ class color3d(double3):
14
+ pass
15
+
16
+ class color3f(float3):
17
+ pass
18
+
19
+ class color3h(half3):
20
+ pass
21
+
22
+
23
+ class color4d(double4):
24
+ pass
25
+
26
+ class color4f(float4):
27
+ pass
28
+
29
+ class color4h(half4):
30
+ pass
31
+
32
+
33
+ class normal3d(double3):
34
+ pass
35
+
36
+ class normal3f(float3):
37
+ pass
38
+
39
+ class normal3h(half3):
40
+ pass
41
+
42
+
43
+ class point3d(double3):
44
+ pass
45
+
46
+ class point3f(float3):
47
+ pass
48
+
49
+ class point3h(half3):
50
+ pass
51
+
52
+
53
+ class vector3d(double3):
54
+ pass
55
+
56
+ class vector3f(float3):
57
+ pass
58
+
59
+ class vector3h(half3):
60
+ pass
61
+
62
+
63
+ class frame4d(matrix4d):
64
+ pass
65
+
66
+
67
+ class texCoord2d(double2):
68
+ pass
69
+
70
+ class texCoord2f(float2):
71
+ pass
72
+
73
+ class texCoord2h(half2):
74
+ pass
75
+
76
+
77
+ class texCoord3d(double3):
78
+ pass
79
+
80
+ class texCoord3f(float3):
81
+ pass
82
+
83
+ class texCoord3h(half3):
84
+ pass
pygf/bool2.py ADDED
@@ -0,0 +1,337 @@
1
+ import ctypes
2
+ from typing import TYPE_CHECKING, Union
3
+
4
+ from .genVec2 import genVec2
5
+
6
+ if TYPE_CHECKING:
7
+
8
+ from .bool3 import bool3
9
+ from .bool4 import bool4
10
+
11
+ # --- BEGIN generated swizzle imports ---
12
+ # --- END generated swizzle imports ---
13
+
14
+ class bool2(genVec2):
15
+
16
+ _fields_ = [
17
+ ('x', ctypes.c_bool),
18
+ ('y', ctypes.c_bool)
19
+ ]
20
+
21
+ @property
22
+ def dtype(self)->type:
23
+ return ctypes.c_bool
24
+
25
+ if TYPE_CHECKING:
26
+
27
+ # Every swizzle genVec can build, as declarations only. This block never
28
+ # executes, so the runtime path stays genVec.__getattr__.
29
+ # Regenerate with tools/sync_swizzle_blocks.py.
30
+ # --- BEGIN generated swizzles ---
31
+
32
+ @property
33
+ def x(self)->bool: ...
34
+
35
+ @x.setter
36
+ def x(self, value:Union[bool, int, float])->None: ...
37
+
38
+ @property
39
+ def y(self)->bool: ...
40
+
41
+ @y.setter
42
+ def y(self, value:Union[bool, int, float])->None: ...
43
+
44
+ @property
45
+ def xx(self)->"bool2": ...
46
+
47
+ @property
48
+ def xy(self)->"bool2": ...
49
+
50
+ @xy.setter
51
+ def xy(self, value:Union[bool, int, float, genVec2])->None: ...
52
+
53
+ @property
54
+ def yx(self)->"bool2": ...
55
+
56
+ @yx.setter
57
+ def yx(self, value:Union[bool, int, float, genVec2])->None: ...
58
+
59
+ @property
60
+ def yy(self)->"bool2": ...
61
+
62
+ @property
63
+ def xxx(self)->bool3: ...
64
+
65
+ @property
66
+ def xxy(self)->bool3: ...
67
+
68
+ @property
69
+ def xyx(self)->bool3: ...
70
+
71
+ @property
72
+ def xyy(self)->bool3: ...
73
+
74
+ @property
75
+ def yxx(self)->bool3: ...
76
+
77
+ @property
78
+ def yxy(self)->bool3: ...
79
+
80
+ @property
81
+ def yyx(self)->bool3: ...
82
+
83
+ @property
84
+ def yyy(self)->bool3: ...
85
+
86
+ @property
87
+ def xxxx(self)->bool4: ...
88
+
89
+ @property
90
+ def xxxy(self)->bool4: ...
91
+
92
+ @property
93
+ def xxyx(self)->bool4: ...
94
+
95
+ @property
96
+ def xxyy(self)->bool4: ...
97
+
98
+ @property
99
+ def xyxx(self)->bool4: ...
100
+
101
+ @property
102
+ def xyxy(self)->bool4: ...
103
+
104
+ @property
105
+ def xyyx(self)->bool4: ...
106
+
107
+ @property
108
+ def xyyy(self)->bool4: ...
109
+
110
+ @property
111
+ def yxxx(self)->bool4: ...
112
+
113
+ @property
114
+ def yxxy(self)->bool4: ...
115
+
116
+ @property
117
+ def yxyx(self)->bool4: ...
118
+
119
+ @property
120
+ def yxyy(self)->bool4: ...
121
+
122
+ @property
123
+ def yyxx(self)->bool4: ...
124
+
125
+ @property
126
+ def yyxy(self)->bool4: ...
127
+
128
+ @property
129
+ def yyyx(self)->bool4: ...
130
+
131
+ @property
132
+ def yyyy(self)->bool4: ...
133
+
134
+ @property
135
+ def r(self)->bool: ...
136
+
137
+ @r.setter
138
+ def r(self, value:Union[bool, int, float])->None: ...
139
+
140
+ @property
141
+ def g(self)->bool: ...
142
+
143
+ @g.setter
144
+ def g(self, value:Union[bool, int, float])->None: ...
145
+
146
+ @property
147
+ def rr(self)->"bool2": ...
148
+
149
+ @property
150
+ def rg(self)->"bool2": ...
151
+
152
+ @rg.setter
153
+ def rg(self, value:Union[bool, int, float, genVec2])->None: ...
154
+
155
+ @property
156
+ def gr(self)->"bool2": ...
157
+
158
+ @gr.setter
159
+ def gr(self, value:Union[bool, int, float, genVec2])->None: ...
160
+
161
+ @property
162
+ def gg(self)->"bool2": ...
163
+
164
+ @property
165
+ def rrr(self)->bool3: ...
166
+
167
+ @property
168
+ def rrg(self)->bool3: ...
169
+
170
+ @property
171
+ def rgr(self)->bool3: ...
172
+
173
+ @property
174
+ def rgg(self)->bool3: ...
175
+
176
+ @property
177
+ def grr(self)->bool3: ...
178
+
179
+ @property
180
+ def grg(self)->bool3: ...
181
+
182
+ @property
183
+ def ggr(self)->bool3: ...
184
+
185
+ @property
186
+ def ggg(self)->bool3: ...
187
+
188
+ @property
189
+ def rrrr(self)->bool4: ...
190
+
191
+ @property
192
+ def rrrg(self)->bool4: ...
193
+
194
+ @property
195
+ def rrgr(self)->bool4: ...
196
+
197
+ @property
198
+ def rrgg(self)->bool4: ...
199
+
200
+ @property
201
+ def rgrr(self)->bool4: ...
202
+
203
+ @property
204
+ def rgrg(self)->bool4: ...
205
+
206
+ @property
207
+ def rggr(self)->bool4: ...
208
+
209
+ @property
210
+ def rggg(self)->bool4: ...
211
+
212
+ @property
213
+ def grrr(self)->bool4: ...
214
+
215
+ @property
216
+ def grrg(self)->bool4: ...
217
+
218
+ @property
219
+ def grgr(self)->bool4: ...
220
+
221
+ @property
222
+ def grgg(self)->bool4: ...
223
+
224
+ @property
225
+ def ggrr(self)->bool4: ...
226
+
227
+ @property
228
+ def ggrg(self)->bool4: ...
229
+
230
+ @property
231
+ def gggr(self)->bool4: ...
232
+
233
+ @property
234
+ def gggg(self)->bool4: ...
235
+
236
+ @property
237
+ def s(self)->bool: ...
238
+
239
+ @s.setter
240
+ def s(self, value:Union[bool, int, float])->None: ...
241
+
242
+ @property
243
+ def t(self)->bool: ...
244
+
245
+ @t.setter
246
+ def t(self, value:Union[bool, int, float])->None: ...
247
+
248
+ @property
249
+ def ss(self)->"bool2": ...
250
+
251
+ @property
252
+ def st(self)->"bool2": ...
253
+
254
+ @st.setter
255
+ def st(self, value:Union[bool, int, float, genVec2])->None: ...
256
+
257
+ @property
258
+ def ts(self)->"bool2": ...
259
+
260
+ @ts.setter
261
+ def ts(self, value:Union[bool, int, float, genVec2])->None: ...
262
+
263
+ @property
264
+ def tt(self)->"bool2": ...
265
+
266
+ @property
267
+ def sss(self)->bool3: ...
268
+
269
+ @property
270
+ def sst(self)->bool3: ...
271
+
272
+ @property
273
+ def sts(self)->bool3: ...
274
+
275
+ @property
276
+ def stt(self)->bool3: ...
277
+
278
+ @property
279
+ def tss(self)->bool3: ...
280
+
281
+ @property
282
+ def tst(self)->bool3: ...
283
+
284
+ @property
285
+ def tts(self)->bool3: ...
286
+
287
+ @property
288
+ def ttt(self)->bool3: ...
289
+
290
+ @property
291
+ def ssss(self)->bool4: ...
292
+
293
+ @property
294
+ def ssst(self)->bool4: ...
295
+
296
+ @property
297
+ def ssts(self)->bool4: ...
298
+
299
+ @property
300
+ def sstt(self)->bool4: ...
301
+
302
+ @property
303
+ def stss(self)->bool4: ...
304
+
305
+ @property
306
+ def stst(self)->bool4: ...
307
+
308
+ @property
309
+ def stts(self)->bool4: ...
310
+
311
+ @property
312
+ def sttt(self)->bool4: ...
313
+
314
+ @property
315
+ def tsss(self)->bool4: ...
316
+
317
+ @property
318
+ def tsst(self)->bool4: ...
319
+
320
+ @property
321
+ def tsts(self)->bool4: ...
322
+
323
+ @property
324
+ def tstt(self)->bool4: ...
325
+
326
+ @property
327
+ def ttss(self)->bool4: ...
328
+
329
+ @property
330
+ def ttst(self)->bool4: ...
331
+
332
+ @property
333
+ def ttts(self)->bool4: ...
334
+
335
+ @property
336
+ def tttt(self)->bool4: ...
337
+ # --- END generated swizzles ---