Package il.ac.idc.jdt
Class Triangle
java.lang.Object
il.ac.idc.jdt.Triangle
- All Implemented Interfaces:
- Serializable
This class performs a 3D triangulation for each point inserted or deleted
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleandeterminates if this triangle contains the point p.booleandeterminates if this triangle contains the point p.booleanfallInsideCircumcircle(Point[] arrayPoints) getA()returns the first vertex of this triangle.returns the consecutive triangle which shares this triangle a,b edge.getB()returns the second vertex of this triangle.returns the consecutive triangle which shares this triangle b,c edge.getC()returns the 3th vertex of this triangle.returns the consecutive triangle which shares this triangle c,a edge.intgetMc()Modification counter for triangulation fast updatedoublegetZ(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.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.booleanChecks if the given point is a corner of this triangle.booleanreturns true iff this triangle is actually a half plane.booleanisMark()voidvoidsetAbTriangle(Triangle abTriangle) voidvoidsetBcTriangle(Triangle bcTriangle) voidvoidvoidsetHalfplane(boolean halfplane) voidsetMark(boolean mark) voidsetMc(int mc) toString()doublecompute the Z value for the X,Y values of q.
- 
Constructor Details- 
Triangleconstructs a triangle form 3 point - store it in counterclockwised order.
- 
Trianglecreates a half plane using the segment (A,B).- Parameters:
- A-
- B-
 
 
- 
- 
Method Details- 
getBoundingBox- Returns:
- The bounding rectange between the minimum and maximum coordinates of the triangle
 
- 
toString
- 
containsdeterminates if this triangle contains the point p.- Parameters:
- p- the query point
- Returns:
- true iff p is not null and is inside this triangle (Note: on boundary is considered inside!!).
 
- 
containsBoundaryIsOutsidedeterminates if this triangle contains the point p.- Parameters:
- p- the query point
- Returns:
- true iff p is not null and is inside this triangle (Note: on boundary is considered outside!!).
 
- 
isCornerChecks if the given point is a corner of this triangle.- Parameters:
- p- The given point.
- Returns:
- True iff the given point is a corner of this triangle. By Eyal Roth invalid input: '&' Doron Ganel.
 
- 
fallInsideCircumcircle
- 
zValuecompute 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.- Parameters:
- q- query point (its Z value is ignored).
- Returns:
- the Z value of this plane implies by this triangle 3 points.
 
- 
getZpublic 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.- Parameters:
- x- x-coordinate of the query point.
- y- y-coordinate of the query point.
- Returns:
- z (height) value approximation given by the triangle it falls in.
 
- 
getZcompute 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.- Parameters:
- q- query point (its Z value is ignored).
- Returns:
- q with updated Z value.
 
- 
isMarkpublic boolean isMark()
- 
setMarkpublic void setMark(boolean mark) 
- 
getMcpublic int getMc()Modification counter for triangulation fast update- Returns:
 
- 
isHalfplanepublic boolean isHalfplane()returns true iff this triangle is actually a half plane.
- 
setHalfplanepublic void setHalfplane(boolean halfplane) 
- 
setMcpublic void setMc(int mc) 
- 
getAbTrianglereturns the consecutive triangle which shares this triangle a,b edge.
- 
setAbTriangle
- 
getBcTrianglereturns the consecutive triangle which shares this triangle b,c edge.
- 
setBcTriangle
- 
getCaTrianglereturns the consecutive triangle which shares this triangle c,a edge.
- 
setCanext
- 
getAreturns the first vertex of this triangle.
- 
setA
- 
getBreturns the second vertex of this triangle.
- 
setB
- 
getCreturns the 3th vertex of this triangle.
- 
setC
 
-