Class Triangle
java.lang.Object
com.sk89q.worldedit.regions.polyhedron.Triangle
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether the given point is above the plane the triangle is in.boolean
Returns whether the given point is above the plane the triangle is in.getEdge
(int index) Returns the triangle's edge with the given index, counter-clockwise.getVertex
(int index) Returns the triangle's vertex with the given index, counter-clockwise.Set the triangle's tag.toString()
-
Constructor Details
-
Triangle
Constructs a triangle with the given vertices (counter-clockwise).- Parameters:
v0
- first vertexv1
- second vertexv2
- third vertex
-
-
Method Details
-
getVertex
Returns the triangle's vertex with the given index, counter-clockwise.- Parameters:
index
- Vertex index. Valid input: 0..2- Returns:
- a vertex
-
getEdge
Returns the triangle's edge with the given index, counter-clockwise.- Parameters:
index
- Edge index. Valid input: 0..2- Returns:
- an edge
-
below
Returns whether the given point is above the plane the triangle is in.- Parameters:
pt
- the point to test- Returns:
- true if the point is below
-
above
Returns whether the given point is above the plane the triangle is in.- Parameters:
pt
- the point to test- Returns:
- true if the point is above
-
tag
Set the triangle's tag.- Parameters:
tag
- the tag- Returns:
- this object
-
toString
-