public void UpdateMatrix() { if (!_isMatrixDirty) { return; } //do NOT set _isMatrixDirty to false here because it is used in the redraw loop and will be set false then _matrix.SetScaleThenRotate(_x, _y, _scaleX, _scaleY, _rotation * -RXMath.DTOR); if (_container != null) { _concatenatedMatrix.ConcatAndCopyValues(_matrix, _container.concatenatedMatrix); } else { _concatenatedMatrix.CopyValues(_matrix); } if (_needsSpecialMatrices) { if (_stage != null) { _inverseConcatenatedMatrix.InvertAndCopyValues(_concatenatedMatrix); _screenConcatenatedMatrix.ConcatAndCopyValues(_concatenatedMatrix, _stage.screenConcatenatedMatrix); _screenInverseConcatenatedMatrix.InvertAndCopyValues(_screenConcatenatedMatrix); } } }
public void UpdateMatrix() { if (!_isMatrixDirty) { return; } _isMatrixDirty = false; _matrix.SetScaleThenRotate(_x, _y, _scaleX, _scaleY, _rotation * -RXMath.DTOR); if (_container != null) { _concatenatedMatrix.ConcatAndCopyValues(_matrix, _container.concatenatedMatrix); } else { _concatenatedMatrix.CopyValues(_matrix); } if (_needsSpecialMatrices) { _inverseConcatenatedMatrix.InvertAndCopyValues(_concatenatedMatrix); _screenConcatenatedMatrix.ConcatAndCopyValues(_concatenatedMatrix, _stage.screenConcatenatedMatrix); _screenInverseConcatenatedMatrix.InvertAndCopyValues(_screenConcatenatedMatrix); } }
public void UpdateMatrix() { if (!_isMatrixDirty) { return; } //do NOT set _isMatrixDirty to false here because it is used in the redraw loop and will be set false then if (!_didSetMatrix) { _matrix.SetScaleThenRotate(_x, _y, _scaleX, _scaleY, _rotation * -0.01745329f); //0.01745329 is RXMath.DTOR } if (_container != null) { _concatenatedMatrix.ConcatAndCopyValues(_matrix, _container.concatenatedMatrix); } else { _concatenatedMatrix.CopyValues(_matrix); } if (_needsSpecialMatrices) { _inverseConcatenatedMatrix.InvertAndCopyValues(_concatenatedMatrix); if (_isOnStage) { _screenConcatenatedMatrix.ConcatAndCopyValues(_concatenatedMatrix, _stage.screenConcatenatedMatrix); } else { _screenConcatenatedMatrix.CopyValues(_concatenatedMatrix); //if it's not on the stage, just use its normal matrix } _screenInverseConcatenatedMatrix.InvertAndCopyValues(_screenConcatenatedMatrix); } }
virtual protected void UpdateDepthMatrixAlpha(bool shouldForceDirty, bool shouldUpdateDepth) { if (shouldUpdateDepth) { _depth = _stage.nextNodeDepth++; } if (_isMatrixDirty || shouldForceDirty) { _isMatrixDirty = false; _matrix.SetScaleThenRotate(_x, _y, _scaleX, _scaleY, _rotation * -RXMath.DTOR); if (_container != null) { _concatenatedMatrix.ConcatAndCopyValues(_matrix, _container.concatenatedMatrix); } else { _concatenatedMatrix.CopyValues(_matrix); } if (_needsInverseConcatenatedMatrix) { _inverseConcatenatedMatrix.InvertAndCopyValues(_concatenatedMatrix); } } if (_isAlphaDirty || shouldForceDirty) { _isAlphaDirty = false; if (_container != null) { _concatenatedAlpha = _container.concatenatedAlpha * _alpha * _visibleAlpha; } else { _concatenatedAlpha = _alpha * _visibleAlpha; } } }
public void SetMatrix(FMatrix matrix) { _matrix.CopyValues(matrix); _didSetMatrix = true; _isMatrixDirty = true; }