本文整理汇总了C#中Renderer.AddRenderable方法的典型用法代码示例。如果您正苦于以下问题:C# Renderer.AddRenderable方法的具体用法?C# Renderer.AddRenderable怎么用?C# Renderer.AddRenderable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Renderer
的用法示例。
在下文中一共展示了Renderer.AddRenderable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PathMapGenerator
/// <summary>
/// Constructor for the path map generator GUI. Takes the subfield list which is
/// created by the split function in the main form.
/// </summary>
/// <param name="fields">List of subfields</param>
public PathMapGenerator(List<Field> fields)
{
InitializeComponent();
rend = new Renderer(FieldView);
wallsRend = new PolygonRenderable(Color.Brown, true);
objectsRend = new PolygonRenderable(Color.Blue, true);
regionsRend = new PolygonRenderable(Color.Yellow, 0.5f, true);
fieldsRend = new PolygonRenderable(Color.Gray);
pointRend = new PointRenderable();
pointRend.Show = false;
lines = new List<PathRenderable>();
rend.AddRenderable(wallsRend);
rend.AddRenderable(objectsRend);
rend.AddRenderable(regionsRend);
rend.AddRenderable(fieldsRend);
rend.AddRenderable(pointRend);
originalTool = rend.Tool;
polyTool = new ClickTool();
polyTool.clicked += new EventHandler<ClickedEventArgs>(FieldViewClick);
rend.Tool = polyTool;
complete = false;
PRMs = new List<PRMAlgorithm>();
rend.OnFormShown();
this.fields = fields;
f = fields[0];
count = 1;
LoadNext();
}
示例2: MainGUI
public MainGUI()
{
InitializeComponent();
rend = new Renderer(FieldView);
ocgridRend = new OccupancyGridRenderable("Grid SLAM Map", Color.Red);
firstPointRend = new PointRenderable();
firstPointRend.Show = false;
newPolyRend = new PathRenderable();
wallsRend = new PolygonRenderable(Color.Brown, true);
objectsRend = new PolygonRenderable(Color.Blue, true);
regionsRend = new PolygonRenderable(Color.Yellow, 0.5f, true);
fieldsRend = new PolygonRenderable(Color.Gray);
selectedPolyRend = new PolygonRenderable(Color.Black);
selectedPolyRend.LineThickness = 2F;
rend.AddRenderable(ocgridRend);
rend.AddRenderable(firstPointRend);
rend.AddRenderable(newPolyRend);
rend.AddRenderable(wallsRend);
rend.AddRenderable(objectsRend);
rend.AddRenderable(regionsRend);
rend.AddRenderable(fieldsRend);
rend.AddRenderable(selectedPolyRend);
mainField = new Field("main");
subFields = new Dictionary<string, Polygon>();
selectedPoly = new List<Polygon>();
originalTool = rend.Tool;
polyTool = new ClickTool();
polyTool.clicked += new EventHandler<ClickedEventArgs>(FieldViewClick);
newPoly = new Polygon();
accRobot = false;
ocgridShow = true;
Ctrl_press.Hide();
}