public static class SweepHullDelaunay2D.Triangle
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
a
References to points in Delaunay2D.points
|
int |
ab
References to neighbor triangles
|
int |
b
References to points in Delaunay2D.points
|
int |
bc
References to neighbor triangles
|
int |
c
References to points in Delaunay2D.points
|
int |
ca
References to neighbor triangles
|
double[] |
m
Center double[]
|
double |
r2
Circumcircle parameters
|
Constructor and Description |
---|
Triangle(int x,
int y,
int z)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
copyFrom(SweepHullDelaunay2D.Triangle o)
Copy the values from another triangle.
|
(package private) SweepHullDelaunay2D.Orientation |
findOrientation(SweepHullDelaunay2D.Triangle oth)
Find the orientation of the triangles to each other.
|
boolean |
inCircle(double[] opp)
Test whether a point is within the circumference circle.
|
(package private) boolean |
isClockwise(java.util.List<double[]> points)
Verify that the triangle is clockwise
|
(package private) void |
makeClockwise(java.util.List<double[]> points)
Make the triangle clockwise
|
(package private) void |
replaceEdge(int a,
int b,
int ol,
int ne)
Replace an edge
|
(package private) void |
set(int a,
int ab,
int b,
int bc,
int c,
int ca)
Update the triangle.
|
java.lang.String |
toString() |
private boolean |
updateCircumcircle(java.util.List<double[]> points)
Recompute the location and squared radius of circumcircle.
|
public int a
public int b
public int c
public int ab
public int ca
public int bc
public double r2
public double[] m
public Triangle(int x, int y, int z)
x
- y
- z
- void replaceEdge(int a, int b, int ol, int ne)
a
- First pointb
- Second pointol
- Previous valuene
- New valuevoid set(int a, int ab, int b, int bc, int c, int ca)
a
- First pointab
- Edgeb
- Second pointbc
- Edgec
- Third pointca
- Edgepublic boolean inCircle(double[] opp)
opp
- Test double[]SweepHullDelaunay2D.Orientation findOrientation(SweepHullDelaunay2D.Triangle oth)
oth
- Other trianglevoid makeClockwise(java.util.List<double[]> points)
boolean isClockwise(java.util.List<double[]> points)
void copyFrom(SweepHullDelaunay2D.Triangle o)
o
- object to copy fromprivate boolean updateCircumcircle(java.util.List<double[]> points)
Note: numerical stability is important; and this is not entirely robust to degenerate cases.
Careful: the midpoint of the circumcircle is not the average of the corners!
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2019 ELKI Development Team. License information.