S2ClosestPointQueryBaseOptions

Options that control the set of points returned. Note that by default *all* points are returned, so you will always want to set either the max_points() option or the max_distance() option (or both).

This class is also available as S2ClosestPointQueryBase<Data>::Options. (It is defined here to avoid depending on the "Data" template argument.)

The Distance template argument is described below.

Constructors

this
this()
Undocumented in source.

Members

Aliases

Delta
alias Delta = Distance.Delta
Undocumented in source.

Functions

dup
ThisT dup()
Undocumented in source. Be warned that the author may not have intended to support it.
maxDistance
Distance maxDistance()

Specifies that only points whose distance to the target is less than "max_distance" should be returned.

maxError
Delta maxError()

Specifies that points up to max_error() further away than the true closest points may be substituted in the result set, as long as such points satisfy all the remaining search criteria (such as max_distance). This option only has an effect if max_points() is also specified; otherwise all points closer than max_distance() will always be returned.

maxPoints
int maxPoints()

Specifies that at most "max_points" points should be returned.

region
inout(S2Region) region()

Specifies that points must be contained by the given S2Region. "region" is owned by the caller and must persist during the lifetime of this object. The value may be changed between calls to FindClosestPoints(), or reset by calling set_region(nullptr).

setMaxDistance
void setMaxDistance(Distance max_distance)
Undocumented in source. Be warned that the author may not have intended to support it.
setMaxError
void setMaxError(Delta max_error)
Undocumented in source. Be warned that the author may not have intended to support it.
setMaxPoints
void setMaxPoints(int max_points)
Undocumented in source.
setRegion
void setRegion(S2Region region)
Undocumented in source. Be warned that the author may not have intended to support it.
setUseBruteForce
void setUseBruteForce(bool use_brute_force)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
useBruteForce
bool useBruteForce()

Specifies that distances should be computed by examining every point rather than using the S2ShapeIndex. This is useful for testing, benchmarking, and debugging.

Variables

MAX_MAX_POINTS
enum int MAX_MAX_POINTS;
Undocumented in source.
_maxDistance
Distance _maxDistance;
Undocumented in source.
_maxError
Delta _maxError;
Undocumented in source.
_maxPoints
int _maxPoints;
Undocumented in source.
_region
S2Region _region;
Undocumented in source.
_useBruteForce
bool _useBruteForce;
Undocumented in source.

Meta