Class Plane

java.lang.Object
eu.mihosoft.vrl.v3d.Plane

public class Plane extends Object
Represents a plane in 3D space.
Author:
Michael Hoffer <info@michaelhoffer.de>
  • Field Details Link icon

  • Constructor Details Link icon

    • Plane Link icon

      public Plane(Vector3d normal, double dist)
      Constructor. Creates a new plane defined by its normal vector and the distance to the origin.
      Parameters:
      normal - plane normal
      dist - distance from origin
  • Method Details Link icon

    • createFromPoints Link icon

      public static Plane createFromPoints(Vector3d a, Vector3d b, Vector3d c)
      Creates a plane defined by the the specified points.
      Parameters:
      a - first point
      b - second point
      c - third point
      Returns:
      a plane
    • clone Link icon

      public Plane clone()
      Overrides:
      clone in class Object
    • flip Link icon

      public void flip()
      Flips this plane.
    • splitPolygon Link icon

      public void splitPolygon(Polygon polygon, List<Polygon> coplanarFront, List<Polygon> coplanarBack, List<Polygon> front, List<Polygon> back)
      Splits a Polygon by this plane if needed. After that it puts the polygons or the polygon fragments in the appropriate lists (front, back). Coplanar polygons go into either coplanarFront, coplanarBack depending on their orientation with respect to this plane. Polygons in front or back of this plane go into either front or back.
      Parameters:
      polygon - polygon to split
      coplanarFront - "coplanar front" polygons
      coplanarBack - "coplanar back" polygons
      front - front polygons
      back - back polgons