public void DrawNodePaths(Color color) { GLUtil.SetColor(color); foreach (NavNode startNode in _allNodes) { foreach (NavNode endNode in startNode.Links) { PrimitiveDrawer.DrawLine2d(startNode.Position, endNode.Position); } } }
public void Render() { Gl.glClearColor(1, 1, 1, 0); Gl.glClear(Gl.GL_COLOR_BUFFER_BIT); Point mousePosition = _input.Mouse.Position; PrimitiveDrawer.DrawCrosshair(mousePosition.X, mousePosition.Y); _navMesh.Render(); _navMesh.DrawNodePaths(new Color(0, 1, 0, 1)); _plotter.Render(); }
public void Render() { if (_polygon == null) { return; } PrimitiveDrawer.DrawPolygon(_polygon, new Engine.Color(1, 0, 0, 1)); PrimitiveDrawer.DrawFilledPolygon(_polygon, new Engine.Color(1, 0, 0, 0.25f)); DrawTriangles(new Color(1, 1, 0, 1)); //DrawNodePaths(new Color(0, 1, 0, 1)); }
public void Render() { foreach (PolyVertex v in _vertexList) { PrimitiveDrawer.DrawSquare(v.Point.X, v.Point.Y, v.Tween.Value(), new Color(1, 0, 0, 1)); } PrimitiveDrawer.DrawDashedCircle(_hightLightCircle, new Color(1, 0, 0, 1)); Gl.glBegin(Gl.GL_LINE_STRIP); { foreach (PolyVertex v in _vertexList) { GLUtil.DrawPointVertex(v.Point); } } Gl.glEnd(); }
public void Render() { Gl.glClearColor(1, 1, 1, 0); Gl.glClear(Gl.GL_COLOR_BUFFER_BIT); Point mousePosition = _input.Mouse.Position; PrimitiveDrawer.DrawCrosshair(mousePosition.X, mousePosition.Y); foreach (Polygon polygon in _polygons) { PrimitiveDrawer.DrawPolygon(polygon, new Color(1, 0, 0, 1)); if (polygon.Intersects(mousePosition.X, mousePosition.Y)) { PrimitiveDrawer.DrawFilledPolygon(polygon, new Color(1, 1, 0, 0.25f)); } else { PrimitiveDrawer.DrawFilledPolygon(polygon, new Color(1, 0, 0, 0.25f)); } } _plotter.Render(); }