Vector3D

data class Vector3D(val x: Double, val y: Double, val z: Double, val affineSequence: AffineSequence3D = AffineSequence3D.EMPTY) : AbstractPoint3D

Represents a vector in three-dimensional space, whereby its values must be finite.

Parameters

x

x component (abscissa) of the vector

y

y component (ordinate) of the vector

z

z component (applicate) of the vector

Constructors

Link copied to clipboard
constructor(x: Double, y: Double, z: Double, affineSequence: AffineSequence3D = AffineSequence3D.EMPTY)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val affineSequence: AffineSequence3D

List of affine transformation matrices to move and rotate the geometric object.

Link copied to clipboard

L_2 norm of the vector

Link copied to clipboard

square norm of the vector

Link copied to clipboard
val x: Double
Link copied to clipboard
val y: Double
Link copied to clipboard
val z: Double

Functions

Link copied to clipboard
open override fun accept(visitor: Geometry3DVisitor)

Accepting function so that a geometry visitor can pass by.

Link copied to clipboard
fun angle(other: Vector3D): Double

Returns the angle between the other vector and this vector.

Link copied to clipboard

Returns the point in the global coordinate system.

Link copied to clipboard
open override fun calculatePointLocalCS(): Vector3D

Returns the point in the local coordinate system.

Link copied to clipboard

Returns the cross product of this with the other.

Link copied to clipboard
fun distance(other: Vector3D): Double

Returns the distance between the other vector and this vector.

Link copied to clipboard
operator fun div(m: Double): Vector3D
Link copied to clipboard

Returns the dot product of this with the other.

Link copied to clipboard
fun fuzzyEquals(o: Vector3D, tolerance: Double): Boolean
Link copied to clipboard
fun fuzzyUnequals(o: Vector3D, tolerance: Double): Boolean
Link copied to clipboard

Returns true, if each component is zero.

Link copied to clipboard
operator fun minus(v: Vector3D): Vector3D
Link copied to clipboard

Returns the normalized vector.

Link copied to clipboard
operator fun plus(v: Vector3D): Vector3D
Link copied to clipboard

Returns the scalar division of this with the divisor.

Link copied to clipboard

Returns the scalar product of this with the factor.

Link copied to clipboard
operator fun times(m: Double): Vector3D
Link copied to clipboard
Link copied to clipboard
fun toDoubleList(): NonEmptyList<Double>
Link copied to clipboard
Link copied to clipboard
fun toVector2D(dropAxis: Vector3D = Z_AXIS): Vector2D

Conversion to a vector in 2D.

Link copied to clipboard
fun toVector3DCm(): Vector3D
Link copied to clipboard
fun toVector3DJOML(): Vector3d
Link copied to clipboard
fun toVector4DJOML(w: Double = 0.0): Vector4d
Link copied to clipboard
operator fun unaryMinus(): Vector3D
Link copied to clipboard
operator fun unaryPlus(): Vector3D