insarviz.misc.GLProgram module

class insarviz.misc.GLProgram.GLProgram(shaders)[source]

Bases: QOpenGLShaderProgram

alloc_id()[source]
create_grid_mesh(attrib, w, h)[source]
create_mesh(mesh_type, attribs, vertex_data, index_data=None)[source]
create_square_mesh(mesh_type, split=0, texture_to_model=(array([[2., 0., -1.], [0., 2., -1.], [0., 0., 1.]]), array([[0.5, 0., 0.5], [0., 0.5, 0.5], [0., 0., 1.]])))[source]
gl()[source]
staticMetaObject = PySide6.QtCore.QMetaObject("GLProgram" inherits "QOpenGLShaderProgram": )
class insarviz.misc.GLProgram.GLUniform(name, value)[source]

Bases: object

bind(program)[source]
release()[source]
insarviz.misc.GLProgram.example()[source]
insarviz.misc.GLProgram.splitTriangle(n, points, i0, i1, i2)[source]

Split a triangle in 2^n, by splitting its longest side, and creating two smaller triangles, then recursively splitting each of those 2^(n-1) times.

The ‘points’ input is an array of points. i0, i1 and i2 are indices into that array, describing a triangle whose longest side joins i0 and i2.

The functions will store new points into that array destructively, and return the indices of all newly-created triangles.