static R2Vector |
R2Vector.add(R2Vector p1,
R2Vector p2) |
Returns the vector result of p1 - p2.
|
void |
R2Rect.addPoint(R2Vector p) |
Increase the size of the bounding rectangle to include the given point.
|
R2Vector |
R2Rect.clampPoint(R2Vector p) |
Return the closest point in this rectangle to the given point "p".
|
static boolean |
S2EdgeUtil.clipToFace(S2Point a,
S2Point b,
int face,
R2Vector aUv,
R2Vector bUv) |
Given an edge AB and a face, return the (u,v) coordinates for the portion of AB that intersects
that face.
|
static boolean |
S2EdgeUtil.clipToPaddedFace(S2Point aXyz,
S2Point bXyz,
int face,
double padding,
R2Vector aUv,
R2Vector bUv) |
As S2EdgeUtil.clipToFace(S2Point, S2Point, int, R2Vector, R2Vector), but rather than clipping to
the square [-1,1]x[-1,1] in (u,v) space, this method clips to [-R,R]x[-R,R] where
R=(1+padding).
|
boolean |
R2Rect.contains(R2Vector p) |
Returns true if this rectangle contains the given point.
|
double |
R2Vector.crossProd(R2Vector that) |
Returns the cross product of this vector with that vector.
|
double |
R2Vector.dotProd(R2Vector that) |
Returns the dot product of this vector with that vector.
|
static double |
R2Vector.dotProd(R2Vector p1,
R2Vector p2) |
Returns the dot product of the given vectors.
|
R2Rect |
R2Rect.expanded(R2Vector margin) |
Return a rectangle that has been expanded on each side in the x-direction by margin.x(), and on
each side in the y-direction by margin.y().
|
static S2Point |
S2Projections.faceUvToXyz(int face,
R2Vector uv) |
Convert (face, u, v) coordinates to a direction vector (not necessarily unit length).
|
static R2Rect |
R2Rect.fromCenterSize(R2Vector center,
R2Vector size) |
Returns a new rectangle from a center point and size in each dimension.
|
static R2Rect |
R2Rect.fromPoint(R2Vector p) |
Returns a rectangle containing a single point.
|
static R2Rect |
R2Rect.fromPointPair(R2Vector p1,
R2Vector p2) |
Returns the minimal bounding rectangle containing the two given points.
|
boolean |
R2Rect.interiorContains(R2Vector p) |
Returns true if and only if the given point is contained in the interior of the region (i.e.
|
boolean |
R2Vector.lessThan(R2Vector that) |
Returns true if this vector is less than that vector, with the x-axis as the primary sort key
and the y-axis as the secondary sort key.
|
static R2Vector |
R2Vector.mul(R2Vector p,
double m) |
Returns the element-wise multiplication of p1 and p2, e.g.
|
static R2Vector |
R2Vector.normalize(R2Vector vector) |
Returns a new vector scaled to magnitude 1, or a copy of the original vector if magnitude was
0.
|
static int |
S2.planarCCW(R2Vector a,
R2Vector b) |
Returns +1 if the edge AB is CCW around the origin, -1 if its clockwise, and 0 if the result is
indeterminate.
|
static int |
S2.planarOrderedCCW(R2Vector a,
R2Vector b,
R2Vector c) |
|
static R2Vector |
R2Vector.sub(R2Vector p1,
R2Vector p2) |
Returns the vector result of p1 - p2.
|