IntersectionData

@Serializable
data class IntersectionData(var name: String, var length: Double = 0.0, var velocityFactor: Double = 1.0, var x: Double = Double.NaN, var y: Double = Double.NaN, var z: Double = 0.0)(source)

A junction, as it appears in a serialized network specification.

The length defaults to zero, the usual assumption that a junction is a point. Coordinates default to not-a-number, meaning the modeler supplied no layout; the animation layer treats that as "place it yourself" rather than as the origin.

Parameters

name

unique within the network, and the name process code uses to address the junction

length

the distance to cross the junction, zero or more

velocityFactor

multiplies transporter velocity while crossing, strictly positive

x

layout abscissa, or not-a-number when no layout was supplied

y

layout ordinate, or not-a-number when no layout was supplied

z

layout height, defaulting to zero rather than to not-a-number. A guide path with no layout at all is a flat one at ground level, which is a meaningful position; a height of not-a-number would be a third way of saying "unspecified" that every reader would have to handle, and would poison any renderer that added it to a camera. The two planar coordinates keep not-a-number because there it distinguishes "no layout" from "the origin", and a reader testing x.isNaN() for that still gets the right answer.

Constructors

Link copied to clipboard
constructor(name: String, length: Double = 0.0, velocityFactor: Double = 1.0, x: Double = Double.NaN, y: Double = Double.NaN, z: Double = 0.0)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var x: Double
Link copied to clipboard
var y: Double
Link copied to clipboard
var z: Double