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š
d4dff647f7
python: these are done.
7 years ago
Vladimír Vondruš
0170dea8f4
python: consolidate buffer-related headers.
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š
700fd7c510
python: doc++
7 years ago
Vladimír Vondruš
b3a06f62e6
python: expose the new Matrix4::perspectiveProjection() overload.
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š
82862b8bcd
python: numpy compatibility for matrices and vectors.
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š
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