Interface Triangle3D

All Superinterfaces:
ConvexPolygon3D, HyperplaneConvexSubset<Vector3D>, HyperplaneSubset<Vector3D>, PlaneConvexSubset, PlaneSubset, Sized, Splittable<Vector3D,HyperplaneSubset<Vector3D>>
All Known Implementing Classes:
SimpleTriangle3D

public interface Triangle3D extends ConvexPolygon3D
Interface representing a triangle in Euclidean 3D space.
  • Method Details

    • getPoint1

      Vector3D getPoint1()
      The first point in the triangle.
      Returns:
      the first point in the triangle
    • getPoint2

      Vector3D getPoint2()
      The second point in the triangle.
      Returns:
      the second point in the triangle
    • getPoint3

      Vector3D getPoint3()
      The third point in the triangle.
      Returns:
      the third point in the triangle
    • reverse

      Triangle3D reverse()
      Reverse the orientation of the hyperplane for this instance, returning the result as a new instance. The returned subset contains the same points but has a reversed orientation.
      Specified by:
      reverse in interface ConvexPolygon3D
      Specified by:
      reverse in interface HyperplaneConvexSubset<Vector3D>
      Specified by:
      reverse in interface PlaneConvexSubset
      Returns:
      a hyperplane convex subset representing the same region but with the opposite orientation.
    • transform

      Triangle3D transform(Transform<Vector3D> transform)
      Return a new hyperplane subset resulting from the application of the given transform. The current instance is not modified.
      Specified by:
      transform in interface ConvexPolygon3D
      Specified by:
      transform in interface HyperplaneConvexSubset<Vector3D>
      Specified by:
      transform in interface HyperplaneSubset<Vector3D>
      Specified by:
      transform in interface PlaneConvexSubset
      Parameters:
      transform - the transform instance to apply
      Returns:
      new transformed hyperplane subset
    • toTriangles

      default List<Triangle3D> toTriangles()
      Return a list of triangles representing the same subset region as this instance. An IllegalStateException is thrown if the subset has infinite size and therefore cannot be converted to triangles. If the subset has zero size (is empty), an empty list is returned.

      This method simply returns a singleton list containing this object.

      Specified by:
      toTriangles in interface PlaneSubset
      Returns:
      a list of triangles representing the same subset region as this instance