'Sets current projection, model, view and viewport transforms. ``model`` parameter
is most often changed. Passing None as a parameter value keeps the internal value
unmodified.
:param model: Model transform (usually translation, rotation, scale or a combination of these).
:type QMatrix4x4
:param view: View transform (camera transformation).
:type QMatrix4x4
:param projection: Projection transform (e.g. ortho, perspective).
:type QMatrix4x4
:param viewport: Viewport transform. A list of 4 ints specifying viewport rectangle (lower left corner + width and height).
:type list of 4 int'

def set_transform(self, model, view=None, projection=None, viewport=None):

    if (model != None):
        self._model = model
    if (view != None):
        self._view = view
    if (projection != None):
        self._projection = projection
    if viewport:
        glViewport(*viewport)
    self._shader.bind()
    self._shader.setUniformValue('projection', self._projection)
    self._shader.setUniformValue('model', self._model)
    self._shader.setUniformValue('view', self._view)
    self._shader.release()
