|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ProGAL.geom3d.Triangle
public class Triangle
A triangle in (x,y,z)-space represented by the three corner-points.
Constructor Summary | |
---|---|
Triangle(Point[] p)
|
|
Triangle(Point p1,
Point p2,
Point p3)
Construct a triangle using the three specified points as corners |
Method Summary | |
---|---|
Point |
circumcenter()
Return the circumcenter of the triangle. |
double |
circumradius()
Return the circumradius of the triangle. |
Triangle |
clone()
|
boolean |
contains(Point p)
|
double |
getArea()
Return the area of one side of the triangle. |
Point |
getCenter()
Return the center of the triangle. |
Point |
getCorner(int c)
Get the specified corner of this triangle |
int |
getDimension()
Return the 'dimension' of this object. |
Point |
getIntersection(Point p,
Vector dir)
|
Vector |
getNormal()
Return a vector that is normal to this triangle. |
Point |
getP1()
Get the first corner |
Point |
getP2()
Get the second corner |
Point |
getP3()
Get the third corner |
Point |
getPoint(int c)
Get the specified corner-point of this triangle |
Point |
incenter()
|
double |
inradius()
|
void |
toConsole()
Writes this triangle to System.out with 2 decimals precision. |
void |
toConsole(int dec)
Writes this triangle to System.out with dec decimals precision. |
Tetrahedron |
toScene(J3DScene scene,
java.awt.Color clr)
|
java.lang.String |
toString()
Returns a string-representation of this triangle formatted with two decimals precision. |
java.lang.String |
toString(int dec)
Returns a string-representation of this triangle formatted with dec decimals precision. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Triangle(Point p1, Point p2, Point p3)
public Triangle(Point[] p)
Method Detail |
---|
public Point getP1()
public Point getP2()
public Point getP3()
public Point getCorner(int c)
public Point getPoint(int c)
getPoint
in interface Simplex
public int getDimension()
getDimension
in interface Simplex
public Point getCenter()
getCenter
in interface Shape
public double getArea()
public Vector getNormal()
public double circumradius()
public Point circumcenter()
public double inradius()
public Point incenter()
public Point getIntersection(Point p, Vector dir)
public boolean contains(Point p)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(int dec)
dec
decimals precision.
public void toConsole()
System.out
with 2 decimals precision.
public void toConsole(int dec)
System.out
with dec
decimals precision.
public Tetrahedron toScene(J3DScene scene, java.awt.Color clr)
public Triangle clone()
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |