class Triangle extends AnyRef
- Alphabetic
- By Inheritance
- Triangle
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Triangle(p0: Coordinate, p1: Coordinate, p2: Coordinate)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def area: Double
Computes the 2D area of this triangle.
Computes the 2D area of this triangle. The area value is always non-negative.
return the area of this triangle
- See also
#signedArea()
- def area3D: Double
Computes the 3D area of this triangle.
Computes the 3D area of this triangle. The value computed is always non-negative.
return the 3D area of this triangle
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def centroid: Coordinate
Computes the centroid (centre of mass) of this triangle.
Computes the centroid (centre of mass) of this triangle. This is also the point at which the triangle's three medians intersect (a triangle median is the segment from a vertex of the triangle to the midpoint of the opposite side). The centroid divides each median in a ratio of 2:1.
The centroid always lies within the triangle.
return the centroid of this triangle
- def circumcentre: Coordinate
Computes the circumcentre of this triangle.
Computes the circumcentre of this triangle. The circumcentre is the centre of the circumcircle, the smallest circle which encloses the triangle. It is also the common intersection point of the perpendicular bisectors of the sides of the triangle, and is the only point which has equal distance to all three vertices of the triangle.
The circumcentre does not necessarily lie within the triangle.
This method uses an algorithm due to J.R.Shewchuk which uses normalization to the origin to improve the accuracy of computation. (See Lecture Notes on Geometric Robustness, Jonathan Richard Shewchuk, 1999).
return the circumcentre of this triangle
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def inCentre: Coordinate
Computes the incentre of this triangle.
Computes the incentre of this triangle. The incentre of a triangle is the point which is equidistant from the sides of the triangle. It is also the point at which the bisectors of the triangle's angles meet. It is the centre of the triangle's incircle, which is the unique circle that is tangent to each of the triangle's three sides.
return the point which is the inCentre of this triangle
- def interpolateZ(p: Coordinate): Double
Computes the Z-value (elevation) of an XY point on a three-dimensional plane defined by this triangle (whose vertices must have Z-values).
Computes the Z-value (elevation) of an XY point on a three-dimensional plane defined by this triangle (whose vertices must have Z-values). This triangle must not be degenerate (in other words, the triangle must enclose a non-zero area), and must not be parallel to the Z-axis.
This method can be used to interpolate the Z-value of a point inside this triangle (for example, of a TIN facet with elevations on the vertices).
- p
the point to compute the Z-value of return the computed Z-value (elevation) of the point
- def isAcute: Boolean
Tests whether this triangle is acute.
Tests whether this triangle is acute. A triangle is acute iff all interior angles are acute. This is a strict test - right triangles will return false A triangle which is not acute is either right or obtuse.
Note: this implementation is not robust for angles very close to 90 degrees.
return true if this triangle is acute
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def longestSideLength: Double
Computes the length of the longest side of this triangle
Computes the length of the longest side of this triangle
return the length of the longest side of this triangle
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- var p0: Coordinate
- var p1: Coordinate
- var p2: Coordinate
- def signedArea: Double
Computes the signed 2D area of this triangle.
Computes the signed 2D area of this triangle. The area value is positive if the triangle is oriented CW, and negative if it is oriented CCW.
The signed area value can be used to determine point orientation, but the implementation in this method is susceptible to round-off errors. Use {link Orientation#index(Coordinate, Coordinate, Coordinate)} for robust orientation calculation.
return the signed 2D area of this triangle
- See also
Orientation#index(Coordinate, Coordinate, Coordinate)
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()