Point3D class

A 3D point with x, y, z coordinates.

Constructors

Point3D(double x, double y, double z)
const

Properties

hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
x → double
final
y → double
final
z → double
final

Methods

distanceTo(Point3D other) → double
Euclidean distance to another point.
midpoint(Point3D other) → Point3D
Midpoint between this and another point.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override
toVector() → Vector3D
Convert to a position vector (from origin).

Operators

operator +(Vector3D v) → Point3D
Add a vector to get a new point.
operator -(Point3D other) → Vector3D
Subtract another point to get a vector.
operator ==(Object other) → bool
The equality operator.
override

Constants

origin → const Point3D
Origin at (0, 0, 0).