LineSegment class
Class representing a 3D line segment.
@author {@link https://github.com/Mugen87|Mugen87}
Constructors
- LineSegment([Vector3? from, Vector3? to])
- Constructs a new line segment with the given values.
Properties
Methods
-
at(
double t, Vector3 result) → Vector3 -
Computes a position on the line segment according to the given t value
and stores the result in the given 3D vector. The t value has usually a range of
0, 1where 0 means start position and 1 the end position. -
clone(
) → LineSegment - Creates a new line segment and copies all values from this line segment.
-
closestPointToPoint(
Vector3 point, bool clampToLine, Vector3 result) → Vector3 - Computes the closest point on an infinite line defined by the line segment. It's possible to clamp the closest point so it does not exceed the start and end position of the line segment.
-
closestPointToPointParameter(
Vector3 point, [bool clampToLine = true]) → double - Computes a scalar value which represents the closest point on an infinite line defined by the line segment. It's possible to clamp this value so it does not exceed the start and end position of the line segment.
-
copy(
LineSegment lineSegment) → LineSegment - Copies all values from the given line segment to this line segment.
-
delta(
Vector3 result) → Vector3 - Computes the difference vector between the end and start point of this line segment and stores the result in the given vector.
-
equals(
LineSegment lineSegment) → bool - Returns true if the given line segment is deep equal with this line segment.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
Vector3 from, Vector3 to) → LineSegment - Sets the given values to this line segment.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited