@JsType(isNative=true, namespace="Cesium", name="Intersections2D") public class Intersections2D extends Object
Constructor and Description |
---|
Intersections2D() |
Modifier and Type | Method and Description |
---|---|
static double[] |
clipTriangleAtAxisAlignedThreshold(double threshold,
boolean keepAbove,
double u0,
double u1,
double u2)
Splits a 2D triangle at given axis-aligned threshold value and returns the resulting polygon on a
given side of the threshold.
|
static double[] |
clipTriangleAtAxisAlignedThreshold(double threshold,
boolean keepAbove,
double u0,
double u1,
double u2,
double[] result)
Splits a 2D triangle at given axis-aligned threshold value and returns the resulting polygon on a
given side of the threshold.
|
static Cartesian3 |
computeBarycentricCoordinates(double x,
double y,
double x1,
double y1,
double x2,
double y2,
double x3,
double y3)
Compute the barycentric coordinates of a 2D position within a 2D triangle.
|
static Cartesian3 |
computeBarycentricCoordinates(double x,
double y,
double x1,
double y1,
double x2,
double y2,
double x3,
double y3,
Cartesian3 result)
Compute the barycentric coordinates of a 2D position within a 2D triangle.
|
static Cartesian2 |
computeLineSegmentLineSegmentIntersection(double x00,
double y00,
double x01,
double y01,
double x10,
double y10,
double x11,
double y11)
Compute the intersection between 2 line segments
|
static Cartesian2 |
computeLineSegmentLineSegmentIntersection(double x00,
double y00,
double x01,
double y01,
double x10,
double y10,
double x11,
double y11,
Cartesian2 result)
Compute the intersection between 2 line segments
|
@JsMethod public static double[] clipTriangleAtAxisAlignedThreshold(double threshold, boolean keepAbove, double u0, double u1, double u2)
threshold
- The threshold coordinate value at which to clip the triangle.keepAbove
- true to keep the portion of the triangle above the threshold, or false to keep the portion below.u0
- The coordinate of the first vertex in the triangle, in counter-clockwise order.u1
- The coordinate of the second vertex in the triangle, in counter-clockwise order.u2
- The coordinate of the third vertex in the triangle, in counter-clockwise order.@JsMethod public static double[] clipTriangleAtAxisAlignedThreshold(double threshold, boolean keepAbove, double u0, double u1, double u2, double[] result)
threshold
- The threshold coordinate value at which to clip the triangle.keepAbove
- true to keep the portion of the triangle above the threshold, or false to keep the portion below.u0
- The coordinate of the first vertex in the triangle, in counter-clockwise order.u1
- The coordinate of the second vertex in the triangle, in counter-clockwise order.u2
- The coordinate of the third vertex in the triangle, in counter-clockwise order.result
- The array into which to copy the result. If this parameter is not supplied, a new array is constructed and returned.@JsMethod public static Cartesian3 computeBarycentricCoordinates(double x, double y, double x1, double y1, double x2, double y2, double x3, double y3)
x
- The x coordinate of the position for which to find the barycentric coordinates.y
- The y coordinate of the position for which to find the barycentric coordinates.x1
- The x coordinate of the triangle's first vertex.y1
- The y coordinate of the triangle's first vertex.x2
- The x coordinate of the triangle's second vertex.y2
- The y coordinate of the triangle's second vertex.x3
- The x coordinate of the triangle's third vertex.y3
- The y coordinate of the triangle's third vertex.@JsMethod public static Cartesian3 computeBarycentricCoordinates(double x, double y, double x1, double y1, double x2, double y2, double x3, double y3, Cartesian3 result)
x
- The x coordinate of the position for which to find the barycentric coordinates.y
- The y coordinate of the position for which to find the barycentric coordinates.x1
- The x coordinate of the triangle's first vertex.y1
- The y coordinate of the triangle's first vertex.x2
- The x coordinate of the triangle's second vertex.y2
- The y coordinate of the triangle's second vertex.x3
- The x coordinate of the triangle's third vertex.y3
- The y coordinate of the triangle's third vertex.result
- The instance into to which to copy the result. If this parameter is undefined, a new instance is created and returned.@JsMethod public static Cartesian2 computeLineSegmentLineSegmentIntersection(double x00, double y00, double x01, double y01, double x10, double y10, double x11, double y11)
x00
- The x coordinate of the first line's first vertex.y00
- The y coordinate of the first line's first vertex.x01
- The x coordinate of the first line's second vertex.y01
- The y coordinate of the first line's second vertex.x10
- The x coordinate of the second line's first vertex.y10
- The y coordinate of the second line's first vertex.x11
- The x coordinate of the second line's second vertex.y11
- The y coordinate of the second line's second vertex.@JsMethod public static Cartesian2 computeLineSegmentLineSegmentIntersection(double x00, double y00, double x01, double y01, double x10, double y10, double x11, double y11, Cartesian2 result)
x00
- The x coordinate of the first line's first vertex.y00
- The y coordinate of the first line's first vertex.x01
- The x coordinate of the first line's second vertex.y01
- The y coordinate of the first line's second vertex.x10
- The x coordinate of the second line's first vertex.y10
- The y coordinate of the second line's first vertex.x11
- The x coordinate of the second line's second vertex.y11
- The y coordinate of the second line's second vertex.result
- The instance into to which to copy the result. If this parameter is undefined, a new instance is created and returned.Copyright © 2019. All rights reserved.