Skip to main content

SplineInstruction

A class in Root.Township, Alta.Forests.

Generation instruction that builds a bezier spline and lays a static environment piece along it. Used for forest bridges.

Constructors​

MemberWhat it is
SplineInstruction()Creates a SplineInstruction from a, b, c, d and content.
SplineInstruction(Vector3 a, Vector3 b, Vector3 c, Vector3 d, StaticEnvironmentPiece content)Creates a SplineInstruction from a, b, c, d and content.

Fields​

6 private and internal fields
MemberWhat it is
private Vector3 aStart point.
private Vector3 bFirst control point.
private Vector3 cSecond control point.
private StaticEnvironmentPiece contentThe piece, loaded from contentId when missing.
private uint contentIdIndex of the piece, as saved.
private Vector3 dEnd point.

Methods​

MemberWhat it is
override IInstructionResult Execute(object context)Loads the piece if needed and creates the spline with the piece as its display. Logs an error if the piece is missing.
protected override void SerializeInternal(Stream stream)Writes or reads the four points and the piece index, and drops the cached piece.