| Modifier and Type | Field and Description |
|---|---|
| private static final Vector2 | |
| private static final Vector2 | |
| private static final Vector2 |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static boolean | barycoordInsideTriangle(Vector2 barycentric)
Returns true if the barycentric coordinates are inside the triangle. |
| public static boolean | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static Vector2 | |
| public static float | Returns: interpolatedOutReturns an interpolated value given the barycentric coordinates of a point in a triangle and the values at each vertex. |
| public static boolean | |
| public static boolean | |
| public static float | Returns: the lowest positive root or Float.Nanthe first coefficient of the quadric equation a, float the second coefficient of the quadric equation b, float the third coefficient of the quadric equation c)Returns the lowest positive root of the quadric equation given by a * x * x + b * x + c = 0. |
| public static float | polygonArea(float[] polygon, int offset, int count)
Computes the area for a non-self-intersecting polygon. |
| public static Vector2 | polygonCentroid(float[] polygon, int offset, int count, Vector2 centroid)
Returns the centroid for the specified non-self-intersecting polygon. |
| public static Vector2 | quadrilateralCentroid(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, Vector2 centroid)
|
| public static void | |
| public static Vector2 | |
| public static float | |
| public static Vector2 | |
| public static Vector2 | triangleCircumcenter(float x1, float y1, float x2, float y2, float x3, float y3, Vector2 circumcenter)
Returns the circumcenter of the triangle. |
| public static float | triangleCircumradius(float x1, float y1, float x2, float y2, float x3, float y3)
Returns the circumradius of the triangle. |
| public static float | triangleQuality(float x1, float y1, float x2, float y2, float x3, float y3)
Ratio of circumradius to shortest edge as a measure of triangle quality. |
| tmp1 | back to summary |
|---|---|
| private static final Vector2 tmp1 | |
| tmp2 | back to summary |
|---|---|
| private static final Vector2 tmp2 | |
| tmp3 | back to summary |
|---|---|
| private static final Vector2 tmp3 | |
| GeometryUtils | back to summary |
|---|---|
| private GeometryUtils() | |
| barycoordInsideTriangle | back to summary |
|---|---|
| public static boolean barycoordInsideTriangle(Vector2 barycentric) Returns true if the barycentric coordinates are inside the triangle. | |
| colinear | back to summary |
|---|---|
| public static boolean colinear(float x1, float y1, float x2, float y2, float x3, float y3) | |
| ensureCCW | back to summary |
|---|---|
| public static void ensureCCW(float[] polygon) | |
| ensureCCW | back to summary |
|---|---|
| public static void ensureCCW(float[] polygon, int offset, int count) | |
| ensureClockwise | back to summary |
|---|---|
| public static void ensureClockwise(float[] polygon) | |
| ensureClockwise | back to summary |
|---|---|
| public static void ensureClockwise(float[] polygon, int offset, int count) | |
| fromBarycoord | back to summary |
|---|---|
| public static Vector2 fromBarycoord(Vector2 barycentric, Vector2 a, Vector2 b, Vector2 c, Vector2 interpolatedOut) Returns interpolated values given the barycentric coordinates of a point in a triangle and the values at each vertex.
| |
| fromBarycoord | back to summary |
|---|---|
| public static float fromBarycoord(Vector2 barycentric, float a, float b, float c) Returns an interpolated value given the barycentric coordinates of a point in a triangle and the values at each vertex.
| |
| isCCW | back to summary |
|---|---|
| public static boolean isCCW(float[] polygon, int offset, int count) | |
| isClockwise | back to summary |
|---|---|
| public static boolean isClockwise(float[] polygon, int offset, int count) | |
| lowestPositiveRoot | back to summary |
|---|---|
| public static float lowestPositiveRoot(float a, float b, float c) Returns the lowest positive root of the quadric equation given by a * x * x + b * x + c = 0. If no solution is given, Float.NaN is returned.
| |
| polygonArea | back to summary |
|---|---|
| public static float polygonArea(float[] polygon, int offset, int count) Computes the area for a non-self-intersecting polygon. | |
| polygonCentroid | back to summary |
|---|---|
| public static Vector2 polygonCentroid(float[] polygon, int offset, int count, Vector2 centroid) Returns the centroid for the specified non-self-intersecting polygon. The input points must not be colinear. | |
| quadrilateralCentroid | back to summary |
|---|---|
| public static Vector2 quadrilateralCentroid(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, Vector2 centroid) | |
| reverseVertices | back to summary |
|---|---|
| public static void reverseVertices(float[] polygon, int offset, int count) | |
| toBarycoord | back to summary |
|---|---|
| public static Vector2 toBarycoord(Vector2 p, Vector2 a, Vector2 b, Vector2 c, Vector2 barycentricOut) Computes the barycentric coordinates v,w for the specified point in the triangle. The input points must not be colinear. If barycentric.x >= 0 && barycentric.y >= 0 && barycentric.x + barycentric.y <= 1 then the point is inside the triangle. If vertices a,b,c have values aa,bb,cc then to get an interpolated value at point p: GeometryUtils.toBarycoord(p, a, b, c, barycentric); // THEN: float u = 1f - barycentric.x - barycentric.y; float x = u * aa.x + barycentric.x * bb.x + barycentric.y * cc.x; float y = u * aa.y + barycentric.x * bb.y + barycentric.y * cc.y; // OR: GeometryUtils.fromBarycoord(barycentric, aa, bb, cc, out);
| |
| triangleArea | back to summary |
|---|---|
| public static float triangleArea(float x1, float y1, float x2, float y2, float x3, float y3) | |
| triangleCentroid | back to summary |
|---|---|
| public static Vector2 triangleCentroid(float x1, float y1, float x2, float y2, float x3, float y3, Vector2 centroid) | |
| triangleCircumcenter | back to summary |
|---|---|
| public static Vector2 triangleCircumcenter(float x1, float y1, float x2, float y2, float x3, float y3, Vector2 circumcenter) Returns the circumcenter of the triangle. The input points must not be colinear. | |
| triangleCircumradius | back to summary |
|---|---|
| public static float triangleCircumradius(float x1, float y1, float x2, float y2, float x3, float y3) Returns the circumradius of the triangle. The input points must not be colinear. | |
| triangleQuality | back to summary |
|---|---|
| public static float triangleQuality(float x1, float y1, float x2, float y2, float x3, float y3) Ratio of circumradius to shortest edge as a measure of triangle quality. Gary L. Miller, Dafna Talmor, Shang-Hua Teng, and Noel Walkington. A Delaunay Based Numerical Method for Three Dimensions: Generation, Formulation, and Partition. | |