Beispiel #1
0
    public FigureSystemOutputs UpdateFrame(DeviceContext context, FigureSystemOutputs parentOutputs, ChannelInputs inputs)
    {
        var channelOutputs = definition.ChannelSystem.Evaluate(parentOutputs?.ChannelOutputs, inputs);

        StagedSkinningTransform[] boneTransforms;
        if (parentOutputs == null)
        {
            boneTransforms = definition.BoneSystem.GetBoneTransforms(channelOutputs);
        }
        else
        {
            boneTransforms = (StagedSkinningTransform[])parentOutputs.BoneTransforms.Clone();
            BoneSystem.PrependChildToParentBindPoseTransforms(definition.ChildToParentBindPoseTransforms, boneTransforms);
        }

        occluder.SetValues(context, channelOutputs);
        shaper.SetValues(context, channelOutputs, boneTransforms);

        return(new FigureSystemOutputs(channelOutputs, boneTransforms));
    }
Beispiel #2
0
    public FigureSystemOutputs UpdateFrame(DeviceContext context, FrameUpdateParameters updateParameters, FigureSystemOutputs parentOutputs)
    {
        if (!model.IsVisible)
        {
            return(null);
        }

        var previousFrameResults = controlVertexProvider.GetPreviousFrameResults(context);

        ChannelInputs shapeInputs = new ChannelInputs(model.Shape.ChannelInputs);

        foreach (var child in children)
        {
            if (child.Model.IsVisible)
            {
                child.Model.Shape.ApplyOverrides(shapeInputs);
            }
        }

        ChannelInputs inputs = Animator != null?Animator.GetFrameInputs(shapeInputs, updateParameters, previousFrameResults) : shapeInputs;

        return(controlVertexProvider.UpdateFrame(context, parentOutputs, inputs));
    }