Plane class

A class that represents a plane in a three-dimensional space. Each instance of this class is defined by a Point and a normal Vector.

var point = Point(1, 2, 3);
var normal = Vector(1, 0, 0);
var plane = Plane(point, normal);
print(plane);  // Output: Plane(point: Point(1, 2, 3), normal: Vector(1, 0, 0))

Constructors

Plane.new(Point point, Vector3 normal)
Creates a new instance of the Plane class.

Properties

hashCode int
The hash code for this object.
no setterinherited
isValid bool
no setter
normal Vector3
final
point Point
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

angleBetween(Plane other) Angle
Calculates the angle between this Plane and other in degrees.
containsPoint(Point other) bool
Checks if the Plane contains a Point.
distanceToPoint(Point other) double
Calculates the shortest (perpendicular) distance from a point in space to the plane.
getPerpendicularLine(Point point) Line
Gets the perpendicular line to this plane passing through the given point.
intersectionWithLine(Line line) Point?
Finds the intersection point between a line and the plane. If the line is parallel to the plane and doesn't intersect, it returns null.
intersectionWithPlane(Plane other) Line?
Finds the line of intersection between this Plane and other.
isParallelTo(Plane other) bool
Checks if this Plane is parallel to other.
isPerpendicularTo(Plane other) bool
Checks if this Plane is perpendicular to other.
magnitude() num
Returns the magnitude (or norm) of the normal.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parallelLine({Point? throughPoint, required PlaneType planeType}) Line
Creates a line parallel to this plane.
parallelThroughPoint(Point other) Plane
Creates a new plane parallel to this plane, passing through other.
parallelToOrigin() Line
perpendicularLine(Point pivot) Line
Creates a line perpendicular to this plane, passing through pivot.
perpendicularToOrigin() Line
projectionOfPoint(Point other) Point
Finds the orthogonal projection of a given point onto the plane.
reflectionOfPoint(Point other) Point
Given a point in space, this method finds the point that is the reflection of the given point through the plane.
scaleBy(double scalar) Vector
toString() String
A string representation of this object.
override
translate(Vector3 v) Plane
Translates the plane by a given vector v.

Operators

operator ==(Object other) bool
The equality operator.
inherited