allGeodesicIntersections - multiple declarations
Function allGeodesicIntersections
Throwing prepared-state zero-reference all-intersection enumeration.
GeodesicIntersectionEnumeration allGeodesicIntersections(T)(
const GeodesicIntersectionSolver!T intersector,
const GeodesicLine!T firstLine,
const GeodesicLine!T secondLine,
const T maxDisplacement,
GeodesicIntersectionPoint!T[] output,
ref GeodesicIntersectionWorkspace!T workspace
) @safe
if (isGeodesyScalar!T);
Function allGeodesicIntersections
Throwing one-shot all-intersection enumeration.
GeodesicIntersectionEnumeration allGeodesicIntersections(T)(
const Geodesic!T solver,
const GeodesicLine!T firstLine,
const GeodesicLine!T secondLine,
const T maxDisplacement,
const T referenceOnFirst,
const T referenceOnSecond,
GeodesicIntersectionPoint!T[] output,
ref GeodesicIntersectionWorkspace!T workspace
) @safe
if (isGeodesyScalar!T);
Function allGeodesicIntersections
Throwing prepared-state all-intersection enumeration.
GeodesicIntersectionEnumeration allGeodesicIntersections(T)(
const GeodesicIntersectionSolver!T intersector,
const GeodesicLine!T firstLine,
const GeodesicLine!T secondLine,
const T maxDisplacement,
const T referenceOnFirst,
const T referenceOnSecond,
GeodesicIntersectionPoint!T[] output,
ref GeodesicIntersectionWorkspace!T workspace
) @safe
if (isGeodesyScalar!T);
Example
Example using the throwing all-intersection convenience.
const solver = Geodesic!double .fromEllipsoid(wgs84!double());
GeodesicIntersectionSolver!double intersector;
assert(GeodesicIntersectionSolver!double .tryFromGeodesic(
solver, intersector));
const origin = GeographicCoordinate!double .fromComponents(
Latitude!double .fromDegrees(0.0),
Longitude!double .fromDegrees(0.0));
GeodesicLine!double firstLine;
GeodesicLine!double secondLine;
assert(GeodesicLine!double .tryFromGeodesic(
solver, origin, Angle!double .fromDegrees(30.0), firstLine));
assert(GeodesicLine!double .tryFromGeodesic(
solver, origin, Angle!double .fromDegrees(120.0), secondLine));
GeodesicIntersectionWorkspaceEntry!double[16] starts;
bool[16] skip;
GeodesicIntersectionWorkspaceEntry!double[32] found;
GeodesicIntersectionWorkspaceEntry!double[16] centers;
GeodesicIntersectionWorkspace!double workspace;
assert(GeodesicIntersectionWorkspace!double .tryFromStorage(
starts[], skip[], found[], centers[], workspace));
GeodesicIntersectionPoint!double[8] output;
const enumeration = allGeodesicIntersections(
intersector,
firstLine,
secondLine,
1_000_000.0,
output[],
workspace);
assert(enumeration .isValid);