org.osm2world.core.math
Class TriangleXZ

Object
  extended by TriangleXZ

public class TriangleXZ
extends Object


Field Summary
 VectorXZ v1
           
 VectorXZ v2
           
 VectorXZ v3
           
 
Constructor Summary
TriangleXZ(VectorXZ v1, VectorXZ v2, VectorXZ v3)
           
 
Method Summary
 boolean contains(VectorXZ point)
           
 VectorXZ getCenter()
           
 List<VectorXZ> getVertices()
           
 boolean isClockwise()
           
 TriangleXZ makeClockwise()
          returns this triangle if it is counterclockwise, or the reversed triangle if it is clockwise.
 TriangleXZ makeCounterclockwise()
          returns this triangle if it is clockwise, or the reversed triangle if it is counterclockwise.
 TriangleXZ reverse()
          returns an inversed version of this triangle.
 String toString()
           
 TriangleXYZ xyz(double y)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

v1

public final VectorXZ v1

v2

public final VectorXZ v2

v3

public final VectorXZ v3
Constructor Detail

TriangleXZ

public TriangleXZ(VectorXZ v1,
                  VectorXZ v2,
                  VectorXZ v3)
Method Detail

getVertices

public List<VectorXZ> getVertices()

getCenter

public VectorXZ getCenter()

contains

public boolean contains(VectorXZ point)

xyz

public TriangleXYZ xyz(double y)

toString

public String toString()
Overrides:
toString in class Object

isClockwise

public boolean isClockwise()

makeClockwise

public TriangleXZ makeClockwise()
returns this triangle if it is counterclockwise, or the reversed triangle if it is clockwise.


makeCounterclockwise

public TriangleXZ makeCounterclockwise()
returns this triangle if it is clockwise, or the reversed triangle if it is counterclockwise.


reverse

public TriangleXZ reverse()
returns an inversed version of this triangle. It consists of the same vertices, but has the other direction.