Open Rails

AETraveller.MSTSInterpolateAlongCurve Method

[This is preliminary documentation and subject to change.]

MSTSInterpolateAlongCurve interpolates position along a circular arc. (Uses MSTS rigid-body rotation method for curve on a grade.)

public static Vector3 MSTSInterpolateAlongCurve(
   Vector3 vPC,
   Vector3 vPC_O,
   Matrix mRotY,
   Matrix mWorld,
   out Vector3 vP
);

Parameters

vPC
Local position vector for Point-of-Curve (PC) in x-z plane.
vPC_O
Unit vector in direction from PC to arc center (O).
mRotY
Rotation matrix that deflects arc from PC to a point on curve (P).
mWorld
Transformation from local to world coordinates.
vP
Position vector for desired point on curve (P), returned by reference.

Return Value

Displacement vector from PC to P in world coordinates.

See Also

AETraveller Class | Orts.Formats.OR Namespace