Open Rails

AETraveller.MSTSInterpolateAlongStraight Method

[This is preliminary documentation and subject to change.]

MSTSInterpolateAlongStraight interpolates position along a straight stretch.

public static Vector3 MSTSInterpolateAlongStraight(
   Vector3 vP0,
   Vector3 vP0_P,
   float offset,
   Matrix mWorld,
   out Vector3 vP
);

Parameters

vP0
Local position vector for starting point P0 in x-z plane.
vP0_P
Unit vector in direction from P0 to P.
offset
Distance from P0 to P.
mWorld
Transformation from local to world coordinates.
vP
Position vector for desired point(P), returned by reference.

Return Value

Displacement vector from P0 to P in world coordinates.

See Also

AETraveller Class | Orts.Formats.OR Namespace