Home Reference Source Test Repository
public class | source

DiamondNode

Extends:

NodePolygonNode → DiamondNode

Node subclass for diamond nodes.

Constructor Summary

Public Constructor
public

Constructs a DiamondNode instance.

Member Summary

Public Members
public
public

Inherited Summary

From class Node
public

x: *

public

y: *

public abstract

Check if the node contains the given point.

public abstract

Find the distance from the node's coordinates to a given point.

public abstract

Draw the node on the given canvas context.

public

Draw the Label object associated with this node.

public abstract

Find the point on the edge of the node in the direction of the given point.

public abstract

Get the point on the edge of the node at the given angle.

public

setPos(x: number, y: number)

Update the node position.

From class PolygonNode
public

label: *

public

Check if the node contains the given point.

public

Find the distance from the node's coordinates to a given point.

public

Draw the node on the given canvas context.

public

Draw additional objects to display the node as an accepting state on the given canvas context.

public

Draw additional objects to display the node as a starting state on the given canvas context.

public

Find the point on the edge of the node in the direction of the given point.

public

Get the point on the edge of the node at the given angle.

Public Constructors

public constructor(x: number, y: number) source

Constructs a DiamondNode instance.

Override:

PolygonNode#constructor

Params:

NameTypeAttributeDescription
x number

x-coordinate of the node.

y number

y-coordinate of the node.

Public Members

public inscribed: * source

public separation: number source