Exemplo n.º 1
0
 public ClipPatternCommand(DGPlayNode dgpn,
                           string newValue, bool extendable)
     : base(dgpn, "ClipPattern", newValue, extendable)
 {
     this.mLabel = kLabelPrefix + "Base Clip Pattern";
 }
Exemplo n.º 2
0
 public TrackMaskKeyCommand(DGPlayNode dgpn,
                            RK newValue, bool extendable)
     : base(dgpn, "TrackMaskKey", newValue, extendable)
 {
     this.mLabel = kLabelPrefix + "Track Mask Key";
 }
Exemplo n.º 3
0
 public AdditiveClipKeyCommand(DGPlayNode dgpn,
                               RK newValue, bool extendable)
     : base(dgpn, "AdditiveClipKey", newValue, extendable)
 {
     this.mLabel = kLabelPrefix + "Additive Clip Key";
 }
Exemplo n.º 4
0
 public PlayNodePropertyCommand(DGPlayNode dgpn,
                                string property, P newValue, bool extendable)
     : base(dgpn, dgpn.mPlayNode,
            property, newValue, extendable)
 {
 }
Exemplo n.º 5
0
        private DGNode InitDGN(DGNode src, DecisionGraphNode dgn)
        {
            int    i;
            DGNode dst = null;

            for (i = this.mDGraph.NodeCount - 1; i >= 0; i--)
            {
                dst = this.mDGraph.NodeAt(i);
                if (dst.DGN == dgn)
                {
                    break;
                }
            }
            if (i < 0)
            {
                int                 j;
                DGEdge              edge;
                AnchorPoint         ap;
                DecisionGraphNode[] dgns;
                DGMulticastNode     dgmcn = null;
                switch (dgn.ChunkType)
                {
                case NextStateNode.ResourceType:
                    NextStateNode nsn = dgn as NextStateNode;
                    dst = new DGSnSnNode(nsn, this);
                    this.mDGraph.AddNode(dst);
                    dst.SetParent(this);
                    break;

                case RandomNode.ResourceType:
                    RandomNode rand = dgn as RandomNode;
                    DGRandNode dgrn = new DGRandNode(rand, this);
                    this.mDGraph.AddNode(dgrn);
                    dgrn.SetParent(this);
                    List <RandomNode.Slice> slices = rand.Slices;
                    if (slices.Count > 0)
                    {
                        for (i = 0; i < slices.Count; i++)
                        {
                            ap   = dgrn.GetSliceAnchor(i);
                            dgns = slices[i].Targets.ToArray();
                            for (j = 0; j < dgns.Length; j++)
                            {
                                dst  = this.InitDGN(dgrn, dgns[j]);
                                edge = new DGEdge(dgrn, dst, false);
                                ap.Edges.Add(edge);
                                dst.EntryAnchor.Edges.Add(edge);
                                this.mDGraph.AddEdge(edge);
                                edge.SetParent(this);
                            }
                        }
                    }
                    dst = dgrn;
                    break;

                case SelectOnDestinationNode.ResourceType:
                    SelectOnDestinationNode sodn
                        = dgn as SelectOnDestinationNode;
                    DGSoDnNode dgsodn
                        = new DGSoDnNode(sodn, this);
                    this.mDGraph.AddNode(dgsodn);
                    dgsodn.SetParent(this);
                    if (sodn.CaseCount > 0)
                    {
                        SelectOnDestinationNode.Case[] cases = sodn.Cases;
                        for (i = 0; i < cases.Length; i++)
                        {
                            ap   = dgsodn.GetCaseAnchorAt(i);
                            dgns = cases[i].Targets;
                            for (j = 0; j < dgns.Length; j++)
                            {
                                dst  = this.InitDGN(dgsodn, dgns[j]);
                                edge = new DGEdge(dgsodn, dst, false);
                                ap.Edges.Add(edge);
                                dst.EntryAnchor.Edges.Add(edge);
                                this.mDGraph.AddEdge(edge);
                                edge.SetParent(this);
                            }
                        }
                    }
                    dst = dgsodn;
                    break;

                case SelectOnParameterNode.ResourceType:
                    SelectOnParameterNode sopn
                        = dgn as SelectOnParameterNode;
                    DGSoPnNode dgsopn
                        = new DGSoPnNode(sopn, this);
                    this.mDGraph.AddNode(dgsopn);
                    dgsopn.SetParent(this);
                    if (sopn.CaseCount > 0)
                    {
                        SelectOnParameterNode.Case[] cases = sopn.Cases;
                        for (i = 0; i < cases.Length; i++)
                        {
                            ap   = dgsopn.GetCaseAnchorAt(i);
                            dgns = cases[i].Targets;
                            for (j = 0; j < dgns.Length; j++)
                            {
                                dst  = this.InitDGN(dgsopn, dgns[j]);
                                edge = new DGEdge(dgsopn, dst, false);
                                ap.Edges.Add(edge);
                                dst.EntryAnchor.Edges.Add(edge);
                                this.mDGraph.AddEdge(edge);
                                edge.SetParent(this);
                            }
                        }
                    }
                    dst = dgsopn;
                    break;

                case CreatePropNode.ResourceType:
                    CreatePropNode cpn   = dgn as CreatePropNode;
                    DGPropNode     dgcpn = new DGPropNode(cpn, this);
                    this.mDGraph.AddNode(dgcpn);
                    dgcpn.SetParent(this);
                    dgmcn = dgcpn;
                    break;

                case ActorOperationNode.ResourceType:
                    ActorOperationNode aon   = dgn as ActorOperationNode;
                    DGAcOpNode         dgaon = new DGAcOpNode(aon, this);
                    this.mDGraph.AddNode(dgaon);
                    dgaon.SetParent(this);
                    dgmcn = dgaon;
                    break;

                case StopAnimationNode.ResourceType:
                    StopAnimationNode san   = dgn as StopAnimationNode;
                    DGStopNode        dgsan = new DGStopNode(san, this);
                    this.mDGraph.AddNode(dgsan);
                    dgsan.SetParent(this);
                    dgmcn = dgsan;
                    break;

                case PlayAnimationNode.ResourceType:
                    PlayAnimationNode pan   = dgn as PlayAnimationNode;
                    DGPlayNode        dgpan = new DGPlayNode(pan, this);
                    this.mDGraph.AddNode(dgpan);
                    dgpan.SetParent(this);
                    dgmcn = dgpan;
                    break;
                }
                if (dgmcn != null)
                {
                    MulticastDecisionGraphNode mcn
                        = dgn as MulticastDecisionGraphNode;
                    if (mcn.TargetCount > 0)
                    {
                        ap   = dgmcn.TargetAnchor;
                        dgns = mcn.Targets;
                        for (i = 0; i < dgns.Length; i++)
                        {
                            dst  = this.InitDGN(dgmcn, dgns[i]);
                            edge = new DGEdge(dgmcn, dst, false);
                            ap.Edges.Add(edge);
                            dst.EntryAnchor.Edges.Add(edge);
                            this.mDGraph.AddEdge(edge);
                            edge.SetParent(this);
                        }
                    }
                    dst = dgmcn;
                }
            }
            return(dst);
        }
Exemplo n.º 6
0
 public AdditiveClipPatternCommand(DGPlayNode dgpn, string newValue)
     : base(dgpn, "AdditiveClipPattern", newValue)
 {
     this.mLabel = kLabelPrefix + "Additive Clip Pattern";
 }
Exemplo n.º 7
0
 public ClipKeyCommand(DGPlayNode dgpn, RK newValue)
     : base(dgpn, "ClipKey", newValue)
 {
     this.mLabel = kLabelPrefix + "Base Clip Key";
 }
Exemplo n.º 8
0
 public PlayNodePropertyCommand(DGPlayNode dgpn, string property, P newValue)
     : base(dgpn, property, newValue, false)
 {
 }