Vladimír Vondruš
d050145e51
python: put everything into a single module if magnum is built statically.
...
That makes it much easier to handle in that case (because that's the
whole point of static builds) and also nicely circumvents any issues
with duplicated global data when a static lib would be linked to
multiple dynamic libraries.
7 years ago
Vladimír Vondruš
21ee51fd96
python: do as little as possible in PYBIND11_MODULE.
7 years ago
Vladimír Vondruš
6adc330e39
python: minor cleanup.
7 years ago
Vladimír Vondruš
d0d028f72d
python: make the main bindings _magnum, not magnum._magnum.
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š
2cfb061d7b
python: expose TRS SceneGraph implementation.
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š
012bccffbd
python: make room for more scenegraph transformation implementations.
...
Also might make it more parallel, hopefully.
7 years ago
Vladimír Vondruš
82862b8bcd
python: numpy compatibility for matrices and vectors.
7 years ago
Vladimír Vondruš
124980cec4
python: return proper type when doing operations on Color.
7 years ago
Vladimír Vondruš
fde6102a8d
python: expose SceneGraph Python wrapping helpers.
...
Those will get used by 3rd party code, so need to be installed.
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š
670537d664
python: implement basic mouse events for SDL2 and GLFW apps.
...
This took a while because I wasn't able to convince pybind to do what I
want.
7 years ago
Vladimír Vondruš
ecc616b48c
python: expose minimum of GL::Renderer.
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š
2ae83a0c26
python: make ArrayView properly convertible from Python array.
...
Also fix element sizes that aren't 1.
7 years ago
Vladimír Vondruš
2b0dfaa22a
python: expose MeshTools::compile().
7 years ago
Vladimír Vondruš
4b58ba5204
python: Cube and Square from Primitives.
7 years ago
Vladimír Vondruš
293c5eca64
python: *very* little from Trade.
7 years ago
Vladimír Vondruš
8b1efde15f
python: add generic MeshPrimitive and MeshIndexType enums.
7 years ago
Vladimír Vondruš
0db853a483
python: expose the (almost) full Phong shader.
...
Except textures.
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š
ad01c1a306
python: initial SceneGraph bits.
7 years ago
Vladimír Vondruš
86d64a6a5a
package/archlinux: coverage PKGBUILD.
...
Generating both C++ and Python coverage.
7 years ago
Vladimír Vondruš
4cca099297
python: make `import magnum.math` working.
7 years ago
Vladimír Vondruš
2132bd0410
python: expose basic math functions.
7 years ago
Vladimír Vondruš
a644684e5e
python: oh of course, $<TARGET_EXISTS> is too new to be useful.
7 years ago
Vladimír Vondruš
33998df685
python: very barebones SDL2 & GLFW applications.
...
Similarly to the windowless ones, one of them gets picked up to be
platform.Application.
7 years ago
Vladimír Vondruš
4de30ab058
python: initial bits of the Shaders library.
7 years ago
Vladimír Vondruš
34acdf6c6a
python: expose bits of GL::Mesh.
7 years ago
Vladimír Vondruš
7dadc27475
python: expose the GL::AbstractShaderProgram type.
...
The type needs to be known for Mesh::draw() and shaders later.
7 years ago
Vladimír Vondruš
03af644506
python: expose minimum of GL::DefaultFramebuffer.
...
Some non-trivial tricks had to be done in order to expose the
GL::defaultFramebuffer variable without causing leaks or double frees.
Also, the AbstractFramebuffer has a protected destructor so this needs
another special handling.
7 years ago
Vladimír Vondruš
c94598d6c1
python: expose initial GL::Buffer bits.
7 years ago
Vladimír Vondruš
6c10265efd
python: base for GL tests.
7 years ago
Vladimír Vondruš
aec29e7da8
python: initial bits of the GL library.
7 years ago
Vladimír Vondruš
caa1619eef
python: expose Windowless{Glx,Egl}Application in platform.{glx,egl}.
...
One of them is then available through the platform.WindowlessApplication
alias. The selection is a bit arbitrary now, but has to suffice.
7 years ago
Vladimír Vondruš
d34366ac46
python: expose ArrayView and StridedArrayView.
...
Wow. This took a while and still is far from ideal.
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š
0311987fdd
python: make angles implicitly convertible to each other.
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