ProGAL.geom2d
Class Triangle

java.lang.Object
  extended by ProGAL.geom2d.Triangle
All Implemented Interfaces:
Shape
Direct Known Subclasses:
Triangle

public class Triangle
extends java.lang.Object
implements Shape


Constructor Summary
Triangle(Point p1, Point p2, Point p3)
           
 
Method Summary
 double getAltitude(int i)
           
 Point getCenter()
          Get the geometric center of the shape.
 Circle getCircumCircle()
           
 Point getCorner(int i)
           
 double getCos(int i)
          returns the cosinus of the angle opposite to the vertex with vertex i
 boolean inCircumCircle(Point s)
           
static void main(java.lang.String[] args)
           
 void setCorner(Point p, int i)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Triangle

public Triangle(Point p1,
                Point p2,
                Point p3)
Method Detail

getCorner

public Point getCorner(int i)

setCorner

public void setCorner(Point p,
                      int i)

getAltitude

public double getAltitude(int i)

getCenter

public Point getCenter()
Description copied from interface: Shape
Get the geometric center of the shape. The center of a shape can be interpreted in many ways (center of mass, circumcenter, inscribed center etc.). No strict requirement is given here, but typically the circumcenter should be supplied. This method is most prominently used to find the average center-position of a collection of shapes such that scene-viewers can be centered on the scene.

Specified by:
getCenter in interface Shape

getCos

public double getCos(int i)
returns the cosinus of the angle opposite to the vertex with vertex i


getCircumCircle

public Circle getCircumCircle()

inCircumCircle

public boolean inCircumCircle(Point s)

main

public static void main(java.lang.String[] args)