insarviz.misc.GLProgram module
- class insarviz.misc.GLProgram.GLProgram(shaders)[source]
Bases:
QOpenGLShaderProgram- 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]
- staticMetaObject = PySide6.QtCore.QMetaObject("GLProgram" inherits "QOpenGLShaderProgram": )
- 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.