public class Triangle
extends java.lang.Object
Constructor and Description |
---|
Triangle(Vector3 v0,
Vector3 v1,
Vector3 v2)
Constructs a triangle with the given vertices (counter-clockwise).
|
Modifier and Type | Method and Description |
---|---|
boolean |
above(Vector3 pt)
Returns whether the given point is above the plane the triangle is in.
|
boolean |
below(Vector3 pt)
Returns whether the given point is above the plane the triangle is in.
|
Edge |
getEdge(int index)
Returns the triangle's edge with the given index, counter-clockwise.
|
Vector3 |
getVertex(int index)
Returns the triangle's vertex with the given index, counter-clockwise.
|
Triangle |
tag(java.lang.String tag)
Set the triangle's tag.
|
java.lang.String |
toString() |
public Vector3 getVertex(int index)
index
- Vertex index. Valid input: 0..2public Edge getEdge(int index)
index
- Edge index. Valid input: 0..2public boolean below(Vector3 pt)
pt
- the point to testpublic boolean above(Vector3 pt)
pt
- the point to testpublic Triangle tag(java.lang.String tag)
tag
- the tagpublic java.lang.String toString()
toString
in class java.lang.Object