// Helper to keep track of the path being looked at every iteration private static void trackAnimationFrame(List <AnimationFrame> frames, CytoscapeNode current) { AStarAnimationFrame frame = new AStarAnimationFrame(); frame.frame = new List <AStarAnimationNode>(); AStarAnimationNode tempNode; foreach (CytoscapeNode node in current.path) { tempNode = new AStarAnimationNode(node.id); frame.frame.Add(tempNode); } frames.Add(frame); }
// For debug purposes private static Animation testAnim(int startID, int goalID) { Animation results = new Animation(); results.frames = new List <AnimationFrame>(); AStarAnimationFrame firstFrame = new AStarAnimationFrame(); List <AStarAnimationNode> firstFrameContents = new List <AStarAnimationNode>(); AStarAnimationNode start = new AStarAnimationNode(startID); firstFrameContents.Add(start); firstFrame.frame = firstFrameContents; results.frames.Add(firstFrame); AStarAnimationFrame nextFrame = new AStarAnimationFrame(); List <AStarAnimationNode> nextFrameContents = new List <AStarAnimationNode>(); AStarAnimationNode goal = new AStarAnimationNode(goalID); nextFrameContents.Add(goal); nextFrame.frame = nextFrameContents; results.frames.Add(nextFrame); return(results); }