org.jzy3d.plot3d.builder.delaunay.jdt
Class Triangle_dt

java.lang.Object
  extended by org.jzy3d.plot3d.builder.delaunay.jdt.Triangle_dt

public class Triangle_dt
extends java.lang.Object

This class represents a 3D triangle in a Triangulation!


Field Summary
static int _c2
           
static int _counter
           
 
Constructor Summary
Triangle_dt(Point_dt A, Point_dt B)
          creates a half plane using the segment (A,B).
Triangle_dt(Point_dt A, Point_dt B, Point_dt C)
          constructs a triangle form 3 point - store it in counterclockwised order.
 
Method Summary
 boolean contains_BoundaryIsOutside(Point_dt p)
          determinates if this triangle contains the point p.
 boolean contains(Point_dt p)
          determinates if this triangle contains the point p.
 boolean fallInsideCircumcircle(Point_dt[] arrayPoints)
           
 BoundingBox getBoundingBox()
           
 boolean isCorner(Point_dt p)
          Checks if the given point is a corner of this triangle.
 boolean isHalfplane()
          returns true iff this triangle is actually a half plane.
 Triangle_dt next_12()
          returns the consecutive triangle which shares this triangle p1,p2 edge.
 Triangle_dt next_23()
          returns the consecutive triangle which shares this triangle p2,p3 edge.
 Triangle_dt next_31()
          returns the consecutive triangle which shares this triangle p3,p1 edge.
 Point_dt p1()
          returns the first vertex of this triangle.
 Point_dt p2()
          returns the second vertex of this triangle.
 Point_dt p3()
          returns the 3th vertex of this triangle.
 java.lang.String toString()
           
 double z_value(Point_dt q)
          compute the Z value for the X,Y values of q.
 double z(double x, double y)
          compute the Z value for the X,Y values of q.
 Point_dt z(Point_dt q)
          compute the Z value for the X,Y values of q.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_counter

public static int _counter

_c2

public static int _c2
Constructor Detail

Triangle_dt

public Triangle_dt(Point_dt A,
                   Point_dt B,
                   Point_dt C)
constructs a triangle form 3 point - store it in counterclockwised order.


Triangle_dt

public Triangle_dt(Point_dt A,
                   Point_dt B)
creates a half plane using the segment (A,B).

Parameters:
A -
B -
Method Detail

isHalfplane

public boolean isHalfplane()
returns true iff this triangle is actually a half plane.


p1

public Point_dt p1()
returns the first vertex of this triangle.


p2

public Point_dt p2()
returns the second vertex of this triangle.


p3

public Point_dt p3()
returns the 3th vertex of this triangle.


next_12

public Triangle_dt next_12()
returns the consecutive triangle which shares this triangle p1,p2 edge.


next_23

public Triangle_dt next_23()
returns the consecutive triangle which shares this triangle p2,p3 edge.


next_31

public Triangle_dt next_31()
returns the consecutive triangle which shares this triangle p3,p1 edge.


getBoundingBox

public BoundingBox getBoundingBox()
Returns:
The bounding rectange between the minimum and maximum coordinates of the triangle

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

contains

public boolean contains(Point_dt p)
determinates 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!!).

contains_BoundaryIsOutside

public boolean contains_BoundaryIsOutside(Point_dt p)
determinates 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!!).

isCorner

public boolean isCorner(Point_dt p)
Checks 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 & Doron Ganel.

fallInsideCircumcircle

public boolean fallInsideCircumcircle(Point_dt[] arrayPoints)

z_value

public double z_value(Point_dt 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.

Parameters:
q - query point (its Z value is ignored).
Returns:
the Z value of this plane implies by this triangle 3 points.

z

public double z(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.

z

public Point_dt z(Point_dt 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.

Parameters:
q - query point (its Z value is ignored).
Returns:
q with updated Z value.