Skip to main content

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.

Constructors​

MemberWhat it is
Edge(Node nodeA, Node nodeB, EdgeType type)Creates an Edge from nodeA, nodeB and type.

Properties​

MemberWhat 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​

MemberWhat 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: