`data class Vector3D: AbstractPoint3D`

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

Fields

Name Description
`val norm: /** L_2 norm of the vector */`

L_2 norm of the vector

`val normSq: /** square norm of the vector */`

square norm of the vector

`val x: Double`

x component (abscissa) of the vector

`val y: Double`

y component (ordinate) of the vector

`val z: Double`

z component (applicate) of the vector

`val affineSequence: AffineSequence3D`

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

## Constructors

### <init>

`constructor(x: Double, y: Double, z: Double, affineSequence: AffineSequence3D)`

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

Parameters

Name Description
`x: Double`

x component (abscissa) of the vector

`y: Double`

y component (ordinate) of the vector

`z: Double`

z component (applicate) of the vector

`affineSequence: AffineSequence3D`

## Methods

### plus

`operator fun plus(v: Vector3D): (v: Vector3D)`

Parameters

Name Description
`v: Vector3D`

ReturnValue

Name Description
`(v: Vector3D)`

### minus

`operator fun minus(v: Vector3D): (v: Vector3D)`

Parameters

Name Description
`v: Vector3D`

ReturnValue

Name Description
`(v: Vector3D)`

### times

`operator fun times(m: Double): Vector3D`

Parameters

Name Description
`m: Double`

ReturnValue

Name Description
`Vector3D`

### div

`operator fun div(m: Double): Vector3D`

Parameters

Name Description
`m: Double`

ReturnValue

Name Description
`Vector3D`

### unaryPlus

`operator fun unaryPlus(): Vector3D`

ReturnValue

Name Description
`Vector3D`

### unaryMinus

`operator fun unaryMinus(): Vector3D`

ReturnValue

Name Description
`Vector3D`

### fuzzyEquals

`fun fuzzyEquals(o: Vector3D, epsilon: Double): Boolean`

Parameters

Name Description
`o: Vector3D`
`epsilon: Double`

ReturnValue

Name Description
`Boolean`

### fuzzyUnequals

`fun fuzzyUnequals(o: Vector3D, epsilon: Double): Boolean`

Parameters

Name Description
`o: Vector3D`
`epsilon: Double`

ReturnValue

Name Description
`Boolean`

### scalarMultiply

`fun scalarMultiply(factor: Double): Vector3D`

Returns the scalar product of this with the factor.

Parameters

Name Description
`factor: Double`

ReturnValue

Name Description
`Vector3D`

### scalarDivide

`fun scalarDivide(divisor: Double): Vector3D`

Returns the scalar division of this with the divisor.

Parameters

Name Description
`divisor: Double`

ReturnValue

Name Description
`Vector3D`

### dotProduct

`fun dotProduct(other: Vector3D): Double`

Returns the dot product of this with the other.

Parameters

Name Description
`other: Vector3D`

ReturnValue

Name Description
`Double`

### crossProduct

`fun crossProduct(other: Vector3D): Vector3D`

Returns the cross product of this with the other.

Parameters

Name Description
`other: Vector3D`

ReturnValue

Name Description
`Vector3D`

### normalized

`fun normalized(): Vector3D`

Returns the normalized vector.

ReturnValue

Name Description
`Vector3D`

### angle

`fun angle(other: Vector3D): Double`

Returns the angle between the other vector and this vector.

Parameters

Name Description
`other: Vector3D`

ReturnValue

Name Description
`Double`

### distance

`fun distance(other: Vector3D): Double`

Returns the distance between the other vector and this vector.

Parameters

Name Description
`other: Vector3D`

ReturnValue

Name Description
`Double`

### isZero

`fun isZero(): Boolean`

Returns true, if each component is zero.

ReturnValue

Name Description
`Boolean`

### calculatePointLocalCS

`fun calculatePointLocalCS(): Vector3D`

Returns the point in the local coordinate system.

ReturnValue

Name Description
`Vector3D`

### accept

`fun accept(visitor: Geometry3DVisitor)`

Accepting function so that a geometry visitor can pass by.

Parameters

Name Description
`visitor: Geometry3DVisitor`

ReturnValue

Name Description
`Unit`

### toDoubleArray

`fun toDoubleArray(): DoubleArray`

ReturnValue

Name Description
`DoubleArray`

### toDoubleList

`fun toDoubleList(): listOf(x, y, z)`

ReturnValue

Name Description
`listOf(x, y, z)`

### toRealVector

`fun toRealVector(): RealVector`

ReturnValue

Name Description
`RealVector`

### toVector3DCm

`fun toVector3DCm(): this._vector3D`

ReturnValue

Name Description
`this._vector3D`

### toVector3DJOML

`fun toVector3DJOML(): JOMLVector3D(this.x, this.y, this.z)`

ReturnValue

Name Description
`JOMLVector3D(this.x, this.y, this.z)`

### toVector4DJOML

`fun toVector4DJOML(w: Double): JOMLVector4D(this.x, this.y, this.z, w)`

Parameters

Name Description
`w: Double`

ReturnValue

Name Description
`JOMLVector4D(this.x, this.y, this.z, w)`

### toVector2D

`fun toVector2D(dropAxis: Vector3D): Vector2D`

Conversion to a vector in 2D.

Parameters

Name Description
`dropAxis: Vector3D`

axis to be dropped for 2D; selecting the z axis will take the vector (x, y)

ReturnValue

Name Description
`Vector2D`

## CompanionObject

### Vector3D

`data class Vector3D: AbstractPoint3D`

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

Fields

Name Description
`val ZERO: Vector3D`
`val X_AXIS: Vector3D`
`val Y_AXIS: Vector3D`
`val Z_AXIS: Vector3D`

### Methods

#### of

`fun of(x: Double, y: Double, z: Double): Result<Vector3D, IllegalArgumentException>`

Creates a Vector3D, if each component is finite. Otherwise it will return a Result.Error.

Parameters

Name Description
`x: Double`
`y: Double`
`z: Double`

ReturnValue

Name Description
`Result<Vector3D, IllegalArgumentException>`