public override void Update() { base.Update(); // Dividers DrawLine(new Vector2(0, HALF_H), new Vector2(0, -HALF_H), Color.White); DrawLine(new Vector2(-HALF_W, 0), new Vector2(HALF_W, 0), Color.White); // Goal markers DrawCircle(goal, 10, 10, Color.Green); DrawCircle(goal + new Vector2(HALF_W, 0), 10, 10, Color.Green); DrawCircle(goal + new Vector2(0, -HALF_H), 10, 10, Color.Green); DrawCircle(goal + new Vector2(HALF_W, -HALF_H), 10, 10, Color.Green); // Solution Spaces DrawCircle(hingeJT.DefaultPosition, hingeJT.SolutionSpaceRadius(), 30, Color.DarkRed); DrawCircle(hingeJI.DefaultPosition, hingeJI.SolutionSpaceRadius(), 30, Color.DarkRed); DrawCircle(hingeDLS.DefaultPosition, hingeDLS.SolutionSpaceRadius(), 30, Color.DarkRed); DrawCircle(hingeCCD.DefaultPosition, hingeCCD.SolutionSpaceRadius(), 30, Color.DarkRed); // Joints Vertices.AddRange(hingeJT.GetVertices()); Vertices.AddRange(hingeJI.GetVertices()); Vertices.AddRange(hingeDLS.GetVertices()); Vertices.AddRange(hingeCCD.GetVertices()); }
public override void Update() { base.Update(); DrawCircle(goal, 10, 10, Color.Green); DrawCircle(Vector2.Zero, baseJoint.SolutionSpaceRadius(), 100, Color.DarkRed); Vertices.AddRange(baseJoint.GetVertices()); }
public override void Update() { base.Update(); // Goal Marker DrawCircle(goal, 5, 5, Color.Green); // Solution Spaces DrawCircle(leftJoint.DefaultPosition, leftJoint.SolutionSpaceRadius(), 30, new Color(50, 0, 0)); DrawCircle(rightJoint.DefaultPosition, rightJoint.SolutionSpaceRadius(), 30, new Color(50, 0, 0)); // Joints Vertices.AddRange(leftJoint.GetVertices()); Vertices.AddRange(rightJoint.GetVertices()); }
public override void Update() { vertices.Clear(); vertices.AddRange(baseJoint.GetVertices()); vertices.AddRange(GetCircle(goal, 5, 5, Color.Green)); vertices.AddRange(GetCircle(Vector2.Zero, baseJoint.SolutionSpaceRadius(), 100, Color.DarkRed)); UpdateEffect(); if (updateFocusJoint) { jointAngleText.Text = "Current Joint Angle: " + focusJoint.Angle; jointAngleText.AutoAdjustWidth(); vertices.AddRange(GetCircle(focusJoint.GlobalPosition, 10, 10, Color.Purple)); } goalText.Text = "Goal Position: " + goal.X + ", " + goal.Y; goalText.AutoAdjustWidth(); base.Update(); }