computational.geometry.meshgeneration
Class Square

java.lang.Object
  extended by computational.geometry.meshgeneration.Square
All Implemented Interfaces:
Shape, java.lang.Cloneable

public class Square
extends java.lang.Object
implements Shape, java.lang.Cloneable


Constructor Summary
Square(MyPoint Origin, MyPoint destination)
           
Square(Square Q)
           
 
Method Summary
 int compareTo(java.lang.Object a)
           
 boolean contains(Point P)
          Tells whether the shape encloses a given point.
 boolean CrossedCollinearTest(boolean E, boolean N, boolean O, boolean S, BasicEdge Ed)
          la funzione sotto serve per determinare se un Edge � collineare ad una combo di lati dello Square
 void draw(java.awt.Graphics gfx)
          Draws the shape, using the current graphics context's color.
 void drawLabels(java.awt.Graphics gfx)
          Draws the shape's associated labels, using the graphics context's color.
 void drawPoints(java.awt.Graphics gfx)
          Draws the shape's defining points, using the graphics context's color.
 BasicEdge[] getBasicEdgeOfBoundary()
           
 MyPoint getDestination()
           
 Edge[] getEdges(java.util.LinkedList PoligonEdgeListofSquare)
           
 java.util.LinkedList getFourMyPoints()
           
 java.util.LinkedList getFourPoints()
           
 java.lang.String getLabel()
          Returns the text label associated to this shape.
 int getLengthEdge()
           
 MyPoint getOrigin()
           
 java.util.List getPoints()
          Returns a list containing copies of the shape's defining points.
 Vertex getSteinerMyPoint()
           
 boolean PointInsideSquare(MyPoint P)
           
 boolean PoligonInterction(java.util.LinkedList PolygonList)
           
 void setDestination(MyPoint D)
           
 void setLabel(java.lang.String label)
          Associates this shape with a given text label.
 void setOrigin(MyPoint O)
           
 java.lang.String toString()
           
 void translate(int dx, int dy)
          Translates the shape by the given amount.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Square

public Square(MyPoint Origin,
              MyPoint destination)

Square

public Square(Square Q)
Method Detail

compareTo

public int compareTo(java.lang.Object a)

contains

public boolean contains(Point P)
Description copied from interface: Shape
Tells whether the shape encloses a given point. To the aims of this test, we consider the shape to be closed, so that a point lying on the shape's boundaries results as enclosed in the shape.

Specified by:
contains in interface Shape
Parameters:
P - the point we test for encloseness.
Returns:
true iff the point is enclosed in the shape.

CrossedCollinearTest

public boolean CrossedCollinearTest(boolean E,
                                    boolean N,
                                    boolean O,
                                    boolean S,
                                    BasicEdge Ed)
la funzione sotto serve per determinare se un Edge � collineare ad una combo di lati dello Square


draw

public void draw(java.awt.Graphics gfx)
Description copied from interface: Shape
Draws the shape, using the current graphics context's color.

Specified by:
draw in interface Shape
Parameters:
gfx - the graphics context where this shape has to be drawn.

drawLabels

public void drawLabels(java.awt.Graphics gfx)
Description copied from interface: Shape
Draws the shape's associated labels, using the graphics context's color.

Specified by:
drawLabels in interface Shape
Parameters:
gfx - the graphics context where this shape's labels have to be drawn.

drawPoints

public void drawPoints(java.awt.Graphics gfx)
Description copied from interface: Shape
Draws the shape's defining points, using the graphics context's color.

Specified by:
drawPoints in interface Shape
Parameters:
gfx - the graphics context where this shape's points have to be drawn.

getBasicEdgeOfBoundary

public BasicEdge[] getBasicEdgeOfBoundary()

getDestination

public MyPoint getDestination()

getEdges

public Edge[] getEdges(java.util.LinkedList PoligonEdgeListofSquare)

getFourMyPoints

public java.util.LinkedList getFourMyPoints()

getFourPoints

public java.util.LinkedList getFourPoints()

getLabel

public java.lang.String getLabel()
Description copied from interface: Shape
Returns the text label associated to this shape.

Specified by:
getLabel in interface Shape
Returns:
the shape's label.

getLengthEdge

public int getLengthEdge()

getOrigin

public MyPoint getOrigin()

getPoints

public java.util.List getPoints()
Description copied from interface: Shape
Returns a list containing copies of the shape's defining points.

Specified by:
getPoints in interface Shape
Returns:
the shape's cloned defining points.

getSteinerMyPoint

public Vertex getSteinerMyPoint()

PointInsideSquare

public boolean PointInsideSquare(MyPoint P)

PoligonInterction

public boolean PoligonInterction(java.util.LinkedList PolygonList)

setDestination

public void setDestination(MyPoint D)

setLabel

public void setLabel(java.lang.String label)
Description copied from interface: Shape
Associates this shape with a given text label.

Specified by:
setLabel in interface Shape
Parameters:
label - the shape's new label.

setOrigin

public void setOrigin(MyPoint O)

toString

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

translate

public void translate(int dx,
                      int dy)
Description copied from interface: Shape
Translates the shape by the given amount.

Specified by:
translate in interface Shape
Parameters:
dx - the amount to translate along the X-axis