RoadElement
Description
- Derived from
-
Versioned abstract
Describes a single element of a road.
Road elements are specified in road-space, which is defined as follows:
-
The X-axis is the walk distance from RangeD.Start of ICurve.Range or RoadBuilder.CenterLine, i.e. zero represents the start of the road’s center-line and ICurve.Length represents the end of it.
-
The Y-axis depends on the X-coordinate and is always perpendicular to the center-line curve of the road. Positive Y-coordinates are on the right side of the center-line, negative Y-coordinates are on the left side.
Public / Constructors
Line
2 overloads
Creates a RoadElement object for a road line that is perpendicular to the center-line.
Creates RoadElement objects for a road line that is perpendicular to the center-line and have a stipple pattern.
Stripe
2 overloads
Creates a RoadElement object for common road stripes (single or double) that follow the center-line.
Creates RoadElement objects for common road stripes (single or double) that follow the center-line and have a stipple pattern.
Public / Attributes
Bounds
Specifies the bounds of this road element.
The road element bounds, specify an axis-aligned rectangle in road-space. Shape geometry for the road element bounds is generated with ShapeBuilder.Curve.
Defaults to Box2D.Empty.
Repeat
Specifies the number of times the road element bounds (see Bounds) shall be repeated along the X- and Y-axes of road-space.
Per axis, each repetition is offset by Size + Pad
, where Size
is the size of Bounds along the axis and Pad
is the corresponding value of Step.
Defaults to Vec2I.Zero, i.e. shape geometry is only generated for the road element bounds, without repeating it.
Step
Specifies the X- and Y-coordinate steps between repetitions of the road element bounds.
Defaults to Vec2D.Zero.