public class Triangle extends Object implements Serializable
Constructor and Description |
---|
Triangle(Point A,
Point B)
creates a half plane using the segment (A,B).
|
Triangle(Point A,
Point B,
Point C)
constructs a triangle form 3 point - store it in counterclockwised order.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Point p)
determinates if this triangle contains the point p.
|
boolean |
containsBoundaryIsOutside(Point p)
determinates if this triangle contains the point p.
|
boolean |
fallInsideCircumcircle(Point[] arrayPoints) |
Point |
getA()
returns the first vertex of this triangle.
|
Triangle |
getAbTriangle()
returns the consecutive triangle which shares this triangle a,b edge.
|
Point |
getB()
returns the second vertex of this triangle.
|
Triangle |
getBcTriangle()
returns the consecutive triangle which shares this triangle b,c edge.
|
BoundingBox |
getBoundingBox() |
Point |
getC()
returns the 3th vertex of this triangle.
|
Triangle |
getCaTriangle()
returns the consecutive triangle which shares this triangle c,a edge.
|
int |
getMc()
Modification counter for triangulation fast update
|
double |
getZ(double x,
double y)
compute the Z value for the X,Y values of q. assume this triangle
represent a plane --> q does NOT need to be contained in this triangle.
|
Point |
getZ(Point q)
compute the Z value for the X,Y values of q. assume this triangle
represent a plane --> q does NOT need to be contained in this triangle.
|
boolean |
isCorner(Point p)
Checks if the given point is a corner of this triangle.
|
boolean |
isHalfplane()
returns true iff this triangle is actually a half plane.
|
boolean |
isMark() |
void |
setA(Point a) |
void |
setAbTriangle(Triangle abTriangle) |
void |
setB(Point b) |
void |
setBcTriangle(Triangle bcTriangle) |
void |
setC(Point c) |
void |
setCanext(Triangle canext) |
void |
setHalfplane(boolean halfplane) |
void |
setMark(boolean mark) |
void |
setMc(int mc) |
String |
toString() |
double |
zValue(Point q)
compute the Z value for the X,Y values of q.
|
public Triangle(Point A, Point B, Point C)
public BoundingBox getBoundingBox()
public boolean contains(Point p)
p
- the query pointpublic boolean containsBoundaryIsOutside(Point p)
p
- the query pointpublic boolean isCorner(Point p)
p
- The given point.public boolean fallInsideCircumcircle(Point[] arrayPoints)
public double zValue(Point q)
q
- query point (its Z value is ignored).public double getZ(double x, double y)
x
- x-coordinate of the query point.y
- y-coordinate of the query point.public Point getZ(Point q)
q
- query point (its Z value is ignored).public boolean isMark()
public void setMark(boolean mark)
public int getMc()
public boolean isHalfplane()
public void setHalfplane(boolean halfplane)
public void setMc(int mc)
public Triangle getAbTriangle()
public void setAbTriangle(Triangle abTriangle)
public Triangle getBcTriangle()
public void setBcTriangle(Triangle bcTriangle)
public Triangle getCaTriangle()
public void setCanext(Triangle canext)
public Point getA()
public void setA(Point a)
public Point getB()
public void setB(Point b)
public Point getC()
public void setC(Point c)
Copyright © 2016. All rights reserved.