Edge
A class in Root.Township, Alta.Forests.
A connection between two nodes in the forest generator's graph, with a path in each direction and the spaces on either side.
- Listed in World generation
- Documented in Forest
Constructors
| Member | What it is |
|---|---|
Edge(Node nodeA, Node nodeB, EdgeType type) | Creates an Edge from nodeA, nodeB and type. |
Properties
| Member | What it is |
|---|---|
Node A { get; private set; } | First node. |
Path AB { get; private set; } | Path from A to B. |
AttributeSet Attributes { get; } | Attribute set for this edge. |
float AverageHeight { get; } | Mean height of the two nodes. |
float AverageRadius { get; } | Mean radius of the two nodes. |
Node B { get; private set; } | Second node. |
Path BA { get; private set; } | Path from B to A. |
float Length2d { get; } | Distance between the nodes on the horizontal plane. |
EdgeType Type { get; set; } | The edge's type flags. |
Methods
| Member | What it is |
|---|---|
bool Is(EdgeType type) | True if the edge's type has any of the given EdgeType flags. |
static Predicate<Edge> IsCheck(EdgeType type) | Returns a predicate that checks Is for the given type. |
bool IsOn(SpaceType type) | True if the space on either side of the edge has any of the given SpaceType flags. |
bool IsOnRight(Vector2 point) | True if a point is on the right of the A to B direction. |
Used in
Members of other types that take, return or hold a Edge:
ForestAttributeEvaluator.EvaluateEdge, ForestBridges.GetOverlap, ForestCliffEvaluator.evaluated, ForestCliffEvaluator.IsLegitimateEdge, ForestGCoreInstruction.ForestGCoreInstruction, ForestGeneration.chunkEdges, ForestGeneration.CreateEdge, ForestGeneration.DistanceToPath, ForestGeneration.DistanceToPathOrNode, ForestGeneration.edges, ForestGeneration.Edges, ForestGeneration.EvaluateNearest, ForestGeneration.GetEdge, ForestGeneration.GetEdgesWithinChunk, ForestGeneration.sortedEdges, ForestGeneration.WorkingEdges, ForestGenerator.NearestInfo.nearestEdge, ForestPopulationArea.edges, LandBridgeModifier.landBridges, Path.Edge, Path.Path, PointEdge.EvaluateEdge, PointEdge.GetEdge, PointEdge.nearestEdge, PointNormal.GetEdge, PointNormal.nearestEdge, RiverIntersections.Intersection.edge, BasicDynamicPath.Edge, BasicDynamicPath.Initialize, DistanceToPathFilter.EdgePredicate, ForestNodeMapSpawnData.Edge, ForestNodeMapSpawnData.ForestNodeMapSpawnData, IDynamicPath.Initialize.