def getRotateMatrixTetragrid(prefix, xmlElement):
 rotateMatrix = Matrix()
 zAngle = getRemovedFloatByKeys(['axisclockwisez', 'observerclockwisez', 'z'], prefix, xmlElement)
 zAngle -= getRemovedFloatByKeys(['axiscounterclockwisez', 'observercounterclockwisez'], prefix, xmlElement)
 if (zAngle != 0.0):
  rotateMatrix.matrixTetragrid = rotateMatrix.getOtherTimesSelf(getDiagonalSwitchedTetragrid((- zAngle), [0, 1])).matrixTetragrid
 xAngle = getRemovedFloatByKeys(['axisclockwisex', 'observerclockwisex', 'x'], prefix, xmlElement)
 xAngle -= getRemovedFloatByKeys(['axiscounterclockwisex', 'observercounterclockwisex'], prefix, xmlElement)
 if (xAngle != 0.0):
  rotateMatrix.matrixTetragrid = rotateMatrix.getOtherTimesSelf(getDiagonalSwitchedTetragrid((- xAngle), [1, 2])).matrixTetragrid
 yAngle = getRemovedFloatByKeys(['axiscounterclockwisey', 'observerclockwisey', 'y'], prefix, xmlElement)
 yAngle -= getRemovedFloatByKeys(['axisclockwisey', 'observercounterclockwisey'], prefix, xmlElement)
 if (yAngle != 0.0):
  rotateMatrix.matrixTetragrid = rotateMatrix.getOtherTimesSelf(getDiagonalSwitchedTetragrid(yAngle, [0, 2])).matrixTetragrid
 return rotateMatrix.matrixTetragrid

def getRotateMatrixTetragrid ( prefix , xmlElement ) : rotateMatrix = Matrix ( ) zAngle = getRemovedFloatByKeys ( [ 'axisclockwisez' , 'observerclockwisez' , 'z' ] , prefix , xmlElement ) zAngle -= getRemovedFloatByKeys ( [ 'axiscounterclockwisez' , 'observercounterclockwisez' ] , prefix , xmlElement ) if ( zAngle != 0.0 ) : rotateMatrix . matrixTetragrid = rotateMatrix . getOtherTimesSelf ( getDiagonalSwitchedTetragrid ( ( - zAngle ) , [ 0 , 1 ] ) ) . matrixTetragrid xAngle = getRemovedFloatByKeys ( [ 'axisclockwisex' , 'observerclockwisex' , 'x' ] , prefix , xmlElement ) xAngle -= getRemovedFloatByKeys ( [ 'axiscounterclockwisex' , 'observercounterclockwisex' ] , prefix , xmlElement ) if ( xAngle != 0.0 ) : rotateMatrix . matrixTetragrid = rotateMatrix . getOtherTimesSelf ( getDiagonalSwitchedTetragrid ( ( - xAngle ) , [ 1 , 2 ] ) ) . matrixTetragrid yAngle = getRemovedFloatByKeys ( [ 'axiscounterclockwisey' , 'observerclockwisey' , 'y' ] , prefix , xmlElement ) yAngle -= getRemovedFloatByKeys ( [ 'axisclockwisey' , 'observercounterclockwisey' ] , prefix , xmlElement ) if ( yAngle != 0.0 ) : rotateMatrix . matrixTetragrid = rotateMatrix . getOtherTimesSelf ( getDiagonalSwitchedTetragrid ( yAngle , [ 0 , 2 ] ) ) . matrixTetragrid return rotateMatrix . matrixTetragrid
get rotate matrix tetragrid and delete the rotate attributes .