Exemple #1
0
        public TextureFrameState(SRTAnimationFrame frame, TexMatrixMode matrixMode, bool indirect)
        {
            _scale      = frame.Scale;
            _rotate     = frame.Rotation;
            _translate  = frame.Translation;
            _matrixMode = matrixMode;
            _flags      = 0;
            _indirect   = indirect;

            CalcTransforms();
        }
Exemple #2
0
        public TextureFrameState(Vector2 scale, float rotation, Vector2 translation, TexMatrixMode matrixMode, bool indirect)
        {
            _scale      = scale;
            _rotate     = rotation;
            _translate  = translation;
            _matrixMode = matrixMode;
            _flags      = 0;
            _indirect   = indirect;

            CalcTransforms();
        }
Exemple #3
0
        internal void ApplySRT0Texture(SRT0TextureNode node, float index = 0, TexMatrixMode matrixMode = TexMatrixMode.MatrixMaya)
        {
            _frameState = _bindState;

            if (node != null && index >= 1)
            {
                fixed(TextureFrameState *v = &_frameState)
                {
                    float *f = (float *)v;

                    for (int i = 0; i < 5; i++)
                    {
                        if (node.Keyframes[i]._keyCount > 0)
                        {
                            f[i] = node.GetFrameValue(i, index - 1);
                        }
                    }
                    _frameState.MatrixMode = matrixMode;
                    _frameState.CalcTransforms();
                }
            }
        }