A point in 3-dimensional space. This implementation supplies common mathematical operations on points.
Constructors
- Point3D(double x, double y, double z)
-
Creates a new Point3D with the given coordinates.
- Point3D.splat(num val)
-
Creates a new Point3D and "splats" the given value to each coordinate.
- Point3D.vec(vec)
-
Creates a new Point3D from given vector3 / vector4.
- Point3D.zero()
-
Creates a new Point3D at the coordinate origin.
Properties
- hashCode → int
-
read-only
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited - x → double
-
read / write
- y → double
-
read / write
- z → double
-
read / write
Operators
-
operator +(
Vector3 v) → Point3D -
Returns a new point which position is determined by moving the old point along the given vector.
-
operator -(
Point3D p2) → Vector3 -
Returns the
Vector3
pointing from the given point to this point. -
operator ==(
Object o) → bool -
Checks for equality. Two points are considered equal, if their coordinates match.
-
operator unary-(
) → Point3D -
Negates the point's components.
Methods
-
lerp(
Point3D p2, num coeff) → Point3D -
Performs a linear interpolation between two points.
-
noSuchMethod(
Invocation invocation) → dynamic -
noSuchMethod
is invoked when users invoke a non-existent method on an object. The name of the method and the arguments of the invocation are passed tonoSuchMethod
in anInvocation
. IfnoSuchMethod
returns a value, that value becomes the result of the original invocation.…inherited -
toString(
) → String -
Returns a string representation of this object.
-
toVec3(
) → Vector3 -
Transforms the point to its vector representation.
-
toVec4(
) → Vector4 -
Transforms the point to its homogeneous vector4 representation. The w component is set to 1.