protected override List <Vector3> GetVertices(MapGraphics graphics) { (double x1, double y1, double z1, double angle1) = _posAngle1.GetValues(); (double x2, double y2, double z2, double angle2) = _posAngle2.GetValues(); double dist = PositionAngle.GetHDistance(_posAngle1, _posAngle2); (double startX, double startZ) = MoreMath.ExtrapolateLine2D(x2, z2, x1, z1, dist + _backwardsSize); (double endX, double endZ) = MoreMath.ExtrapolateLine2D(x1, z1, x2, z2, (_useFixedSize ? 0 : dist) + Size); var vertices = new List <Vector3>(); vertices.Add(new Vector3((float)startX, 0, (float)startZ)); vertices.Add(new Vector3((float)endX, 0, (float)endZ)); return(vertices); }
protected override List <(float x, float y, float z)> GetVerticesTopDownView() { (double x1, double y1, double z1, double angle1) = _posAngle1.GetValues(); (double x2, double y2, double z2, double angle2) = _posAngle2.GetValues(); double dist = PositionAngle.GetHDistance(_posAngle1, _posAngle2); (double startX, double startZ) = MoreMath.ExtrapolateLine2D(x2, z2, x1, z1, dist + _backwardsSize); (double endX, double endZ) = MoreMath.ExtrapolateLine2D(x1, z1, x2, z2, (_useFixedSize ? 0 : dist) + Size); List <(float x, float y, float z)> vertices = new List <(float x, float y, float z)>(); vertices.Add(((float)startX, 0, (float)startZ)); vertices.Add(((float)endX, 0, (float)endZ)); return(vertices); }