public static void RelativeMove(DrawingGroup group, Vector3 origin, CanvasData canvasData = null)
 {
     var originPoint = new PointMorph(origin, CanvasData.LastCanvas);
     var transform = new TranslateTransform(originPoint.Point.X - CanvasData.LastCanvas.Center.X, originPoint.Point.Y - CanvasData.LastCanvas.Center.Y);
     group.Transform = transform;
 }
 public static Point ToCanvasPoint(this Vector3 positionVector, CanvasData canvasData = null)
 {
     return new PointMorph(positionVector, canvasData ?? CanvasData.LastCanvas).Point;
 }
 public static Point ToCanvasPoint(this Point point, CanvasData canvasData = null)
 {
     return new PointMorph(point.ToVector3(), canvasData ?? CanvasData.LastCanvas).Point;
 }
Beispiel #4
0
        private void DrawCurrentPath(DrawingContext dc, CanvasData canvas)
        {
            try
            {
                var currentPath = Navigator.GetNavigationProviderAs<DefaultNavigationProvider>().CurrentPath;
                //var currentPath = NavigationCoroutine.NavigationProvider.CurrentPath;

                for (int i = 1; i < currentPath.Count; i++)
                {
                    var to = currentPath[i];
                    var from = currentPath[i - 1];

                    dc.DrawLine(RadarResources.CurrentPathPen, from.ToCanvasPoint(), to.ToCanvasPoint());
                }
                //if (currentPath.Count > 0)
                //{
                //    var newPath = NavigationGrid.Instance.GeneratePath(currentPath.First(),
                //        currentPath.Last());

                //    for (int i = 1; i < newPath.Count; i++)
                //    {
                //        var to = newPath[i];
                //        var from = newPath[i - 1];
                //        dc.DrawLine(RadarResources.NewPathPen, from.ToCanvasPoint(),
                //            to.ToCanvasPoint());
                //    }
                //}
            }
            catch (Exception ex)
            {
                Logger.Debug("Exception in RadarUI.DrawCurrentpath(). {0} {1} {2}", ex.Message, ex.InnerException, ex);
            }
        }
Beispiel #5
0
        private static void DrawActorLabel(DrawingContext dc, CanvasData canvas, RadarObject radarObject, Brush brush)
        {
            var text = radarObject.CachedActorName;

            if (text == null)
                return;

            const int textSize = 12;
            const int charLimit = 20;

            if (text.Length > charLimit)
                text = text.Substring(0, charLimit);

            // FormattedText is very slow, so instead create text manually with glyphs
            var glyphRun = DrawingUtilities.CreateGlyphRun(text, textSize, radarObject.Point);
            dc.DrawGlyphRun(brush, glyphRun);
        }
Beispiel #6
0
        //private void DrawNavNode(DrawingContext dc, CanvasData canvas, GridNode node)
        //{
        //    SolidColorBrush nodeBrush;
        //    if (node.Flags.HasFlag(NavCellFlags.RoundedCorner0) || node.Flags.HasFlag(NavCellFlags.RoundedCorner1) || node.Flags.HasFlag(NavCellFlags.RoundedCorner2) || node.Flags.HasFlag(NavCellFlags.RoundedCorner3))
        //    {
        //        nodeBrush = Brushes.SaddleBrown;
        //    }
        //    else if (node.Flags.HasFlag(NavCellFlags.AllowWalk))
        //    {
        //        nodeBrush = Brushes.Green;
        //    }
        //    else if (node.Flags.HasFlag(NavCellFlags.AllowProjectile))
        //    {
        //        nodeBrush = Brushes.DarkGray;
        //    }
        //    else
        //    {
        //        nodeBrush = Brushes.Black;
        //    }

        //    dc.DrawEllipse(nodeBrush, RadarResources.GridPen, node.NavigableCenter.ToCanvasPoint(), GridSize, GridSize);
        //}

        //private void DrawNodesInRadius(DrawingContext dc, CanvasData canvas)
        //{
        //    try
        //    {
        //        var nearestNode = MainGrid.Instance.GetNearestNodeToPosition(AdvDia.MyPosition);
        //        if (nearestNode == null) return;
        //        var nodes = MainGrid.Instance.GetNeighbors(nearestNode, 5);
        //        foreach (var node in nodes)
        //        {
        //            DrawNavNode(dc, canvas, node);
        //        }

        //    }
        //    catch (Exception ex)
        //    {
        //        Logger.Debug("Exception in RadarUI.DrawNodesInRadius(). {0} {1} {2}", ex.Message, ex.InnerException, ex);
        //    }
        //}

        /// <summary>
        /// Draw a Scene
        /// </summary>
        private void DrawScenes(DrawingContext dc, CanvasData canvas)
        {
            try
            {
                if (Math.Abs(CenterActor.Point.X) < 0.01f && Math.Abs(CenterActor.Point.Y) < 0.01f)
                    return;

                var worldId = AdvDia.CurrentWorldDynamicId;
                foreach (var adventurerScene in ScenesStorage.CurrentWorldScenes.Where(s => s.DynamicWorldId == worldId).ToList())
                {
                    //var scene = adventurerScene.TrinityScene;

                    // Combine navcells into one drawing and store it; because they don't change relative to each other
                    // And because translating geometry for every navcell on every frame is waaaaay too slow.
                    if (Drawings.Relative.ContainsKey(adventurerScene.HashName)) continue;

                    var drawing = new DrawingGroup();

                    using (var groupdc = drawing.Open())
                    {
                        #region Terrain
                        if (adventurerScene.Cells != null)
                        {
                            var figures = new List<PathFigure>();
                            foreach (var navCell in adventurerScene.Cells.Where(nc => nc.IsWalkable))
                            {
                                var topLeft = new Vector3(navCell.MinX, navCell.MinY, 0);
                                var topRight = new Vector3(navCell.MaxX, navCell.MinY, 0);
                                var bottomLeft = new Vector3(navCell.MinX, navCell.MaxY, 0);
                                var bottomRight = new Vector3(navCell.MaxX, navCell.MaxY, 0);
                                var segments = new[]
                                               {
                                                   new LineSegment(topLeft.ToCanvasPoint(), true),
                                                   new LineSegment(topRight.ToCanvasPoint(), true),
                                                   new LineSegment(bottomRight.ToCanvasPoint(), true)
                                               };

                                figures.Add(new PathFigure(bottomLeft.ToCanvasPoint(), segments, true));
                            }
                            var geo = new PathGeometry(figures, FillRule.Nonzero, null);
                            geo.GetOutlinedPathGeometry();
                            groupdc.DrawGeometry(RadarResources.WalkableTerrain, null, geo);
                        }
                        #endregion

                        #region Scene Borders
                        var sceneTopLeft = new Vector3(adventurerScene.Min.X, adventurerScene.Min.Y, 0);
                        var sceneTopRight = new Vector3(adventurerScene.Max.X, adventurerScene.Min.Y, 0);
                        var sceneBottomLeft = new Vector3(adventurerScene.Min.X, adventurerScene.Max.Y, 0);
                        var sceneBottomRight = new Vector3(adventurerScene.Max.X, adventurerScene.Max.Y, 0);

                        groupdc.DrawGeometry(null, RadarResources.WalkableTerrainBorder, new LineGeometry(sceneTopLeft.ToCanvasPoint(), sceneTopRight.ToCanvasPoint()));
                        groupdc.DrawGeometry(null, RadarResources.WalkableTerrainBorder, new LineGeometry(sceneBottomLeft.ToCanvasPoint(), sceneBottomRight.ToCanvasPoint()));
                        groupdc.DrawGeometry(null, RadarResources.WalkableTerrainBorder, new LineGeometry(sceneTopLeft.ToCanvasPoint(), sceneBottomLeft.ToCanvasPoint()));
                        groupdc.DrawGeometry(null, RadarResources.WalkableTerrainBorder, new LineGeometry(sceneTopRight.ToCanvasPoint(), sceneBottomRight.ToCanvasPoint()));
                        #endregion

                        #region Scene Title
                        var textPoint = adventurerScene.Center.ToVector3().ToCanvasPoint();
                        var glyphRun = DrawingUtilities.CreateGlyphRun(adventurerScene.Name, 10, textPoint);
                        groupdc.DrawGlyphRun(Brushes.Wheat, glyphRun);
                        textPoint = adventurerScene.Center.ToVector3().ToCanvasPoint();
                        textPoint.Y = textPoint.Y + 20;
                        glyphRun = DrawingUtilities.CreateGlyphRun((adventurerScene.Max - adventurerScene.Min) + " " + (adventurerScene.HasChild ? "HasSubScene" : string.Empty) + " " + (adventurerScene.SubScene != null ? " (Loaded)" : string.Empty), 8, textPoint);
                        groupdc.DrawGlyphRun(Brushes.Wheat, glyphRun);
                        #endregion

                        #region Nodes
                        var sceneNodePen = new Pen { Brush = Brushes.Black, Thickness = 0.1f };
                        foreach (var node in adventurerScene.Nodes)
                        {
                            if (node.HasEnoughNavigableCells)
                            {
                                groupdc.DrawGeometry(null, sceneNodePen,
                                    new LineGeometry(node.TopLeft.ToVector3().ToCanvasPoint(),
                                        node.TopRight.ToVector3().ToCanvasPoint()));
                                groupdc.DrawGeometry(null, sceneNodePen,
                                    new LineGeometry(node.TopLeft.ToVector3().ToCanvasPoint(),
                                        node.BottomLeft.ToVector3().ToCanvasPoint()));
                                groupdc.DrawGeometry(null, sceneNodePen,
                                    new LineGeometry(node.BottomLeft.ToVector3().ToCanvasPoint(),
                                        node.BottomRight.ToVector3().ToCanvasPoint()));
                                groupdc.DrawGeometry(null, sceneNodePen,
                                    new LineGeometry(node.TopRight.ToVector3().ToCanvasPoint(),
                                        node.BottomRight.ToVector3().ToCanvasPoint()));

                                //var textPoint1 = node.Center.ToVector3().ToCanvasPoint();
                                ////                                var glyphRun1 = DrawingUtilities.CreateGlyphRun(string.Format("{2} {0} ({1:P0})", node.NavigableCellCount, node.FillPercentage, node.LevelAreaId), 8, textPoint1);
                                //var glyphRun1 = DrawingUtilities.CreateGlyphRun(node.LevelAreaId.ToString(), 8, textPoint1);
                                //groupdc.DrawGlyphRun(Brushes.Wheat, glyphRun1);
                            }
                            //foreach (var navPoint in node.Nodes.Where(n=>n.NodeFlags.HasFlag(NodeFlags.NearWall)))
                            //{
                            //    DrawNavNode(groupdc, canvas, navPoint);
                            //    //groupdc.DrawEllipse(Brushes.LightSlateGray, sceneNodePen, navPoint.Center.ToVector3().ToCanvasPoint(), (float)GridSize / 2, (float)GridSize / 2);
                            //}
                        }
                        #endregion




                    }

                    // Have to use SceneHash as key because scenes can appear multiple times with the same name
                    Drawings.Relative.TryAdd(adventurerScene.HashName, new RelativeDrawing
                    {
                        Drawing = drawing,
                        Origin = CenterActor.Morph,
                        Center = adventurerScene.Center.ToVector3(),
                        WorldId = adventurerScene.DynamicWorldId,
                        //Image = new DrawingImage(drawing),
                        //ImageRect = drawing.Bounds

                    });
                }

                foreach (var pair in Drawings.Relative)
                {
                    //if (pair.Value.WorldId != AdvDia.CurrentWorldDynamicId)
                    //    continue;

                    if (!pair.Value.Drawing.Bounds.IntersectsWith(CanvasData.ClipRegion.Rect))
                        continue;
                    dc.DrawDrawing(pair.Value.Drawing);

                    //if (!pair.Value.ImageRect.IntersectsWith(CanvasData.ClipRegion.Rect))
                    //    continue;
                    //dc.DrawImage(pair.Value.Image, pair.Value.ImageRect);
                }

            }
            catch (Exception ex)
            {
                Logger.Debug("Exception in RadarUI.DrawScenes(). {0} {1} {2}", ex.Message, ex.InnerException, ex);
            }
        }
Beispiel #7
0
        /// <summary>
        /// Draw a Scene
        /// </summary>
        //private void DrawScenes2(DrawingContext dc, CanvasData canvas)
        //{
        //    try
        //    {
        //        if (Math.Abs(CenterActor.Point.X) < 0.01f && Math.Abs(CenterActor.Point.Y) < 0.01f)
        //            return;

        //        var worldId = AdvDia.CurrentWorldDynamicId;
        //        foreach (var adventurerScene in GridProvider.CachedScenes.Values.Where(s => s.WorldId == worldId
        //        //&&
        //        //centerActorPosition.X >= s.Min.X && centerActorPosition.Y >= s.Min.Y &&
        //        //centerActorPosition.X <= s.Max.X && centerActorPosition.Y <= s.Max.Y
        //        ).ToList())
        //        {
        //            // Combine navcells into one drawing and store it; because they don't change relative to each other
        //            // And because translating geometry for every navcell on every frame is waaaaay too slow.
        //            if (Drawings.Relative.ContainsKey(adventurerScene.NameHash)) continue;

        //            var drawing = new DrawingGroup();

        //            using (var groupdc = drawing.Open())
        //            {
        //                #region Terrain
        //                if (adventurerScene.SceneDefinition != null && adventurerScene.SceneDefinition.NavCellDefinitions != null)
        //                {
        //                    var figures = new List<PathFigure>();
        //                    foreach (var navCell in adventurerScene.SceneDefinition.NavCellDefinitions.Where(nc => nc.Flags.HasFlag(NavCellFlags.AllowWalk)))
        //                    {
        //                        var topLeft = new Vector3(adventurerScene.Min.X + navCell.Min.X, adventurerScene.Min.Y + navCell.Min.Y, 0);
        //                        var topRight = new Vector3(adventurerScene.Min.X + navCell.Max.X, adventurerScene.Min.Y + navCell.Min.Y, 0);
        //                        var bottomLeft = new Vector3(adventurerScene.Min.X + navCell.Min.X, adventurerScene.Min.Y + navCell.Max.Y, 0);
        //                        var bottomRight = new Vector3(adventurerScene.Min.X + navCell.Max.X, adventurerScene.Min.Y + navCell.Max.Y, 0);
        //                        var segments = new[]
        //                                       {
        //                                           new LineSegment(topLeft.ToCanvasPoint(), true),
        //                                           new LineSegment(topRight.ToCanvasPoint(), true),
        //                                           new LineSegment(bottomRight.ToCanvasPoint(), true)
        //                                       };

        //                        figures.Add(new PathFigure(bottomLeft.ToCanvasPoint(), segments, true));
        //                    }
        //                    var geo = new PathGeometry(figures, FillRule.Nonzero, null);
        //                    geo.GetOutlinedPathGeometry();
        //                    groupdc.DrawGeometry(RadarResources.WalkableTerrain, null, geo);
        //                }
        //                #endregion

        //                #region Scene Borders
        //                var sceneTopLeft = new Vector3(adventurerScene.Min.X, adventurerScene.Min.Y, 0);
        //                var sceneTopRight = new Vector3(adventurerScene.Max.X, adventurerScene.Min.Y, 0);
        //                var sceneBottomLeft = new Vector3(adventurerScene.Min.X, adventurerScene.Max.Y, 0);
        //                var sceneBottomRight = new Vector3(adventurerScene.Max.X, adventurerScene.Max.Y, 0);

        //                groupdc.DrawGeometry(null, RadarResources.WalkableTerrainBorder, new LineGeometry(sceneTopLeft.ToCanvasPoint(), sceneTopRight.ToCanvasPoint()));
        //                groupdc.DrawGeometry(null, RadarResources.WalkableTerrainBorder, new LineGeometry(sceneBottomLeft.ToCanvasPoint(), sceneBottomRight.ToCanvasPoint()));
        //                groupdc.DrawGeometry(null, RadarResources.WalkableTerrainBorder, new LineGeometry(sceneTopLeft.ToCanvasPoint(), sceneBottomLeft.ToCanvasPoint()));
        //                groupdc.DrawGeometry(null, RadarResources.WalkableTerrainBorder, new LineGeometry(sceneTopRight.ToCanvasPoint(), sceneBottomRight.ToCanvasPoint()));
        //                #endregion

        //                #region Scene Title
        //                var textPoint = adventurerScene.Center.ToVector3().ToCanvasPoint();
        //                var glyphRun = DrawingUtilities.CreateGlyphRun(adventurerScene.Name, 10, textPoint);
        //                groupdc.DrawGlyphRun(Brushes.Wheat, glyphRun);
        //                textPoint = adventurerScene.Center.ToVector3().ToCanvasPoint();
        //                textPoint.Y = textPoint.Y + 20;
        //                glyphRun = DrawingUtilities.CreateGlyphRun((adventurerScene.Max - adventurerScene.Min).ToString(), 8, textPoint);
        //                groupdc.DrawGlyphRun(Brushes.Wheat, glyphRun);
        //                #endregion

        //                #region Nodes
        //                //var sceneNodePen = new Pen { Brush = Brushes.Black, Thickness = 0.1f };
        //                //foreach (var cell in adventurerScene.GridCells)
        //                //{
        //                //    //if (node.HasEnoughNavigableCells)
        //                //    //{
        //                //    //    groupdc.DrawGeometry(null, sceneNodePen,
        //                //    //        new LineGeometry(node.TopLeft.ToVector3().ToCanvasPoint(),
        //                //    //            node.TopRight.ToVector3().ToCanvasPoint()));
        //                //    //    groupdc.DrawGeometry(null, sceneNodePen,
        //                //    //        new LineGeometry(node.TopLeft.ToVector3().ToCanvasPoint(),
        //                //    //            node.BottomLeft.ToVector3().ToCanvasPoint()));
        //                //    //    groupdc.DrawGeometry(null, sceneNodePen,
        //                //    //        new LineGeometry(node.BottomLeft.ToVector3().ToCanvasPoint(),
        //                //    //            node.BottomRight.ToVector3().ToCanvasPoint()));
        //                //    //    groupdc.DrawGeometry(null, sceneNodePen,
        //                //    //        new LineGeometry(node.TopRight.ToVector3().ToCanvasPoint(),
        //                //    //            node.BottomRight.ToVector3().ToCanvasPoint()));

        //                //    //    //var textPoint1 = node.Center.ToVector3().ToCanvasPoint();
        //                //    //    ////                                var glyphRun1 = DrawingUtilities.CreateGlyphRun(string.Format("{2} {0} ({1:P0})", node.NavigableCellCount, node.FillPercentage, node.LevelAreaId), 8, textPoint1);
        //                //    //    //var glyphRun1 = DrawingUtilities.CreateGlyphRun(node.LevelAreaId.ToString(), 8, textPoint1);
        //                //    //    //groupdc.DrawGlyphRun(Brushes.Wheat, glyphRun1);
        //                //    //}
        //                //    //foreach (var navPoint in node.Nodes.Where(n=>n.NodeFlags.HasFlag(NodeFlags.NearWall)))
        //                //    //{
        //                //    DrawNavNode(groupdc, canvas, cell);
        //                //    //    //groupdc.DrawEllipse(Brushes.LightSlateGray, sceneNodePen, navPoint.Center.ToVector3().ToCanvasPoint(), (float)GridSize / 2, (float)GridSize / 2);
        //                //    //}
        //                //}
        //                #endregion




        //            }

        //            // Have to use SceneHash as key because scenes can appear multiple times with the same name
        //            Drawings.Relative.TryAdd(adventurerScene.NameHash, new RelativeDrawing
        //            {
        //                Drawing = drawing,
        //                Origin = CenterActor.Morph,
        //                Center = adventurerScene.Center.ToVector3(),
        //                WorldId = adventurerScene.WorldId,
        //                //Image = new DrawingImage(drawing),
        //                //ImageRect = drawing.Bounds

        //            });
        //        }

        //        foreach (var pair in Drawings.Relative)
        //        {
        //            //if (pair.Value.WorldId != AdvDia.CurrentWorldDynamicId)
        //            //    continue;

        //            if (!pair.Value.Drawing.Bounds.IntersectsWith(CanvasData.ClipRegion.Rect))
        //                continue;
        //            dc.DrawDrawing(pair.Value.Drawing);

        //            //if (!pair.Value.ImageRect.IntersectsWith(CanvasData.ClipRegion.Rect))
        //            //    continue;
        //            //dc.DrawImage(pair.Value.Image, pair.Value.ImageRect);
        //        }

        //    }
        //    catch (Exception ex)
        //    {
        //        Logger.Debug("Exception in RadarUI.DrawScenes(). {0} {1} {2}", ex.Message, ex.InnerException, ex);
        //    }
        //}


        private void DrawActor(DrawingContext dc, CanvasData canvas, RadarObject radarObject)
        {
            try
            {
                var res = RadarResources.GetActorResourceSet(radarObject);

                // Draw a dot in the center of the actor;
                dc.DrawEllipse(res.Brush, null, radarObject.Point, MarkerSize / 2, MarkerSize / 2);

                // Draw a circle representing the size of the actor
                res.Brush.Opacity = 0.25;
                var gridRadius = radarObject.CachedActorRadius * GridSize;

                var pen = RadarResources.LineOfSightLightPen;

                dc.DrawEllipse(Brushes.Red, new Pen(Brushes.Black, 0.1), radarObject.Point, gridRadius, gridRadius);
                dc.DrawEllipse(Brushes.Transparent, RadarResources.LineOfSightLightPen, radarObject.Point, 45 * GridSize, 45 * GridSize);

                DrawActorLabel(dc, canvas, radarObject, res.Brush);

            }
            catch (Exception ex)
            {
                Logger.Debug("Exception in RadarUI.DrawActor(). {0} {1} {2}", ex.Message, ex.InnerException, ex);
            }
        }
Beispiel #8
0
        private void DrawPointsOfInterest(DrawingContext dc, CanvasData canvas)
        {
            try
            {
                foreach (var marker in AdvDia.CurrentWorldMarkers.Where(m => m.Id >= 0 && m.Id < 200))
                {
                    dc.DrawEllipse(Brushes.Yellow, RadarResources.GridPen, marker.Position.ToCanvasPoint(), 5, 5);
                    var textPoint = marker.Position.ToCanvasPoint();
                    textPoint.Y = textPoint.Y + 32;
                    var glyphRun = DrawingUtilities.CreateGlyphRun(marker.NameHash.ToString(), 8, textPoint);
                    dc.DrawGlyphRun(Brushes.Yellow, glyphRun);

                    var toObjectivePen = new Pen(Brushes.Yellow, 0.2);
                    dc.DrawLine(toObjectivePen, canvas.Center, marker.Position.ToCanvasPoint());
                }

            }
            catch (Exception ex)
            {
                Logger.Debug("Exception in RadarUI.DrawPointsOfInterest(). {0} {1} {2}", ex.Message, ex.InnerException, ex);
            }
        }
Beispiel #9
0
        private void DrawGridNodes(DrawingContext dc, CanvasData canvas)
        {
            var curX = 0;
            var curY = 0;
            try
            {
                if (!BotEvents.IsBotRunning) return;
                for (var x = ExplorationGrid.Instance.MinX; x <= ExplorationGrid.Instance.MaxX; x++)
                {
                    for (var y = ExplorationGrid.Instance.MinY; y <= ExplorationGrid.Instance.MaxY; y++)
                    {
                        var node = ExplorationGrid.Instance.InnerGrid[x, y] as ExplorationNode;
                        if (node != null && node.HasEnoughNavigableCells)
                        {
                            Brush nodeBrush;
                            if (node.IsIgnored)
                            {
                                nodeBrush = Brushes.Black;
                            }
                            else if (node.IsVisited)
                            {
                                nodeBrush = Brushes.SpringGreen;
                            }
                            else if (node.IsCurrentDestination)
                            {
                                nodeBrush = Brushes.DeepSkyBlue;
                            }
                            else
                            {
                                nodeBrush = Brushes.DarkGray;
                            }

                            dc.DrawEllipse(nodeBrush, RadarResources.GridPen, node.NavigableCenter.ToCanvasPoint(), GridSize * 2, GridSize * 2);
                            //var textPoint = node.Center.ToVector3().ToCanvasPoint();
                            //var nodeTitle =
                            //    ((1/node.NavigableCenter.Distance(AdvDia.MyPosition))*node.UnvisitedWeight).ToString();
                            //var glyphRun = DrawingUtilities.CreateGlyphRun(nodeTitle, GridSize * 4, textPoint);
                            //dc.DrawGlyphRun(nodeBrush, glyphRun);
                        }

                    }
                }




            }
            catch (Exception ex)
            {
                Logger.Debug("Exception in RadarUI.DrawGridNodes(). {0} {1} {2}", ex.Message, curX, curY);
            }
        }
Beispiel #10
0
 /// <summary>
 /// PointMorph handles the translation of a Vector3 world space position into Canvas space.
 /// </summary>
 public PointMorph(Vector3 vectorPosition, CanvasData canvasData)
 {
     CanvasData = canvasData;
     Update(vectorPosition);
 }
Beispiel #11
0
 public PointMorph(CanvasData canvasData)
 {
     CanvasData = canvasData;
 }
Beispiel #12
0
 /// <summary>
 /// RadarObject wraps a TrinityObject to add a canvas plot location.
 /// </summary>
 public RadarObject(DiaObject obj, CanvasData canvasData)
 {
     Actor = obj;
     Morph.CanvasData = canvasData;
     Update();
 }
 public static Point ToCanvasPoint(this Point point, CanvasData canvasData = null)
 {
     return(new PointMorph(point.ToVector3(), canvasData ?? CanvasData.LastCanvas).Point);
 }
 public static Point ToCanvasPoint(this Vector3 positionVector, CanvasData canvasData = null)
 {
     return(new PointMorph(positionVector, canvasData ?? CanvasData.LastCanvas).Point);
 }