Vladimír Vondruš
d75f31e854
python: expose new linear RGB(A) conversion APIs from Color.
3 years ago
Vladimír Vondruš
dddef56c87
python: adapt to Magnum changes.
...
Which means the API gets renamed, so a breaking change.
3 years ago
Vladimír Vondruš
62a07c38bc
python: adapt to Magnum changes.
4 years ago
Vladimír Vondruš
2295f43873
Updated copyright year.
4 years ago
Vladimír Vondruš
0120b3f768
python: add remaining vector/scalar, exp and other math functions.
...
Except for binomial coefficient, there the asserts are hard to replicate
and would need a change on Magnum side.
4 years ago
Aaron Gokaslan
c50a2f6851
python: add bindings for convenience color functions.
...
Co-authored-by: Vladimír Vondruš <mosra@centrum.cz>
5 years ago
Vladimír Vondruš
cbb5358efd
python: apparently I can't name functions from(), hah.
5 years ago
Vladimír Vondruš
84f9bb2a9d
Updated copyright year.
5 years ago
Vladimír Vondruš
b1d45fc85a
Updated copyright year.
6 years ago
Vladimír Vondruš
500311fa7c
python: add APIs for Color from/to sRGB int.
...
I need that for generating colormaps.
6 years ago
Vladimír Vondruš
d818e40698
python: implemented vector swizzles.
7 years ago
Vladimír Vondruš
14f7810870
python: finish the magic and docs for Matrix[34].scaling() and friends.
...
This is so ugly it's beautiful. The translation needed a metaclass to
work properly, but the undoubtedly worst/best is making those exposed
nicely in the docs.
7 years ago
Vladimír Vondruš
3dcb176c80
python: bind Math::Range.
7 years ago
Vladimír Vondruš
22a17cb5b8
python: slightly improve perf of __getitem__ on matrices/vectors.
...
Also test them properly. The full optimization is waiting for a pybind
PR to get merged.
7 years ago
Vladimír Vondruš
d1d6cb9ec0
python/magum/math: switch to our own buffer protocol implementation.
...
Also don't needlessly define buffer protocol again for subclasses (such
as Matrix3 or Color4) as the base can handle that just fine.
7 years ago
Vladimír Vondruš
7fba2a030e
python: test at least the temporary property.
7 years ago
Vladimír Vondruš
d5b5b55d2f
python: make sure all Matrix static constructors return proper type.
...
And test for those.
7 years ago
Vladimír Vondruš
52a0650cd2
python: expose at least underscored Matrix[34]._translation property.
...
Still need to figure out a way to expose the property with the same name
as a static function, but this has to suffice for now.
7 years ago
Vladimír Vondruš
124980cec4
python: return proper type when doing operations on Color.
7 years ago
Vladimír Vondruš
dc1ef106bf
python: improve matrix bindings code coverage.
7 years ago
Vladimír Vondruš
452d9478ab
python: make it possible to create matrices from nested tuples.
...
Ugh, I need to drop this std::tuple. It makes code complicated for no
reason.
7 years ago
Vladimír Vondruš
464154adca
python: implement conversions between different underlying types.
...
Such a tiny feature and such a pain when it's not there.
7 years ago
Vladimír Vondruš
2c82dc8b3d
python: make Matrix4 operations return Matrix4, not Matrix4x4.
...
Similarly for Matrix3. Also make it implicitly convertible from the base
type.
7 years ago
Vladimír Vondruš
998c428355
python: expose Color3 and Color4.
...
Mainly for RGB -> RGBA shortcuts. Need to invent some nice decoding from
a string.
7 years ago
Vladimír Vondruš
2132bd0410
python: expose basic math functions.
7 years ago
Vladimír Vondruš
a55a7e6009
python: expose Quaternion.
7 years ago
Vladimír Vondruš
bd49350994
python: expose Matrix3 and Matrix4.
...
The clash of static constructors and members / properties is ...
unfortunate. This is resolved using a minor hack, but I think that's
warranted if it preserves C++/Python API compatibility. The
translation() static constructor and property is not done yet, tho.
7 years ago
Vladimír Vondruš
44503539e7
python: expose matrix types.
...
Not the Matrix4 / Matrix3 transformation types yet, though.
7 years ago
Vladimír Vondruš
f6cca325dd
python: make vectors implicitly convertible from tuples.
7 years ago
Vladimír Vondruš
b81cde3c45
python: support iteration over vectors.
7 years ago
Vladimír Vondruš
081d32938a
python: expose all Vector variants.
7 years ago
Vladimír Vondruš
58070082fa
python: expose Constants.
...
Only the double variants (since Python doesn't really differentiate
between 32bit and 64bit floats) and directly into math to mimic Python's
math module.
7 years ago
Vladimír Vondruš
e305eb4c7e
python: expose BoolVector.
7 years ago
Vladimír Vondruš
2922f28267
Initial code for the Python bindings, adding math angle types.
...
Only the double ones, exposed as floats, because the extra ALU required
by doubles is negligible to function call overhead. It'll be different
for non-scalar types, but here I use this.
7 years ago