org.osm2world.core.math
public class TriangleXZ extends Object implements PolygonShapeXZ, SimpleClosedShapeXZ
Constructor and Description |
---|
TriangleXZ(VectorXZ v1,
VectorXZ v2,
VectorXZ v3) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(VectorXZ point) |
boolean |
equals(Object obj) |
double |
getArea()
returns the area of the triangle
|
VectorXZ |
getCenter() |
Collection<TriangleXZ> |
getTriangulation()
returns a decomposition of the shape into triangles.
|
List<VectorXZ> |
getVertexList()
returns the shape's vertices.
|
int |
hashCode() |
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) |
public List<VectorXZ> getVertexList()
ShapeXZ
getVertexList
in interface ShapeXZ
public VectorXZ getCenter()
public boolean contains(VectorXZ point)
public TriangleXYZ xyz(double y)
public boolean isClockwise()
public TriangleXZ makeClockwise()
public TriangleXZ makeCounterclockwise()
public double getArea()
public TriangleXZ reverse()
public Collection<TriangleXZ> getTriangulation()
SimpleClosedShapeXZ
getTriangulation
in interface SimpleClosedShapeXZ
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object