当前位置: 首页>>代码示例>>C#>>正文


C# Utilities.WorldTransform类代码示例

本文整理汇总了C#中RndfEditor.Display.Utilities.WorldTransform的典型用法代码示例。如果您正苦于以下问题:C# WorldTransform类的具体用法?C# WorldTransform怎么用?C# WorldTransform使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


WorldTransform类属于RndfEditor.Display.Utilities命名空间,在下文中一共展示了WorldTransform类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PointAnalysisTool

 public PointAnalysisTool(PlanarProjection projection, bool snap, ArbiterRoadNetwork arn, WorldTransform wt)
 {
     this.projection = projection;
     this.snapToWaypoints = snap;
     this.roadNetwork = arn;
     this.wt = wt;
 }
开发者ID:anand-ajmera,项目名称:cornell-urban-challenge,代码行数:7,代码来源:PointAnalysisTool.cs

示例2: Render

        public void Render(System.Drawing.Graphics g, WorldTransform t)
        {
            Color c = DrawingUtility.ColorArbiterPerimeterWaypoint;

            if (selected == SelectionType.SingleSelected)
                c = DrawingUtility.ColorArbiterPerimeterWaypointSelected;
            else if (this.IsExit)
                c = Color.Red;
            else if (this.IsEntry)
                c = Color.Blue;

            if (DrawingUtility.DisplayArbiterPerimeterWaypointId)
            {
                DrawingUtility.DrawControlPoint(this.position, c, this.WaypointId.ToString(),
                    ContentAlignment.BottomCenter, ControlPointStyle.SmallBox, g, t);
            }
            else
            {
                DrawingUtility.DrawControlPoint(this.position, c, null,
                    ContentAlignment.BottomCenter, ControlPointStyle.SmallBox, g, t);
            }
        }
开发者ID:anand-ajmera,项目名称:cornell-urban-challenge,代码行数:22,代码来源:ArbiterPerimeterWaypoint.cs

示例3: InMove

 public void InMove(UrbanChallenge.Common.Coordinates orig, UrbanChallenge.Common.Coordinates offset, WorldTransform t)
 {
     throw new Exception("The method or operation is not implemented.");
 }
开发者ID:anand-ajmera,项目名称:cornell-urban-challenge,代码行数:4,代码来源:ArbiterUserPartition.cs

示例4: GetBoundingBox

 public System.Drawing.RectangleF GetBoundingBox(WorldTransform wt)
 {
     throw new Exception("The method or operation is not implemented.");
 }
开发者ID:anand-ajmera,项目名称:cornell-urban-challenge,代码行数:4,代码来源:ArbiterUserPartition.cs

示例5: InMove

 public void InMove(UrbanChallenge.Common.Coordinates orig, UrbanChallenge.Common.Coordinates offset, WorldTransform t)
 {
     this.position = orig + offset;
 }
开发者ID:anand-ajmera,项目名称:cornell-urban-challenge,代码行数:4,代码来源:ArbiterParkingSpotWaypoint.cs

示例6: GetBoundingBox

        public System.Drawing.RectangleF GetBoundingBox(WorldTransform wt)
        {
            // Determine size of bounding box
            float scaled_offset = 1 / wt.Scale;

            // invert the scale
            float scaled_size = DrawingUtility.cp_large_size;

            // assume that the world transform is currently applied correctly to the graphics
            RectangleF rect = new RectangleF((float)this.position.X - scaled_size / 2, (float)this.position.Y - scaled_size / 2, scaled_size, scaled_size);

            // return
            return rect;
        }
开发者ID:anand-ajmera,项目名称:cornell-urban-challenge,代码行数:14,代码来源:ArbiterParkingSpotWaypoint.cs

示例7: BeginMove

 public void BeginMove(UrbanChallenge.Common.Coordinates orig, WorldTransform t)
 {
 }
开发者ID:anand-ajmera,项目名称:cornell-urban-challenge,代码行数:3,代码来源:ArbiterParkingSpotWaypoint.cs

示例8: HitTest

 /// <summary>
 /// Perform a test to see if this is selected
 /// </summary>
 /// <param name="loc"></param>
 /// <param name="tol"></param>
 /// <param name="filter"></param>
 /// <returns></returns>
 public HitTestResult HitTest(Coordinates loc, float tol, WorldTransform wt, DisplayObjectFilter filter)
 {
     // return a no-hit
     return new HitTestResult(this, false, float.MaxValue);
 }
开发者ID:anand-ajmera,项目名称:cornell-urban-challenge,代码行数:12,代码来源:GridDisplay.cs

示例9: Render

        public void Render(System.Drawing.Graphics g, WorldTransform t)
        {
            if (this.Mode == ZoneToolboxMode.StayOut)
            {
                if (this.WrappingHelpers.Count > 0)
                {
                    for (int i = 0; i < this.WrappingHelpers.Count; i++)
                    {
                        DrawingUtility.DrawControlPoint(this.WrappingHelpers[i], Color.SteelBlue, null, ContentAlignment.MiddleCenter, ControlPointStyle.SmallCircle, g, t);

                        if (i + 1 < this.WrappingHelpers.Count)
                        {
                            DrawingUtility.DrawColoredControlLine(Color.SteelBlue, System.Drawing.Drawing2D.DashStyle.Solid,
                                this.WrappingHelpers[i], this.WrappingHelpers[i + 1], g, t);
                        }
                    }

                    if (this.WrappingHelpers.Count > 0)
                    {
                        DrawingUtility.DrawColoredControlLine(Color.SteelBlue, System.Drawing.Drawing2D.DashStyle.Solid,
                            this.WrappingHelpers[this.WrappingHelpers.Count - 1], this.CurrentMouse, g, t);
                    }
                }
            }
            else if (this.Mode == ZoneToolboxMode.NavNodes)
            {
                if (this.rightClickNode != null)
                {
                    DrawingUtility.DrawControlPoint(this.rightClickNode.Position, Color.Red, null, ContentAlignment.MiddleCenter, ControlPointStyle.SmallCircle, g, t);
                }
                else if (this.rightClickEdge != null)
                {
                    DrawingUtility.DrawColoredArrowControlLine(Color.Red, System.Drawing.Drawing2D.DashStyle.Solid,
                            this.rightClickEdge.Start.Position, this.rightClickEdge.End.Position, g, t);
                }

                if (this.PreviousNode != null)
                {
                    DrawingUtility.DrawColoredArrowControlLine(Color.DarkBlue, System.Drawing.Drawing2D.DashStyle.Solid,
                            this.PreviousNode.Position, this.CurrentMouse, g, t);
                }
            }
        }
开发者ID:anand-ajmera,项目名称:cornell-urban-challenge,代码行数:43,代码来源:ZoneTool.cs

示例10: RulerTool

 public RulerTool(bool snap, ArbiterRoadNetwork arn, WorldTransform wt)
 {
     this.snapToWaypoints = snap;
     this.roadNetwork = arn;
     this.wt = wt;
 }
开发者ID:anand-ajmera,项目名称:cornell-urban-challenge,代码行数:6,代码来源:RulerTool.cs

示例11: Render

        public void Render(System.Drawing.Graphics g, WorldTransform t)
        {
            if (this.Initial != null && this.Current != null)
            {
                DrawingUtility.DrawControlPoint(this.Initial.Value, DrawingUtility.ColorToolRuler, null, System.Drawing.ContentAlignment.BottomCenter, ControlPointStyle.SmallCircle, g, t);
                DrawingUtility.DrawControlPoint(this.Current.Value, DrawingUtility.ColorToolRuler, null, System.Drawing.ContentAlignment.BottomCenter, ControlPointStyle.SmallCircle, g, t);

                DrawingUtility.DrawColoredControlLine(DrawingUtility.ColorToolRuler, System.Drawing.Drawing2D.DashStyle.Solid,
                    this.Initial.Value, this.Current.Value, g, t);

                Coordinates dir = this.Current.Value - this.Initial.Value;
                Coordinates final = this.Initial.Value + dir.Normalize(dir.Length / 2.0);

                string label = dir.Length.ToString("F6") + " m";

                    DrawingUtility.DrawControlPoint(final, DrawingUtility.ColorToolRuler, label, System.Drawing.ContentAlignment.BottomCenter, ControlPointStyle.None, g, t);
            }
        }
开发者ID:anand-ajmera,项目名称:cornell-urban-challenge,代码行数:18,代码来源:RulerTool.cs

示例12: Render

 public void Render(System.Drawing.Graphics g, WorldTransform t)
 {
 }
开发者ID:anand-ajmera,项目名称:cornell-urban-challenge,代码行数:3,代码来源:PartitionTools.cs

示例13: GetBoundingBox

 public System.Drawing.RectangleF GetBoundingBox(WorldTransform wt)
 {
     return new System.Drawing.RectangleF();
 }
开发者ID:anand-ajmera,项目名称:cornell-urban-challenge,代码行数:4,代码来源:PartitionTools.cs

示例14: Render

        public void Render(System.Drawing.Graphics g, WorldTransform t)
        {
            if (!this.snapToWaypoints || this.roadNetwork == null)
            {
                if (this.Current != null)
                {
                    LLACoord lla = GpsTools.XyToLlaDegrees(Current, projection);

                    string locString = Current.X.ToString("F6") + ", " + Current.Y.ToString("F6") + "\n" +
                        lla.lat.ToString("F6") + ", " + lla.lon.ToString("F6") + "\n" + GpsTools.LlaDegreesToArcMinSecs(lla);

                    DrawingUtility.DrawControlPoint(this.Current, DrawingUtility.ColorToolPointAnalysis, locString,
                        ContentAlignment.BottomCenter, ControlPointStyle.SmallCircle, g, t);
                }

                if (Save != null && Save.Count > 0)
                {
                    foreach (Coordinates tmp in Save)
                    {
                        LLACoord lla = GpsTools.XyToLlaDegrees(tmp, projection);

                        string locString = tmp.X.ToString("F6") + ", " + tmp.Y.ToString("F6") + "\n" +
                            lla.lat.ToString("F6") + ", " + lla.lon.ToString("F6") + "\n" + GpsTools.LlaDegreesToArcMinSecs(lla);

                        DrawingUtility.DrawControlPoint(tmp, DrawingUtility.ColorToolPointAnalysis, locString,
                            ContentAlignment.BottomCenter, ControlPointStyle.SmallCircle, g, t);
                    }
                }
            }
            else
            {
                if (this.Current != null)
                {
                    Coordinates c = this.Current;
                    double minDist = Double.MaxValue;
                    Coordinates? closest = null;

                    foreach (IArbiterWaypoint iaw in this.roadNetwork.ArbiterWaypoints.Values)
                    {
                        double d = iaw.Position.DistanceTo(c);
                        if (d < minDist && ((IDisplayObject)iaw).HitTest(c, (float)0.2, wt, DrawingUtility.DefaultFilter).Hit)
                        {
                            minDist = d;
                            closest = iaw.Position;
                        }
                    }

                    if (closest != null)
                        c = closest.Value;

                    LLACoord lla = GpsTools.XyToLlaDegrees(c, projection);

                    string locString = c.X.ToString("F6") + ", " + c.Y.ToString("F6") + "\n" +
                        lla.lat.ToString("F6") + ", " + lla.lon.ToString("F6") + "\n" + GpsTools.LlaDegreesToArcMinSecs(lla);

                    DrawingUtility.DrawControlPoint(c, DrawingUtility.ColorToolPointAnalysis, locString,
                        ContentAlignment.BottomCenter, ControlPointStyle.SmallCircle, g, t);
                }
            }
        }
开发者ID:anand-ajmera,项目名称:cornell-urban-challenge,代码行数:60,代码来源:PointAnalysisTool.cs

示例15: Render

        public void Render(System.Drawing.Graphics g, WorldTransform t)
        {
            Color c;

            if (this.selected == SelectionType.NotSelected)
            {
                c = DrawingUtility.ColorArbiterUserWaypoint;
            }
            else
            {
                c = DrawingUtility.ColorArbiterUserWaypointSelected;
            }

            if (DrawingUtility.DisplayArbiterWaypointId)
            {
                DrawingUtility.DrawControlPoint(this.position, c, this.WaypointId.ToString(), ContentAlignment.BottomCenter, ControlPointStyle.SmallCircle, g, t);
            }
            else
            {
                DrawingUtility.DrawControlPoint(this.position, c, null, ContentAlignment.BottomCenter, ControlPointStyle.SmallCircle, g, t);
            }
        }
开发者ID:anand-ajmera,项目名称:cornell-urban-challenge,代码行数:22,代码来源:ArbiterUserWaypoint.cs


注:本文中的RndfEditor.Display.Utilities.WorldTransform类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。