Class TransformationTriangle

java.lang.Object
  |
  +--java.awt.Polygon
        |
        +--Triangle
              |
              +--TransformationTriangle

public class TransformationTriangle
extends Triangle

This class is used to warp the map it stores with it the transformation matrix associated by what the actual triangle should look like, and allows all map points inside this trianghle to be transformed by the matrix...

See Also:
Serialized Form

Fields inherited from class java.awt.Polygon
bounds, npoints, xpoints, ypoints
 
Constructor Summary
TransformationTriangle(intPoint v1, intPoint v2, intPoint v3, int xlab, int ylab, int zlab)
           
TransformationTriangle(Vertex v1, Vertex v2, Vertex v3)
           
 
Method Summary
 chain convert(chain Points)
          Method: convert convert as much of this chain as possible, returning the chain when the current point on the chain no longer lies within the triangle NOTE: this method modifies values in the chain's array of points and the currentpoint value in the chain object.
 boolean isInside(java.awt.geom.Point2D.Double point)
          Method: isInside determine whether a point lies within this triangle
 void setTransformationMatrix(TransformationMatrix tm)
           
 
Methods inherited from class Triangle
display, getXLabel, getYLabel, getZLabel, print, setv2x, setv2y, setv3x, setv3y, v1x, v1y, v2x, v2y, v3x, v3y
 
Methods inherited from class java.awt.Polygon
addPoint, contains, contains, contains, contains, contains, contains, getBoundingBox, getBounds, getBounds2D, getPathIterator, getPathIterator, inside, intersects, intersects, translate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformationTriangle

public TransformationTriangle(Vertex v1,
                              Vertex v2,
                              Vertex v3)

TransformationTriangle

public TransformationTriangle(intPoint v1,
                              intPoint v2,
                              intPoint v3,
                              int xlab,
                              int ylab,
                              int zlab)
Method Detail

setTransformationMatrix

public void setTransformationMatrix(TransformationMatrix tm)

isInside

public boolean isInside(java.awt.geom.Point2D.Double point)
Method: isInside determine whether a point lies within this triangle

convert

public chain convert(chain Points)
Method: convert convert as much of this chain as possible, returning the chain when the current point on the chain no longer lies within the triangle NOTE: this method modifies values in the chain's array of points and the currentpoint value in the chain object.