net.aerith.misao.util
Class TriangleMatchingSolver.TrianglePosition

java.lang.Object
  |
  +--net.aerith.misao.util.Position
        |
        +--net.aerith.misao.util.TriangleMatchingSolver.TrianglePosition
Enclosing class:
TriangleMatchingSolver

protected class TriangleMatchingSolver.TrianglePosition
extends Position

The TrianglePosition represents a triangle with function to get virtual (x,y) position on a TriangleMap.

When the edge 1 is the longest, the edge 2 is second, and the edge 3 is the shortest, the x value represents the ratio edge 2 to edge 2, the y value represents the ratio edge 3 to edge 2.


Field Summary
protected  Triangle triangle
          The triangle.
 
Fields inherited from class net.aerith.misao.util.Position
x, y
 
Constructor Summary
TriangleMatchingSolver.TrianglePosition(Triangle triangle)
          Constructs a TrianglePosition with a Triangle.
 
Method Summary
 Triangle getTriangle()
          Gets the triangle.
 
Methods inherited from class net.aerith.misao.util.Position
add, getDistanceFrom, getPositionAngleTo, getX, getY, paramString, rescale, setPosition, setX, setY, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

triangle

protected Triangle triangle
The triangle.
Constructor Detail

TriangleMatchingSolver.TrianglePosition

public TriangleMatchingSolver.TrianglePosition(Triangle triangle)
Constructs a TrianglePosition with a Triangle.
Parameters:
triangle - the triangle.
Method Detail

getTriangle

public Triangle getTriangle()
Gets the triangle.
Returns:
the triangle.