Header menu logo Euclid

AutoOpenVec Module

When Euclid is opened this module will be auto-opened. It only contains extension members for type Vec.

Type extensions

Type extension Description

this.AngleDiamondInXYTo

Full Usage: this.AngleDiamondInXYTo

Parameters:
Returns: float
Modifiers: inline

Returns positive angle for rotating Counter-Clockwise from this vector to vector 'b' . In Diamond Angle. Using only proportion of X to Y components. Range of 0.0 to 4.0 (for 360 Degrees) It is the fastest angle calculation since it does not involve Cosine or ArcTangent functions. For World X-Y plane. Considers only the X and Y components of the vector.

Extended Type: Vec

b : Vec
Returns: float

this.AsPnt

Full Usage: this.AsPnt

Parameters:
    () : unit

Returns: Pnt
Modifiers: inline

Convert 3D vector to 3D point.

Extended Type: Vec

() : unit
Returns: Pnt

this.AsPnt

Full Usage: this.AsPnt

Returns: Pnt
Modifiers: inline

Convert 3D vector to 3D point.

Extended Type: Vec

Returns: Pnt

this.AsVc

Full Usage: this.AsVc

Parameters:
    () : unit

Returns: Vc
Modifiers: inline

Convert 3D vector to 2D vector, discarding the Z value.

Extended Type: Vec

() : unit
Returns: Vc

this.AsVc

Full Usage: this.AsVc

Returns: Vc
Modifiers: inline

Convert 3D vector to 2D vector, discarding the Z value.

Extended Type: Vec

Returns: Vc

this.Cross

Full Usage: this.Cross

Parameters:
Returns: Vec
Modifiers: inline

Cross product, of a 3D vector and a 3D unit-vectors. The resulting vector is perpendicular to both input vectors. The length of this resulting vector is the squared area of the parallelogram spanned by the input vectors. Its direction follows the right-hand rule. A x B = |A| * |B| * sin(angle)

Extended Type: Vec

b : UnitVec
Returns: Vec

this.Cross

Full Usage: this.Cross

Parameters:
Returns: Vec
Modifiers: inline

Cross product, of a 3D unit-vector and a 3D vectors. The resulting vector is perpendicular to both input vectors. The length of this resulting vector is the squared area of the parallelogram spanned by the input vectors. Its direction follows the right-hand rule. A x B = |A| * |B| * sin(angle)

Extended Type: Vec

b : Vec
Returns: Vec

this.Direction180InXY

Full Usage: this.Direction180InXY

Parameters:
    () : unit

Returns: float
Modifiers: inline

Returns the angle in Degrees from X-axis, Ignores orientation. Range 0.0 to 180. For World X-Y plane. Considers only the X and Y components of the vector.

Extended Type: Vec

() : unit
Returns: float

this.Direction180InXY

Full Usage: this.Direction180InXY

Returns: float
Modifiers: inline

Returns the angle in Degrees from X-axis, Ignores orientation. Range 0.0 to 180. For World X-Y plane. Considers only the X and Y components of the vector.

Extended Type: Vec

Returns: float

this.Direction2PiInXY

Full Usage: this.Direction2PiInXY

Parameters:
    () : unit

Returns: float
Modifiers: inline

Returns the angle in Radians from X-axis, Going Counter-Clockwise till two Pi. For World X-Y plane. Considers only the X and Y components of the vector.

Extended Type: Vec

() : unit
Returns: float

this.Direction2PiInXY

Full Usage: this.Direction2PiInXY

Returns: float
Modifiers: inline

Returns the angle in Radians from X-axis, Going Counter-Clockwise till two Pi. For World X-Y plane. Considers only the X and Y components of the vector.

Extended Type: Vec

Returns: float

this.Direction360InXY

Full Usage: this.Direction360InXY

Parameters:
    () : unit

Returns: float
Modifiers: inline

Returns the angle in Degrees from X-axis. Going Counter-Clockwise till 360. For World X-Y plane. Considers only the X and Y components of the vector.

Extended Type: Vec

() : unit
Returns: float

this.Direction360InXY

Full Usage: this.Direction360InXY

Returns: float
Modifiers: inline

Returns the angle in Degrees from X-axis. Going Counter-Clockwise till 360. For World X-Y plane. Considers only the X and Y components of the vector.

Extended Type: Vec

Returns: float

this.DirectionDiamondInXY

Full Usage: this.DirectionDiamondInXY

Parameters:
    () : unit

Returns: float
Modifiers: inline

The diamond angle. Calculates the proportion of X to Y component. It is always positive and in the range of 0.0 to 4.0 (for 360 Degrees) 0.0 = Xaxis, going Counter-Clockwise. It is the fastest angle calculation since it does not involve Cosine or ArcTangent functions. For World X-Y plane. Considers only the X and Y components of the vector.

Extended Type: Vec

() : unit
Returns: float

this.DirectionDiamondInXY

Full Usage: this.DirectionDiamondInXY

Returns: float
Modifiers: inline

The diamond angle. Calculates the proportion of X to Y component. It is always positive and in the range of 0.0 to 4.0 (for 360 Degrees) 0.0 = Xaxis, going Counter-Clockwise. It is the fastest angle calculation since it does not involve Cosine or ArcTangent functions. For World X-Y plane. Considers only the X and Y components of the vector.

Extended Type: Vec

Returns: float

this.DirectionPiInXY

Full Usage: this.DirectionPiInXY

Parameters:
    () : unit

Returns: float
Modifiers: inline

Returns the angle in Radians from X-axis, Ignores orientation. Range 0.0 to Pi. For World X-Y plane. Considers only the X and Y components of the vector.

Extended Type: Vec

() : unit
Returns: float

this.DirectionPiInXY

Full Usage: this.DirectionPiInXY

Returns: float
Modifiers: inline

Returns the angle in Radians from X-axis, Ignores orientation. Range 0.0 to Pi. For World X-Y plane. Considers only the X and Y components of the vector.

Extended Type: Vec

Returns: float

this.Dot

Full Usage: this.Dot

Parameters:
Returns: float
Modifiers: inline

Dot product, or scalar product of two 3D vectors. Returns a float.

Extended Type: Vec

b : Vec
Returns: float

this.Dot

Full Usage: this.Dot

Parameters:
Returns: float
Modifiers: inline

Dot product, or scalar product of a 3D vector with a 3D unit-vector. Returns a float. This float is the projected length of the 3D vector on the direction of the unit-vector.

Extended Type: Vec

b : UnitVec
Returns: float

this.Half

Full Usage: this.Half

Parameters:
    () : unit

Returns: Vec
Modifiers: inline

Returns a new 3D vector with half the length.

Extended Type: Vec

() : unit
Returns: Vec

this.Half

Full Usage: this.Half

Returns: Vec
Modifiers: inline

Returns a new 3D vector with half the length.

Extended Type: Vec

Returns: Vec

this.IsHorizontal

Full Usage: this.IsHorizontal

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Checks if 3D vector is horizontal (Z component is almost zero). The absolute deviation tolerance along Z axis is 1e-9. Fails on vectors shorter than 1e-6.

Extended Type: Vec

() : unit
Returns: bool

this.IsHorizontal

Full Usage: this.IsHorizontal

Returns: bool
Modifiers: inline

Checks if 3D vector is horizontal (Z component is almost zero). The absolute deviation tolerance along Z axis is 1e-9. Fails on vectors shorter than 1e-6.

Extended Type: Vec

Returns: bool

this.IsNotZero

Full Usage: this.IsNotZero

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Returns a boolean indicating if any of X, Y and Z is not exactly 0.0.

Extended Type: Vec

() : unit
Returns: bool

this.IsNotZero

Full Usage: this.IsNotZero

Returns: bool
Modifiers: inline

Returns a boolean indicating if any of X, Y and Z is not exactly 0.0.

Extended Type: Vec

Returns: bool

this.IsOppositeOrientation

Full Usage: this.IsOppositeOrientation

Parameters:
Returns: bool
Modifiers: inline

Checks if the angle between the two 3D vectors is more than 180 degrees. Calculates the dot product of two 3D vectors. Then checks if it is smaller than minus 1e-12. Fails if any of the two vectors is shorter than zeroLengthTolerance (1e-12).

Extended Type: Vec

other : Vec
Returns: bool

this.IsOppositeOrientation

Full Usage: this.IsOppositeOrientation

Parameters:
Returns: bool
Modifiers: inline

Checks if the angle between this 3D vectors and a 3D unit-vector is more than 180 degrees. Calculates the dot product of a 3D vector and a unit-vectors. Then checks if it is smaller than -1e-12. Fails if the vector is shorter than zeroLengthTolerance (1e-12).

Extended Type: Vec

other : UnitVec
Returns: bool

this.IsParallelAndOrientedTo

Full Usage: this.IsParallelAndOrientedTo

Parameters:
Returns: bool
Modifiers: inline

Checks if two 3D vectors are parallel. Takes the line orientation into account too. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minium cosine value. See Euclid.Cosine module. Fails on vectors shorter than UtilEuclid.zeroLengthTolerance (1e-12).

Extended Type: Vec

other : Vec
minCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool

this.IsParallelAndOrientedTo

Full Usage: this.IsParallelAndOrientedTo

Parameters:
Returns: bool
Modifiers: inline

Checks if this 3D vectors and a 3D unit-vector are parallel. Takes the line orientation into account too. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minium cosine value. See Euclid.Cosine module. Fails on vectors shorter than UtilEuclid.zeroLengthTolerance (1e-12).

Extended Type: Vec

other : UnitVec
minCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool

this.IsParallelTo

Full Usage: this.IsParallelTo

Parameters:
Returns: bool
Modifiers: inline

Checks if two 3D vectors are parallel. Ignores the line orientation. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minium cosine value. See Euclid.Cosine module. Fails on vectors shorter than UtilEuclid.zeroLengthTolerance (1e-12).

Extended Type: Vec

other : Vec
minCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool

this.IsParallelTo

Full Usage: this.IsParallelTo

Parameters:
Returns: bool
Modifiers: inline

Checks if this 3D vectors and a 3D unit-vector are parallel. Ignores the line orientation. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minium cosine value. See Euclid.Cosine module. Fails on vectors shorter than UtilEuclid.zeroLengthTolerance (1e-12).

Extended Type: Vec

other : UnitVec
minCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool

this.IsPerpendicularTo

Full Usage: this.IsPerpendicularTo

Parameters:
Returns: bool
Modifiers: inline

Checks if two 3D vectors are perpendicular to each other. The default angle tolerance is 89.75 to 90.25 degrees. This tolerance can be customized by an optional minium cosine value. The default cosine is 0.0043633 ( = 89.75 deg) See Euclid.Cosine module. Fails on vectors shorter than UtilEuclid.zeroLengthTolerance (1e-12).

Extended Type: Vec

other : Vec
maxCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool

this.IsPerpendicularTo

Full Usage: this.IsPerpendicularTo

Parameters:
Returns: bool
Modifiers: inline

Checks if this 3D vectors and a 3D unit-vector are perpendicular to each other. The default angle tolerance is 89.75 to 90.25 degrees. This tolerance can be customized by an optional minium cosine value. The default cosine is 0.0043633 ( = 89.75 deg) See Euclid.Cosine module. Fails on vectors shorter than UtilEuclid.zeroLengthTolerance (1e-12).

Extended Type: Vec

other : UnitVec
maxCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool

this.IsTiny

Full Usage: this.IsTiny

Parameters:
    tol : float

Returns: bool
Modifiers: inline

Check if the 3D vector is shorter than the tolerance. Also checks if any component is a NaN.

Extended Type: Vec

tol : float
Returns: bool

this.IsTinySq

Full Usage: this.IsTinySq

Parameters:
    tol : float

Returns: bool
Modifiers: inline

Check if the 3D vectors square length is shorter than the squared tolerance. Also checks if any component is a NaN.

Extended Type: Vec

tol : float
Returns: bool

this.IsUnit

Full Usage: this.IsUnit

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Test if the 3D vector is a unit-vector. Test if the vectors square length is within 6 float steps of 1.0 So between 0.99999964 and 1.000000715.

Extended Type: Vec

() : unit
Returns: bool

this.IsUnit

Full Usage: this.IsUnit

Returns: bool
Modifiers: inline

Test if the 3D vector is a unit-vector. Test if the vectors square length is within 6 float steps of 1.0 So between 0.99999964 and 1.000000715.

Extended Type: Vec

Returns: bool

this.IsVertical

Full Usage: this.IsVertical

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Checks if 3D vector is parallel to the world Z axis. Ignoring orientation. The absolute deviation tolerance along X and Y axis is 1e-9. Fails on vectors shorter than 1e-6. Same as v.IsZAligned

Extended Type: Vec

() : unit
Returns: bool

this.IsVertical

Full Usage: this.IsVertical

Returns: bool
Modifiers: inline

Checks if 3D vector is parallel to the world Z axis. Ignoring orientation. The absolute deviation tolerance along X and Y axis is 1e-9. Fails on vectors shorter than 1e-6. Same as v.IsZAligned

Extended Type: Vec

Returns: bool

this.IsXAligned

Full Usage: this.IsXAligned

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Checks if 3D vector is parallel to the world X axis. Ignoring orientation. The absolute deviation tolerance along Y and Z axis is 1e-9. Fails on vectors shorter than 1e-6.

Extended Type: Vec

() : unit
Returns: bool

this.IsXAligned

Full Usage: this.IsXAligned

Returns: bool
Modifiers: inline

Checks if 3D vector is parallel to the world X axis. Ignoring orientation. The absolute deviation tolerance along Y and Z axis is 1e-9. Fails on vectors shorter than 1e-6.

Extended Type: Vec

Returns: bool

this.IsYAligned

Full Usage: this.IsYAligned

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Checks if 3D vector is parallel to the world Y axis. Ignoring orientation. The absolute deviation tolerance along X and Z axis is 1e-9. Fails on vectors shorter than 1e-6.

Extended Type: Vec

() : unit
Returns: bool

this.IsYAligned

Full Usage: this.IsYAligned

Returns: bool
Modifiers: inline

Checks if 3D vector is parallel to the world Y axis. Ignoring orientation. The absolute deviation tolerance along X and Z axis is 1e-9. Fails on vectors shorter than 1e-6.

Extended Type: Vec

Returns: bool

this.IsZAligned

Full Usage: this.IsZAligned

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Checks if 3D vector is parallel to the world Z axis. Ignoring orientation. The absolute deviation tolerance along X and Y axis is 1e-9. Fails on vectors shorter than 1e-6. Same as v.IsVertical

Extended Type: Vec

() : unit
Returns: bool

this.IsZAligned

Full Usage: this.IsZAligned

Returns: bool
Modifiers: inline

Checks if 3D vector is parallel to the world Z axis. Ignoring orientation. The absolute deviation tolerance along X and Y axis is 1e-9. Fails on vectors shorter than 1e-6. Same as v.IsVertical

Extended Type: Vec

Returns: bool

this.IsZero

Full Usage: this.IsZero

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Returns a boolean indicating wether X, Y and Z are all exactly 0.0.

Extended Type: Vec

() : unit
Returns: bool

this.IsZero

Full Usage: this.IsZero

Returns: bool
Modifiers: inline

Returns a boolean indicating wether X, Y and Z are all exactly 0.0.

Extended Type: Vec

Returns: bool

this.LengthInXY

Full Usage: this.LengthInXY

Parameters:
    () : unit

Returns: float
Modifiers: inline

Returns the length of the 3D vector projected into World X-Y plane.

Extended Type: Vec

() : unit
Returns: float

this.LengthInXY

Full Usage: this.LengthInXY

Returns: float
Modifiers: inline

Returns the length of the 3D vector projected into World X-Y plane.

Extended Type: Vec

Returns: float

this.LengthSqInXY

Full Usage: this.LengthSqInXY

Parameters:
    () : unit

Returns: float
Modifiers: inline

Returns the squared length of the 3D vector projected into World X-Y plane. The square length is faster to calculate and often good enough for use cases such as sorting vectors by length.

Extended Type: Vec

() : unit
Returns: float

this.LengthSqInXY

Full Usage: this.LengthSqInXY

Returns: float
Modifiers: inline

Returns the squared length of the 3D vector projected into World X-Y plane. The square length is faster to calculate and often good enough for use cases such as sorting vectors by length.

Extended Type: Vec

Returns: float

this.MatchesOrientation

Full Usage: this.MatchesOrientation

Parameters:
Returns: bool
Modifiers: inline

Checks if the angle between the two 3D vectors is less than 180 degrees. Calculates the dot product of two 3D vectors. Then checks if it is bigger than 1e-12. Fails if any of the two vectors is shorter than zeroLengthTolerance (1e-12).

Extended Type: Vec

other : Vec
Returns: bool

this.MatchesOrientation

Full Usage: this.MatchesOrientation

Parameters:
Returns: bool
Modifiers: inline

Checks if the angle between this 3D vectors and a 3D unit-vector is less than 180 degrees. Calculates the dot product of two 3D vectors. Then checks if it is bigger than 1e-12. Fails if the vector is shorter than zeroLengthTolerance (1e-12).

Extended Type: Vec

other : UnitVec
Returns: bool

this.PerpendicularInXY

Full Usage: this.PerpendicularInXY

Parameters:
    () : unit

Returns: Vec
Modifiers: inline

Returns a perpendicular horizontal vector. Rotated counterclockwise. Or Vec.Zero if input is vertical. Just does Vec(-v.Y, v.X, 0.0)

Extended Type: Vec

() : unit
Returns: Vec

this.PerpendicularInXY

Full Usage: this.PerpendicularInXY

Returns: Vec
Modifiers: inline

Returns a perpendicular horizontal vector. Rotated counterclockwise. Or Vec.Zero if input is vertical. Just does Vec(-v.Y, v.X, 0.0)

Extended Type: Vec

Returns: Vec

this.RotateOnZ90CCW

Full Usage: this.RotateOnZ90CCW

Parameters:
    () : unit

Returns: Vec
Modifiers: inline

90 Degree rotation Counter-Clockwise around Z-axis.

Extended Type: Vec

() : unit
Returns: Vec

this.RotateOnZ90CCW

Full Usage: this.RotateOnZ90CCW

Returns: Vec
Modifiers: inline

90 Degree rotation Counter-Clockwise around Z-axis.

Extended Type: Vec

Returns: Vec

this.RotateOnZ90CW

Full Usage: this.RotateOnZ90CW

Parameters:
    () : unit

Returns: Vec
Modifiers: inline

90 Degree rotation clockwise around Z-axis.

Extended Type: Vec

() : unit
Returns: Vec

this.RotateOnZ90CW

Full Usage: this.RotateOnZ90CW

Returns: Vec
Modifiers: inline

90 Degree rotation clockwise around Z-axis.

Extended Type: Vec

Returns: Vec

this.Transform

Full Usage: this.Transform

Parameters:
Returns: Vec
Modifiers: inline

Multiplies a Matrix with a 3D vector. Since a 3D vector represents a direction or an offset in space, but not a location, all translations are ignored. (Homogeneous Vector)

Extended Type: Vec

m : Matrix
Returns: Vec

this.TransformRigid

Full Usage: this.TransformRigid

Parameters:
Returns: Vec
Modifiers: inline

Multiplies (or applies) a RigidMatrix to a 3D vector. Since a 3D vector represents a direction or an offset in space, but not a location, all translations are ignored. (Homogeneous Vector)

Extended Type: Vec

m : RigidMatrix
Returns: Vec

this.Unitized

Full Usage: this.Unitized

Parameters:
    () : unit

Returns: UnitVec
Modifiers: inline

Returns the 3D vector unitized. Fails with EuclidDivByZeroException if the length of the vector is too small (1e-16) to unitize.

Extended Type: Vec

() : unit
Returns: UnitVec

this.Unitized

Full Usage: this.Unitized

Returns: UnitVec
Modifiers: inline

Returns the 3D vector unitized. Fails with EuclidDivByZeroException if the length of the vector is too small (1e-16) to unitize.

Extended Type: Vec

Returns: UnitVec

this.WithLength

Full Usage: this.WithLength

Parameters:
    desiredLength : float

Returns: Vec
Modifiers: inline

Returns a new 3D vector scaled to the desired length. Same as Vec.withLength.

Extended Type: Vec

desiredLength : float
Returns: Vec

this.WithX

Full Usage: this.WithX

Parameters:
    x : float

Returns: Vec
Modifiers: inline

Returns a new 3D vector with new X coordinate, Y and Z stay the same.

Extended Type: Vec

x : float
Returns: Vec

this.WithY

Full Usage: this.WithY

Parameters:
    y : float

Returns: Vec
Modifiers: inline

Returns a new 3D vector with new y coordinate, X and Z stay the same.

Extended Type: Vec

y : float
Returns: Vec

this.WithZ

Full Usage: this.WithZ

Parameters:
    z : float

Returns: Vec
Modifiers: inline

Returns a new 3D vector with new z coordinate, X and Y stay the same.

Extended Type: Vec

z : float
Returns: Vec

Vec.Xaxis()

Full Usage: Vec.Xaxis()

Parameters:
    () : unit

Returns: Vec
Modifiers: inline

Returns the World X-axis with length one: Vec(1, 0, 0)

Extended Type: Vec

() : unit
Returns: Vec

Vec.Xaxis

Full Usage: Vec.Xaxis

Returns: Vec
Modifiers: inline

Returns the World X-axis with length one: Vec(1, 0, 0)

Extended Type: Vec

Returns: Vec

Vec.Yaxis()

Full Usage: Vec.Yaxis()

Parameters:
    () : unit

Returns: Vec
Modifiers: inline

Returns the World Y-axis with length one: Vec(0, 1, 0)

Extended Type: Vec

() : unit
Returns: Vec

Vec.Yaxis

Full Usage: Vec.Yaxis

Returns: Vec
Modifiers: inline

Returns the World Y-axis with length one: Vec(0, 1, 0)

Extended Type: Vec

Returns: Vec

Vec.Zaxis()

Full Usage: Vec.Zaxis()

Parameters:
    () : unit

Returns: Vec
Modifiers: inline

Returns the World Z-axis with length one: Vec(0, 0, 1)

Extended Type: Vec

() : unit
Returns: Vec

Vec.Zaxis

Full Usage: Vec.Zaxis

Returns: Vec
Modifiers: inline

Returns the World Z-axis with length one: Vec(0, 0, 1)

Extended Type: Vec

Returns: Vec

Vec.add a b

Full Usage: Vec.add a b

Parameters:
Returns: Vec
Modifiers: inline

Add two 3D vectors together. Returns a new 3D vector.

Extended Type: Vec

a : Vec
b : Vec
Returns: Vec

Vec.angle180 a b

Full Usage: Vec.angle180 a b

Parameters:
Returns: float
Modifiers: inline

Returns positive angle between two 3D vectors in Degrees. Takes vector orientation into account, Range 0 to 180 Degrees.

Extended Type: Vec

a : Vec
b : Vec
Returns: float

Vec.angle2PiInXY (a, b)

Full Usage: Vec.angle2PiInXY (a, b)

Parameters:
Returns: float
Modifiers: inline

Returns positive angle from vector 'a' to vector 'b' projected in X-Y plane. In Radians. Considering Counter-Clockwise rotation round the World Zaxis. Range: 0.0 to 2 Pi ( = 0 to 360 Degrees)

Extended Type: Vec

a : Vec
b : Vec
Returns: float

Vec.angle360InXY (a, b)

Full Usage: Vec.angle360InXY (a, b)

Parameters:
Returns: float
Modifiers: inline

Returns positive angle of two 3D vector projected in X-Y plane. In Degrees. Considering positive rotation round the World Z-axis. Range: 0 to 360 Degrees.

Extended Type: Vec

a : Vec
b : Vec
Returns: float

Vec.angle90 a b

Full Usage: Vec.angle90 a b

Parameters:
Returns: float
Modifiers: inline

Returns positive angle between two 3D vectors in Degrees. Ignores vector orientation, Range: 0 to 90 Degrees.

Extended Type: Vec

a : Vec
b : Vec
Returns: float

Vec.angleDiamondInXY (a, b)

Full Usage: Vec.angleDiamondInXY (a, b)

Parameters:
Returns: float
Modifiers: inline

Returns positive angle for rotating Counter-Clockwise from vector 'a' to vector 'b' . In Diamond Angle. Using only proportion of X to Y components. Range of 0.0 to 4.0 (for 360 Degrees) It is the fastest angle calculation since it does not involve Cosine or ArcTangent functions. For World X-Y plane. Considers only the X and Y components of the vector.

Extended Type: Vec

a : Vec
b : Vec
Returns: float

Vec.angleHalfPi a b

Full Usage: Vec.angleHalfPi a b

Parameters:
Returns: float
Modifiers: inline

Returns positive angle between two 3D vectors in Radians. Ignores vector orientation, Range: 0.0 to Pi/2 ( = 0 to 90 Degrees)

Extended Type: Vec

a : Vec
b : Vec
Returns: float

Vec.anglePi a b

Full Usage: Vec.anglePi a b

Parameters:
Returns: float
Modifiers: inline

Returns positive angle between two 3D vectors in Radians. Takes vector orientation into account, Range 0.0 to Pi( = 0 to 180 Degree).

Extended Type: Vec

a : Vec
b : Vec
Returns: float

Vec.areParallel other v

Full Usage: Vec.areParallel other v

Parameters:
Returns: bool
Modifiers: inline

Checks if Angle between two vectors is Below 0.25 Degree. Ignores vector orientation. Fails on zero length vectors, tolerance 1e-12.

Extended Type: Vec

other : Vec
v : Vec
Returns: bool

Vec.areParallelAndMatchOrientation other v

Full Usage: Vec.areParallelAndMatchOrientation other v

Parameters:
Returns: bool
Modifiers: inline

Checks if Angle between two vectors is between 98.75 and 90.25 Degree. Ignores vector orientation. Fails on zero length vectors, tolerance 1e-12.

Extended Type: Vec

other : Vec
v : Vec
Returns: bool

Vec.arePerpendicular other v

Full Usage: Vec.arePerpendicular other v

Parameters:
Returns: bool
Modifiers: inline

Checks if Angle between two vectors is between 98.75 and 90.25 Degree. Ignores vector orientation. Fails on zero length vectors, tolerance 1e-12.

Extended Type: Vec

other : Vec
v : Vec
Returns: bool

Vec.asPnt v

Full Usage: Vec.asPnt v

Parameters:
Returns: Pnt
Modifiers: inline

Convert 3D vector to 3D point.

Extended Type: Vec

v : Vec
Returns: Pnt

Vec.asPt v

Full Usage: Vec.asPt v

Parameters:
Returns: Pt
Modifiers: inline

Convert 3D vector to 2D point by ignoring Z value.

Extended Type: Vec

v : Vec
Returns: Pt

Vec.asVc v

Full Usage: Vec.asVc v

Parameters:
Returns: Vc
Modifiers: inline

Convert 3D vector to 2D vector by ignoring Z value.

Extended Type: Vec

v : Vec
Returns: Vc

Vec.bisector a b

Full Usage: Vec.bisector a b

Parameters:
Returns: Vec
Modifiers: inline

Returns a (not unitized) bisector vector in the middle direction. Code : a.Unitized + b.Unitized.

Extended Type: Vec

a : Vec
b : Vec
Returns: Vec

Vec.create (x, y, z)

Full Usage: Vec.create (x, y, z)

Parameters:
    x : float
    y : float
    z : float

Returns: Vec
Modifiers: inline

Returns a new 3D vector from X, Y and Z parts.

Extended Type: Vec

x : float
y : float
z : float
Returns: Vec

Vec.create (start, ende)

Full Usage: Vec.create (start, ende)

Parameters:
Returns: Vec
Modifiers: inline

Returns a new 3D vector from start and end point.

Extended Type: Vec

start : Pnt
ende : Pnt
Returns: Vec

Vec.createFromMembersXYZ vec

Full Usage: Vec.createFromMembersXYZ vec

Parameters:
    vec : ^T

Returns: Vec
Modifiers: inline
Type parameters: ^T, ^a, ^b, ^c

Accepts any type that has a X, Y and Z (UPPERCASE) member that can be converted to a float. Internally this is not using reflection at runtime but F# Statically Resolved Type Parameters at compile time.

Extended Type: Vec

vec : ^T
Returns: Vec

Vec.createFromMembersxyz vec

Full Usage: Vec.createFromMembersxyz vec

Parameters:
    vec : ^T

Returns: Vec
Modifiers: inline
Type parameters: ^T, ^a, ^b, ^c

Accepts any type that has a x, y and z (lowercase) member that can be converted to a float. Internally this is not using reflection at runtime but F# Statically Resolved Type Parameters at compile time.

Extended Type: Vec

vec : ^T
Returns: Vec

Vec.createFromPnt pt

Full Usage: Vec.createFromPnt pt

Parameters:
Returns: Vec
Modifiers: inline

Create 3D vector from 3D point.

Extended Type: Vec

pt : Pnt
Returns: Vec

Vec.createFromUnitVec v

Full Usage: Vec.createFromUnitVec v

Parameters:
Returns: Vec
Modifiers: inline

Create 3D vector from 3D unit-vector.

Extended Type: Vec

v : UnitVec
Returns: Vec

Vec.createFromVcWithZ z v

Full Usage: Vec.createFromVcWithZ z v

Parameters:
    z : float
    v : Vc

Returns: Vec
Modifiers: inline

Returns a 3D vector from z value and 2D vector.

Extended Type: Vec

z : float
v : Vc
Returns: Vec

Vec.cross (a, b)

Full Usage: Vec.cross (a, b)

Parameters:
Returns: Vec
Modifiers: inline

Cross product, of a 3D unit-vectors an a 3D vector. It is also known as the Determinant, Wedge Product or Outer Product. The resulting vector is perpendicular to both input vectors. The length of this resulting vector is the squared area of the parallelogram spanned by the input vectors. Its direction follows the right-hand rule. A x B = |A| * |B| * sin(angle)

Extended Type: Vec

a : UnitVec
b : Vec
Returns: Vec

Vec.cross (a, b)

Full Usage: Vec.cross (a, b)

Parameters:
Returns: Vec
Modifiers: inline

Cross product, of a 3D vector and a 3D unit-vectors. It is also known as the Determinant, Wedge Product or Outer Product. The resulting vector is perpendicular to both input vectors. The length of this resulting vector is the squared area of the parallelogram spanned by the input vectors. Its direction follows the right-hand rule. A x B = |A| * |B| * sin(angle)

Extended Type: Vec

a : Vec
b : UnitVec
Returns: Vec

Vec.determinant (u, v, w)

Full Usage: Vec.determinant (u, v, w)

Parameters:
Returns: float
Modifiers: inline

Returns three vector's Determinant. This is also the signed volume of the Parallelepipeds define by these three vectors. Also called scalar triple product, mixed product, Box product, or in German: Spatprodukt. It is defined as the dot product of one of the vectors with the Cross Product of the other two.

Extended Type: Vec

u : Vec
v : Vec
w : Vec
Returns: float

Vec.difference a b

Full Usage: Vec.difference a b

Parameters:
Returns: float
Modifiers: inline

Returns the distance between the tips of two 3D vectors.

Extended Type: Vec

a : Vec
b : Vec
Returns: float

Vec.differenceSq a b

Full Usage: Vec.differenceSq a b

Parameters:
Returns: float
Modifiers: inline

Returns the squared distance between the tips of two 3D vectors. This operation is slightly faster than Vec.difference and sufficient for many algorithms like finding closest vectors.

Extended Type: Vec

a : Vec
b : Vec
Returns: float

Vec.direction2PiInXY v

Full Usage: Vec.direction2PiInXY v

Parameters:
Returns: float
Modifiers: inline

Returns positive angle of 3D vector in World X-Y plane. Counter-Clockwise from X-axis. In Radians. Range: 0.0 to 2 Pi ( = 0 to 360 Degrees) For World X-Y plane. Considers only the X and Y components of the vector.

Extended Type: Vec

v : Vec
Returns: float

Vec.direction360InXY v

Full Usage: Vec.direction360InXY v

Parameters:
Returns: float
Modifiers: inline

Returns positive angle of 3D vector in World X-Y plane. Counter-Clockwise from X-axis. In Degree. Range: 0.0 to 2 Pi ( = 0 to 360 Degrees) For World X-Y plane. Considers only the X and Y components of the vector.

Extended Type: Vec

v : Vec
Returns: float

Vec.directionDiamondInXY v

Full Usage: Vec.directionDiamondInXY v

Parameters:
Returns: float
Modifiers: inline

The diamond angle. Returns positive angle of 3D vector in World X-Y plane. Calculates the proportion of X to Y component. It is always positive and in the range of 0.0 to 4.0 (for 360 Degrees) 0.0 = Xaxis, going Counter-Clockwise. It is the fastest angle calculation since it does not involve Cosine or ArcTangent functions. For World X-Y plane. Considers only the X and Y components of the vector.

Extended Type: Vec

v : Vec
Returns: float

Vec.dot (a, b)

Full Usage: Vec.dot (a, b)

Parameters:
Returns: float
Modifiers: inline

Dot product, or scalar product of a 3D unit-vector with a 3D vector. Returns a float. This float is the projected length of the 3D vector on the direction of the unit-vector.

Extended Type: Vec

a : UnitVec
b : Vec
Returns: float

Vec.dot (a, b)

Full Usage: Vec.dot (a, b)

Parameters:
Returns: float
Modifiers: inline

Dot product, or scalar product of a 3D vector with a 3D unit-vector. Returns a float. This float is the projected length of the 3D vector on the direction of the unit-vector.

Extended Type: Vec

a : Vec
b : UnitVec
Returns: float

Vec.equals tol a b

Full Usage: Vec.equals tol a b

Parameters:
Returns: bool
Modifiers: inline

Checks if two 3D vectors are equal within tolerance. Identical vectors in opposite directions are not considered equal. Use a tolerance of 0.0 to check for an exact match.

Extended Type: Vec

tol : float
a : Vec
b : Vec
Returns: bool

Vec.flip v

Full Usage: Vec.flip v

Parameters:
Returns: Vec
Modifiers: inline

Negate or inverse a 3D vectors. Returns a new 3D vector. Same as Vec.reverse.

Extended Type: Vec

v : Vec
Returns: Vec

Vec.flipToPointUp v

Full Usage: Vec.flipToPointUp v

Parameters:
Returns: Vec
Modifiers: inline

Flips the vector if Z part is smaller than 0.0

Extended Type: Vec

v : Vec
Returns: Vec

Vec.getX v

Full Usage: Vec.getX v

Parameters:
Returns: float
Modifiers: inline

Gets the X part of this 3D vector.

Extended Type: Vec

v : Vec
Returns: float

Vec.getY v

Full Usage: Vec.getY v

Parameters:
Returns: float
Modifiers: inline

Gets the Y part of this 3D vector.

Extended Type: Vec

v : Vec
Returns: float

Vec.getZ v

Full Usage: Vec.getZ v

Parameters:
Returns: float
Modifiers: inline

Gets the Z part of this 3D vector.

Extended Type: Vec

v : Vec
Returns: float

Vec.intersection (ptA, ptB, vA, vB, tooShortTolerance, relAngleDiscriminant)

Full Usage: Vec.intersection (ptA, ptB, vA, vB, tooShortTolerance, relAngleDiscriminant)

Parameters:
    ptA : Pnt - The start point of the first line.
    ptB : Pnt - The start point of the second line.
    vA : Vec - The vector of the first line.
    vB : Vec - The vector of the second line.
    tooShortTolerance : float - Is an optional length tolerance. 1e-6 by default. If one or both vectors are shorter than this ValueNone is returned.
    relAngleDiscriminant : float<MeasureProduct<relAngDiscr, MeasureOne>> - This is an optional tolerance for the internally calculated relative Angle Discriminant. The default value corresponds to approx 0.25 degree. Below this angle vectors are considered parallel. Use the module Euclid.UtilEuclid.RelAngleDiscriminant to set another tolerance here.

Returns: ValueOption<float * float> For (almost) zero length or (almost) parallel vectors: ValueNone Else ValueSome with a tuple of the parameters at which the two infinite 2D lines intersect to each other. The tuple's order corresponds to the input order.
Modifiers: inline

Intersects two infinite 3D lines. The lines are defined by a start point and a vector. 'ValueNone' is returned, if the angle between the vectors is less than 0.25 degrees or any of them is shorter than 1e-6. These tolerances can be adjusted with optional parameters.

Extended Type: Vec

ptA : Pnt

The start point of the first line.

ptB : Pnt

The start point of the second line.

vA : Vec

The vector of the first line.

vB : Vec

The vector of the second line.

tooShortTolerance : float

Is an optional length tolerance. 1e-6 by default. If one or both vectors are shorter than this ValueNone is returned.

relAngleDiscriminant : float<MeasureProduct<relAngDiscr, MeasureOne>>

This is an optional tolerance for the internally calculated relative Angle Discriminant. The default value corresponds to approx 0.25 degree. Below this angle vectors are considered parallel. Use the module Euclid.UtilEuclid.RelAngleDiscriminant to set another tolerance here.

Returns: ValueOption<float * float>

For (almost) zero length or (almost) parallel vectors: ValueNone Else ValueSome with a tuple of the parameters at which the two infinite 2D lines intersect to each other. The tuple's order corresponds to the input order.

Vec.isAngle180Above cosineValue a b

Full Usage: Vec.isAngle180Above cosineValue a b

Parameters:
Returns: bool
Modifiers: inline

Checks if Angle between two vectors is more than given Cosine. Does not ignores vector orientation.The angle between two vectors can be 0 to 180 degrees. Use the Euclid.Cosine module to get some precomputed cosine values. Fails on zero length vectors, tolerance 1e-12.

Extended Type: Vec

cosineValue : float<MeasureProduct<cosine, MeasureOne>>
a : Vec
b : Vec
Returns: bool

Vec.isAngle180Below cosineValue a b

Full Usage: Vec.isAngle180Below cosineValue a b

Parameters:
Returns: bool
Modifiers: inline

Checks if Angle between two vectors is less than given Cosine. Does not ignores vector orientation.The angle between two vectors can be 0 to 180 degrees. Use the Euclid.Cosine module to get some precomputed cosine values Fails on zero length vectors, tolerance 1e-12.

Extended Type: Vec

cosineValue : float<MeasureProduct<cosine, MeasureOne>>
a : Vec
b : Vec
Returns: bool

Vec.isAngle90Above cosineValue a b

Full Usage: Vec.isAngle90Above cosineValue a b

Parameters:
Returns: bool
Modifiers: inline

Checks if Angle between two vectors is more than given Cosine. Ignores vector orientation. The angle between two vectors can be 0 to 90 degrees ignoring their direction. Use the Euclid.Cosine module to get some precomputed cosine values. Fails on zero length vectors, tolerance 1e-12.

Extended Type: Vec

cosineValue : float<MeasureProduct<cosine, MeasureOne>>
a : Vec
b : Vec
Returns: bool

Vec.isAngle90Below cosineValue a b

Full Usage: Vec.isAngle90Below cosineValue a b

Parameters:
Returns: bool
Modifiers: inline

Checks if Angle between two vectors is less than given Cosine. Ignores vector orientation. The angle between two vectors can be 0 to 90 degrees ignoring their direction. Use the Euclid.Cosine module to get some precomputed cosine values Fails on zero length vectors, tolerance 1e-12.

Extended Type: Vec

cosineValue : float<MeasureProduct<cosine, MeasureOne>>
a : Vec
b : Vec
Returns: bool

Vec.isHorizontal v

Full Usage: Vec.isHorizontal v

Parameters:
Returns: bool
Modifiers: inline

Checks if line is horizontal (Z component is almost zero). Tolerance is 1e-6. Fails on lines shorter than 1e-6.

Extended Type: Vec

v : Vec
Returns: bool

Vec.isOppositeOrientation v other

Full Usage: Vec.isOppositeOrientation v other

Parameters:
Returns: bool
Modifiers: inline

Checks if the angle between the two 3D vectors is more than 180 degrees. Calculates the dot product of two 3D vectors. Then checks if it is smaller than minus 1e-12. If any of the two vectors is zero length returns false.

Extended Type: Vec

v : Vec
other : Vec
Returns: bool

Vec.isTiny tol v

Full Usage: Vec.isTiny tol v

Parameters:
    tol : float
    v : Vec

Returns: bool
Modifiers: inline

Check if the 3D vector is shorter than the tolerance. Also checks if any component is a NaN.

Extended Type: Vec

tol : float
v : Vec
Returns: bool

Vec.isTinySq tol v

Full Usage: Vec.isTinySq tol v

Parameters:
    tol : float
    v : Vec

Returns: bool
Modifiers: inline

Check if the 3D vectors square length is shorter than the squared tolerance. Also checks if any component is a NaN.

Extended Type: Vec

tol : float
v : Vec
Returns: bool

Vec.isVertical v

Full Usage: Vec.isVertical v

Parameters:
Returns: bool
Modifiers: inline

Checks if 3D vector is parallel to the world Z axis. Ignoring orientation. Tolerance is 1e-6. Fails on vectors shorter than 1e-6. Same as ln.IsZAligned

Extended Type: Vec

v : Vec
Returns: bool

Vec.isXAligned v

Full Usage: Vec.isXAligned v

Parameters:
Returns: bool
Modifiers: inline

Checks if 3D vector is parallel to the world X axis. Ignoring orientation. Tolerance is 1e-6. Fails on vectors shorter than 1e-6.

Extended Type: Vec

v : Vec
Returns: bool

Vec.isYAligned v

Full Usage: Vec.isYAligned v

Parameters:
Returns: bool
Modifiers: inline

Checks if 3D vector is parallel to the world Y axis. Ignoring orientation. Tolerance is 1e-6. Fails on vectors shorter than 1e-6.

Extended Type: Vec

v : Vec
Returns: bool

Vec.isZAligned v

Full Usage: Vec.isZAligned v

Parameters:
Returns: bool
Modifiers: inline

Checks if 3D vector is parallel to the world Z axis. Ignoring orientation. Tolerance is 1e-6. Fails on vectors shorter than 1e-6. Same as ln.IsVertical

Extended Type: Vec

v : Vec
Returns: bool

Vec.length v

Full Usage: Vec.length v

Parameters:
Returns: float
Modifiers: inline

Returns the length of the 3D vector.

Extended Type: Vec

v : Vec
Returns: float

Vec.lengthInXY v

Full Usage: Vec.lengthInXY v

Parameters:
Returns: float
Modifiers: inline

Returns the vector length projected into X Y Plane. sqrt(v.X * v.X + v.Y * v.Y)

Extended Type: Vec

v : Vec
Returns: float

Vec.lengthSq v

Full Usage: Vec.lengthSq v

Parameters:
Returns: float
Modifiers: inline

Returns the squared length of the 3D vector. The square length is faster to calculate and often good enough for use cases such as sorting vectors by length.

Extended Type: Vec

v : Vec
Returns: float

Vec.lerp (start, ende, rel)

Full Usage: Vec.lerp (start, ende, rel)

Parameters:
    start : Vec
    ende : Vec
    rel : float

Returns: Vec

Linearly interpolates between two vectors. e.g. rel=0.5 will return the middle vector, rel=1.0 the end vector, rel=1.5 a vector half the distance beyond the end vector.

Extended Type: Vec

start : Vec
ende : Vec
rel : float
Returns: Vec

Vec.matchOrientation orientationToMatch vecToFlip

Full Usage: Vec.matchOrientation orientationToMatch vecToFlip

Parameters:
    orientationToMatch : Vec
    vecToFlip : Vec

Returns: Vec
Modifiers: inline

Ensure that the 3D vector has a positive dot product with given 3D orientation vector.

Extended Type: Vec

orientationToMatch : Vec
vecToFlip : Vec
Returns: Vec

Vec.matchUnitVecOrientation orientationToMatch vecToFlip

Full Usage: Vec.matchUnitVecOrientation orientationToMatch vecToFlip

Parameters:
Returns: Vec
Modifiers: inline

Ensure that the 3D vector has a positive dot product with given 3D orientation unit-vector.

Extended Type: Vec

orientationToMatch : UnitVec
vecToFlip : Vec
Returns: Vec

Vec.matchesOrientation v other

Full Usage: Vec.matchesOrientation v other

Parameters:
Returns: bool
Modifiers: inline

Checks if the angle between the two 3D vectors is less than 180 degrees. Calculates the dot product of two 3D vectors. Then checks if it is bigger than 1e-12. If any of the two vectors is zero length returns false.

Extended Type: Vec

v : Vec
other : Vec
Returns: bool

Vec.moveX x v

Full Usage: Vec.moveX x v

Parameters:
    x : float
    v : Vec

Returns: Vec
Modifiers: inline

Add to the X part of this 3D vectors together. Returns a new 3D vector.

Extended Type: Vec

x : float
v : Vec
Returns: Vec

Vec.moveY y v

Full Usage: Vec.moveY y v

Parameters:
    y : float
    v : Vec

Returns: Vec
Modifiers: inline

Add to the Y part of this 3D vectors together. Returns a new 3D vector.

Extended Type: Vec

y : float
v : Vec
Returns: Vec

Vec.moveZ z v

Full Usage: Vec.moveZ z v

Parameters:
    z : float
    v : Vec

Returns: Vec
Modifiers: inline

Add to the Z part of this 3D vectors together. Returns a new 3D vector.

Extended Type: Vec

z : float
v : Vec
Returns: Vec

Vec.notEquals tol a b

Full Usage: Vec.notEquals tol a b

Parameters:
Returns: bool

Check if two 3D vectors are not equal within a given tolerance. Use a tolerance of 0.0 to check if the two vectors are not exactly equal.

Extended Type: Vec

tol : float
a : Vec
b : Vec
Returns: bool

Vec.orientDown v

Full Usage: Vec.orientDown v

Parameters:
Returns: Vec
Modifiers: inline

Reverse vector if Z part is bigger than 0.0

Extended Type: Vec

v : Vec
Returns: Vec

Vec.orientUp v

Full Usage: Vec.orientUp v

Parameters:
Returns: Vec
Modifiers: inline

Reverse vector if Z part is smaller than 0.0

Extended Type: Vec

v : Vec
Returns: Vec

Vec.perpendicularInVerticalPlane v

Full Usage: Vec.perpendicularInVerticalPlane v

Parameters:
Returns: Vec
Modifiers: inline

Returns a vector that is perpendicular to the given vector and in the same vertical Plane. Projected into the X-Y plane input and output vectors are parallel and of same orientation. Not of same length, not unitized. On vertical input vector resulting vector if of zero length.

Extended Type: Vec

v : Vec
Returns: Vec

Vec.perpendicularInXY v

Full Usage: Vec.perpendicularInXY v

Parameters:
Returns: Vec
Modifiers: inline

Returns a perpendicular horizontal vector. Rotated counterclockwise. Just does Vec(-v.Y, v.X, 0.0) On vertical input vector resulting vector if of zero length.

Extended Type: Vec

v : Vec
Returns: Vec

Vec.projectToXYPlane v

Full Usage: Vec.projectToXYPlane v

Parameters:
Returns: Vec
Modifiers: inline

Project vector to World X-Y plane. Use Vc.ofVec to convert to a 2D vector.

Extended Type: Vec

v : Vec
Returns: Vec

Vec.reverse v

Full Usage: Vec.reverse v

Parameters:
Returns: Vec
Modifiers: inline

Negate or inverse a 3D vectors. Returns a new 3D vector. Same as Vec.flip.

Extended Type: Vec

v : Vec
Returns: Vec

Vec.rotateByQuaternion q v

Full Usage: Vec.rotateByQuaternion q v

Parameters:
Returns: Vec
Modifiers: inline

Rotate by Quaternion.

Extended Type: Vec

q : Quaternion
v : Vec
Returns: Vec

Vec.rotateOnZ90CCW v

Full Usage: Vec.rotateOnZ90CCW v

Parameters:
Returns: Vec
Modifiers: inline

90 Degree rotation Counter-Clockwise around Z-axis.

Extended Type: Vec

v : Vec
Returns: Vec

Vec.rotateOnZ90CW v

Full Usage: Vec.rotateOnZ90CW v

Parameters:
Returns: Vec
Modifiers: inline

90 Degree rotation clockwise around Z-axis.

Extended Type: Vec

v : Vec
Returns: Vec

Vec.rotateX angDegree v

Full Usage: Vec.rotateX angDegree v

Parameters:
    angDegree : float
    v : Vec

Returns: Vec
Modifiers: inline

Rotate the 3D vector in Degrees around X-axis, from Y to Z-axis, Counter Clockwise looking from right.

Extended Type: Vec

angDegree : float
v : Vec
Returns: Vec

Vec.rotateXBy r v

Full Usage: Vec.rotateXBy r v

Parameters:
Returns: Vec

Rotate the 3D vector around X-axis, from Y to Z-axis, Counter Clockwise looking from right.

Extended Type: Vec

r : Rotation2D
v : Vec
Returns: Vec

Vec.rotateY angDegree v

Full Usage: Vec.rotateY angDegree v

Parameters:
    angDegree : float
    v : Vec

Returns: Vec
Modifiers: inline

Rotate the 3D vector in Degrees around Y-axis, from Z to X-axis, Counter Clockwise looking from back.

Extended Type: Vec

angDegree : float
v : Vec
Returns: Vec

Vec.rotateYBy r v

Full Usage: Vec.rotateYBy r v

Parameters:
Returns: Vec

Rotate the 3D vector around Y-axis, from Z to X-axis, Counter Clockwise looking from back.

Extended Type: Vec

r : Rotation2D
v : Vec
Returns: Vec

Vec.rotateZ angDegree v

Full Usage: Vec.rotateZ angDegree v

Parameters:
    angDegree : float
    v : Vec

Returns: Vec
Modifiers: inline

Rotate the 3D vector in Degrees around Z-axis, from X to Y-axis, Counter Clockwise looking from top.

Extended Type: Vec

angDegree : float
v : Vec
Returns: Vec

Vec.rotateZBy r v

Full Usage: Vec.rotateZBy r v

Parameters:
Returns: Vec

Rotate the 3D vector around Z-axis, from X to Y-axis, Counter Clockwise looking from top.

Extended Type: Vec

r : Rotation2D
v : Vec
Returns: Vec

Vec.scale f v

Full Usage: Vec.scale f v

Parameters:
    f : float
    v : Vec

Returns: Vec
Modifiers: inline

Multiplies a 3D vector with a scalar, also called scaling a vector. Returns a new 3D vector.

Extended Type: Vec

f : float
v : Vec
Returns: Vec

Vec.slerp (start, ende, rel)

Full Usage: Vec.slerp (start, ende, rel)

Parameters:
    start : Vec
    ende : Vec
    rel : float

Returns: Vec

Spherically interpolates between start and end by amount rel (0.0 to 1.0). The difference between this and linear interpolation (aka, "lerp") is that the vectors are treated as directions rather than points in space. The direction of the returned vector is interpolated by the angle and its magnitude is interpolated between the magnitudes of start and end. Interpolation continues before and after the range of 0.0 and 0.1

Extended Type: Vec

start : Vec
ende : Vec
rel : float
Returns: Vec

Vec.slopeDegrees v

Full Usage: Vec.slopeDegrees v

Parameters:
Returns: float
Modifiers: inline

Returns positive or negative slope of a vector in Degrees. In relation to X-Y plane. Range -90 to +90 Degrees.

Extended Type: Vec

v : Vec
Returns: float

Vec.slopePercent v

Full Usage: Vec.slopePercent v

Parameters:
Returns: float
Modifiers: inline

Returns positive or negative slope of a vector in Percent. In relation to X-Y plane. 100% = 45 Degrees. Returns positive (or negative) Infinity if line is vertical or input has length zero.

Extended Type: Vec

v : Vec
Returns: float

Vec.slopeRadians v

Full Usage: Vec.slopeRadians v

Parameters:
Returns: float
Modifiers: inline

Returns positive or negative slope of a vector in Radians. In relation to X-Y plane. Range -1.57 to +1.57 Radians.

Extended Type: Vec

v : Vec
Returns: float

Vec.transform m v

Full Usage: Vec.transform m v

Parameters:
Returns: Vec
Modifiers: inline

Multiplies a Matrix with a 3D vector Since a 3D vector represents a direction or an offset in space, but not a location, the implicit the 4th dimension is 0.0 so that all translations are ignored. (Homogeneous Vector)

Extended Type: Vec

m : Matrix
v : Vec
Returns: Vec

Vec.transformRigid m v

Full Usage: Vec.transformRigid m v

Parameters:
Returns: Vec
Modifiers: inline

Multiplies (or applies) a RigidMatrix to a 3D vector. Since a 3D vector represents a direction or an offset in space, but not a location, all translations are ignored. (Homogeneous Vector)

Extended Type: Vec

m : RigidMatrix
v : Vec
Returns: Vec

Vec.unitize v

Full Usage: Vec.unitize v

Parameters:
Returns: UnitVec
Modifiers: inline

Returns 3D vector unitized, fails on zero length vectors.

Extended Type: Vec

v : Vec
Returns: UnitVec

Vec.unitizeOrDefault defaultUnitVector v

Full Usage: Vec.unitizeOrDefault defaultUnitVector v

Parameters:
Returns: UnitVec
Modifiers: inline

Unitize 3D vector, if input vector is shorter than 1e-6 the default unit-vector is returned.

Extended Type: Vec

defaultUnitVector : UnitVec
v : Vec
Returns: UnitVec

Vec.withLength desiredLength v

Full Usage: Vec.withLength desiredLength v

Parameters:
    desiredLength : float
    v : Vec

Returns: Vec
Modifiers: inline

Returns a new 3D vector scaled to the desired length. Same as vec.WithLength. Returns a new 3D vector.

Extended Type: Vec

desiredLength : float
v : Vec
Returns: Vec

Vec.withX x v

Full Usage: Vec.withX x v

Parameters:
    x : float
    v : Vec

Returns: Vec
Modifiers: inline

Returns new 3D vector with new X value, Y and Z stay the same.

Extended Type: Vec

x : float
v : Vec
Returns: Vec

Vec.withY y v

Full Usage: Vec.withY y v

Parameters:
    y : float
    v : Vec

Returns: Vec
Modifiers: inline

Returns new 3D vector with new Y value, X and Z stay the same.

Extended Type: Vec

y : float
v : Vec
Returns: Vec

Vec.withZ z v

Full Usage: Vec.withZ z v

Parameters:
    z : float
    v : Vec

Returns: Vec
Modifiers: inline

Returns new 3D vector with new z value, X and Y stay the same.

Extended Type: Vec

z : float
v : Vec
Returns: Vec

Type something to start searching.