/// <inheritdoc/>
        public override void ComputeMatrix(bool recursive, out Matrix matrix)
        {
            // Updated? (rare slow path)
            if (sheet != parentModelComponent.Sheet)
            {
                for (var index = 0; index < parentModelComponent.Nodes.Count; index++)
                {
                    var node = parentModelComponent.Nodes[index];
                    if (node.BaseNode.Name != nodeName)
                    {
                        continue;
                    }
                    nodeIndex = index;
                    break;
                }

                sheet = parentModelComponent.Sheet;
            }

            var nodes = parentModelComponent.Nodes;

            if (nodeIndex >= nodes.Count)
            {
                // Out of bound: fallback to TransformComponent
                matrix = parentModelComponent.Entity.Transform.WorldMatrix;
                return;
            }

            // Compute using ModelTransform
            Matrix.Multiply(ref nodes[nodeIndex].ModelTransform, ref parentModelComponent.Entity.Transform.WorldMatrix, out matrix);
        }
        public SpriteStudioNodeTransformLink(SpriteStudioComponent parentModelComponent, string nodeName)
        {
            this.parentModelComponent = parentModelComponent;
            this.nodeName             = nodeName;
            sheet = parentModelComponent.Sheet;

            for (var index = 0; index < parentModelComponent.Nodes.Count; index++)
            {
                var node = parentModelComponent.Nodes[index];
                if (node.BaseNode.Name == nodeName)
                {
                    nodeIndex = index;
                    break;
                }
            }
        }