/// <summary>Recalculates the matrices if this transformation has changed.</summary>
        public override Matrix4x4 CalculateMatrix(RenderableData context)
        {
            Matrix4x4 matrix = Matrix4x4.identity;

            matrix[14] = context.ScaleToWorldX(this[0].GetDecimal(context, ValueAxis.Z));

            return(matrix);
        }
Exemple #2
0
        public override Matrix4x4 CalculateMatrix(RenderableData context)
        {
            Matrix4x4 matrix = Matrix4x4.identity;

            int count = Count;

            matrix[12] = context.ScaleToWorldX(-this[0].GetDecimal(context, ValueAxis.X));

            if (count >= 2)
            {
                matrix[13] = context.ScaleToWorldY(this[1].GetDecimal(context, ValueAxis.Y));
            }

            if (count >= 3)
            {
                matrix[14] = context.ScaleToWorldX(this[2].GetDecimal(context, ValueAxis.Z));
            }

            return(matrix);
        }
Exemple #3
0
        public override Matrix4x4 CalculateMatrix(RenderableData context)
        {
            int count = Count;

            if (count <= 6)
            {
                Matrix[12] = context.ScaleToWorldX(-Get(4, 0f));               // Trans X
                Matrix[13] = context.ScaleToWorldY(Get(5, 0f));                // Trans Y

                return(Matrix);
            }
            else if (count == 16)
            {
                Matrix[12] = context.ScaleToWorldX(-Get(12, 0f));               // Trans X
                Matrix[13] = context.ScaleToWorldY(Get(13, 0f));                // Trans Y
                Matrix[14] = context.ScaleToWorldX(Get(14, 0f));                // Trans Z
            }

            return(Matrix);
        }