本文整理汇总了C#中EdgeType类的典型用法代码示例。如果您正苦于以下问题:C# EdgeType类的具体用法?C# EdgeType怎么用?C# EdgeType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EdgeType类属于命名空间,在下文中一共展示了EdgeType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: NavGraphEdge
public NavGraphEdge( int fromIdx, int toIdx, float cost, EdgeType edgeType=EdgeType.normal )
{
fromIdx_ = fromIdx;
toIdx_ = toIdx;
cost_ = cost;
edgeType_ = edgeType;
}
开发者ID:OggYiu,项目名称:game_jam_project,代码行数:7,代码来源:NavGraphEdge.cs
示例2: add
public void add(String name, String seriesName, int issueYear, int width, int height, EdgeType type, int faceValue, double multiplier)
{
if (this.index < StampCatalog.MAX_NUMBER_OF_STAMPS)
{
this.stamps[this.index++] = new Stamp(name, seriesName, issueYear, width, height, type, faceValue, multiplier);
}
}
开发者ID:davidbedok,项目名称:oeprog1,代码行数:7,代码来源:StampCatalog.cs
示例3: Edge
public Edge()
{
type = EdgeType.Normal;
name = "Edge";
id = 0;
behaviors = new List<Behavior>();
}
开发者ID:kevincos,项目名称:Vexed,代码行数:7,代码来源:Edge.cs
示例4: EdgeTemplate
public EdgeTemplate(EdgeType type, int width, int height)
{
Type = type;
Width = width;
Height = height;
Points = GetPoints(type, width, height);
}
开发者ID:CorpOfHack,项目名称:ctf-1,代码行数:7,代码来源:Form1.cs
示例5: Edge
public Edge()
{
type = EdgeType.Normal;
id = 0;
_name = "Edge_" + id;
behaviors = new List<Behavior>();
}
开发者ID:kevincos,项目名称:Vexed,代码行数:7,代码来源:Edge.cs
示例6: EdgeDescription
public EdgeDescription(Vector3 pos, Direction direction,
EdgeType type)
{
position = pos;
dir = direction;
this.type = type;
}
开发者ID:Desocrit,项目名称:BoDCode,代码行数:7,代码来源:Chunk.cs
示例7: Edge
/// <summary>
/// Creates a new edge between source and target. The edge is not registered with the source and
/// target vertices unless it is added to the graph!
/// </summary>
/// <param name="a">The A vertex</param>
/// <param name="b">The B vertex</param>
/// <param name="graph">The graph to which this edge belongs</param>
/// <param name="type">Whether to create an undirected or a directed edge</param>
public Edge(Vertex a, Vertex b, Network graph, EdgeType type)
{
ID = Guid.NewGuid();
A = a;
B = b;
Network = graph;
EdgeType = type;
}
开发者ID:mszanetti,项目名称:NETGen,代码行数:16,代码来源:Edge.cs
示例8: SweepEvent
public SweepEvent(Point p, bool isLeft, PolygonType polygonType, SweepEvent otherSweepEvent, EdgeType edgeType)
{
this.p = p;
this.isLeft = isLeft;
this.polygonType = polygonType;
this.otherSE = otherSweepEvent;
this.edgeType = edgeType;
}
开发者ID:TPSAncient,项目名称:TurnBasedStrategyUnity,代码行数:8,代码来源:SweepEvent.cs
示例9: Square
public Square(Point point, int size, Color surfaceColor, Color borderColor, EdgeType edgeType) : this()
{
this.Location = point;
this.Size = size;
this.SurfaceColor = surfaceColor;
this.BorderColor = borderColor;
this.EdgeType = edgeType;
}
开发者ID:nickgenov,项目名称:ObjectOrientedProgramming,代码行数:8,代码来源:Square.cs
示例10: EnsureEdgeInfo
internal void EnsureEdgeInfo(uint edgeId, uint startSlotId, uint endSlotId, EdgeType edgeType)
{
VisualEdge edge = controller.GetVisualEdge(edgeId);
Assert.AreNotEqual(null, edge); // Make sure the edge exists.
Assert.AreEqual(startSlotId, edge.StartSlotId); // Connecting from...
Assert.AreEqual(endSlotId, edge.EndSlotId); // Connecting to...
Assert.AreEqual(edgeType, edge.EdgeType); // Explicit or implicit?
}
开发者ID:samuto,项目名称:designscript,代码行数:8,代码来源:TestHelpers.cs
示例11: AbstractEdge
public AbstractEdge(string name, long unid, bool showAnnotation, int weight, Position position, Transition transition, EdgeType edgeType)
: base(name, unid, showAnnotation)
{
this.weight = weight;
this.position = position;
this.transition = transition;
this.edgeType = edgeType;
}
开发者ID:davidbedok,项目名称:UBPNS,代码行数:8,代码来源:AbstractEdge.cs
示例12: Edges
/// <summary>
/// Returns the edges in the graph of the type given, as set
/// </summary>
public static Dictionary<IEdge, SetValueType> Edges(IGraph graph, EdgeType edgeType, int threadId)
{
Dictionary<IEdge, SetValueType> edgesSet = new Dictionary<IEdge, SetValueType>();
foreach(IEdge edge in graph.GetCompatibleEdges(edgeType))
{
edgesSet[edge] = null;
}
return edgesSet;
}
开发者ID:jblomer,项目名称:GrGen.NET,代码行数:12,代码来源:GraphHelperParallel.cs
示例13: PlanarGraphEdge
public PlanarGraphEdge(GeometryTutorLib.ConcreteAST.Point targ, EdgeType type, double c, int initDegree)
{
this.target = targ;
edgeType = type;
cost = c;
degree = initDegree;
isCycle = false;
}
开发者ID:wcatykid,项目名称:GeoShader,代码行数:9,代码来源:PlanarGraphEdge.cs
示例14: Stamp
public Stamp(String name, String seriesName, int issueYear, int width, int height, EdgeType type, int faceValue, double multiplier)
{
this.name = name;
this.seriesName = seriesName;
this.issueYear = issueYear;
this.data = new StampData(width, height, type);
this.faceValue = faceValue;
this.multiplier = multiplier;
}
开发者ID:davidbedok,项目名称:oeprog1,代码行数:9,代码来源:Stamp.cs
示例15: Edge
public Edge(Vertex start, Vertex end, EdgeType type)
{
Start = start;
End = end;
Type = type;
Start.Add(this);
End.Add(this);
}
开发者ID:martindevans,项目名称:CGAL_StraightSkeleton_Wrapper,代码行数:9,代码来源:Edge.cs
示例16: VisualEdge
internal VisualEdge(EdgeController edgeController, EdgeType edgeType)
{
this.edgeController = edgeController;
this.EdgeType = edgeType;
controlPoints.Add(new Point());
controlPoints.Add(new Point());
controlPoints.Add(new Point());
controlPoints.Add(new Point());
}
开发者ID:samuto,项目名称:designscript,代码行数:9,代码来源:VisualEdge.cs
示例17: GetPoints
private Point[] GetPoints(EdgeType type, int width, int height)
{
switch (type)
{
case EdgeType.Left: return Sweep(0, 0, 0, 1, height);
case EdgeType.Top: return Sweep(0, 0, 1, 0, width);
case EdgeType.Right: return Sweep(width - 1, 0, 0, 1, height);
case EdgeType.Bottom: return Sweep(0, height - 1, 1, 0, width);
default: throw new InvalidOperationException();
}
}
开发者ID:CorpOfHack,项目名称:ctf-1,代码行数:11,代码来源:Form1.cs
示例18: EdgeViewModel
public EdgeViewModel(NodeViewModel nVMEndA, NodeViewModel nVMEndB, EdgeType type)
{
edge = new Edge();
NVMEndA = nVMEndA;
NVMEndB = nVMEndB;
MultA = "";
MultB = "";
Type = edgeTypeConverter(type);
initArrow();
newPath();
}
开发者ID:plantener,项目名称:02350,代码行数:11,代码来源:EdgeViewModel.cs
示例19: getStamps
public Stamp[] getStamps(EdgeType type)
{
int numberOfStamps = this.count(type);
Stamp[] result = new Stamp[numberOfStamps];
int index = 0;
for (int i = 0; i < this.index; i++)
{
if (this.stamps[i].Data.Type == type)
{
result[index++] = this.stamps[i];
}
}
return result;
}
开发者ID:davidbedok,项目名称:oeprog1,代码行数:14,代码来源:StampCatalog.cs
示例20: AddUndirectedEdge
public void AddUndirectedEdge(Point from, Point to, double cost, EdgeType eType)
{
//
// Are these nodes in the graph?
//
int fromNodeIndex = nodes.IndexOf(new PlanarGraphNode(from));
int toNodeIndex = nodes.IndexOf(new PlanarGraphNode(to));
if (fromNodeIndex == -1 || toNodeIndex == -1)
{
throw new ArgumentException("Edge uses undefined nodes: " + from + " " + to);
}
//
// Check if the edge already exists
//
PlanarGraphEdge fromToEdge = nodes[fromNodeIndex].GetEdge(to);
if (fromToEdge != null)
{
PlanarGraphEdge toFromEdge = nodes[toNodeIndex].GetEdge(from);
fromToEdge.edgeType = UpdateEdge(fromToEdge.edgeType, eType);
toFromEdge.edgeType = fromToEdge.edgeType;
// Increment the degree if it is an arc.
if (eType == EdgeType.REAL_ARC)
{
fromToEdge.degree++;
toFromEdge.degree++;
}
}
//
// The edge does not exist.
//
else
{
nodes[fromNodeIndex].AddEdge(to, eType, cost, (eType == EdgeType.REAL_ARC ? 1 : 0));
nodes[toNodeIndex].AddEdge(from, eType, cost, (eType == EdgeType.REAL_ARC ? 1 : 0));
}
}
开发者ID:wcatykid,项目名称:GeoShader,代码行数:40,代码来源:PlanarGraph.cs
注:本文中的EdgeType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论