FormIt Plugin API  v23.0.0 (2023.0.0)
WSM.Vector3d API

Description

Functions

json WSM.Vector3d.Vector3d (x, y, z)
 Vector3d constructs a Vector3d. More...
 
json WSM.Vector3d.AreEqual (v1, v2)
 Returns true if the two given unt vectors are equal. More...
 
json WSM.Vector3d.Determinant (vector1, vector2, vector3)
 Returns the determinant of three unit vectors Parameters: In: WSM.UnitVector3d, WSM.UnitVector3d, WSM.UnitVector3d Out: double. More...
 
json WSM.Vector3d.AddVector (vector1, vector2)
 Adds a unit vector to a unit vector. More...
 
json WSM.Vector3d.SubtractVector (vector1, vector2)
 Subtracts unit vector 2 from unit vector 1. More...
 
json WSM.Vector3d.MultiplyByFactor (vector, factor)
 Multiplies a unit vector by a factor. More...
 
json WSM.Vector3d.Transform (vector, transf3d)
 Transforms a unit vector with the given WSM.Transf3d. More...
 
json WSM.Vector3d.DotProduct (vector1, vector2)
 Returns the dot product between two unit vectors. More...
 
json WSM.Vector3d.CrossProduct (vector1, vector2)
 Returns the cross product between unit vector1 and unit vector2. More...
 
json WSM.Vector3d.Length (vector)
 Returns the length of a vector. More...
 
json WSM.Vector3d.LengthSquared (vector)
 Returns the squared length of a vector. More...
 
json WSM.Vector3d.GetNormalized (vector)
 Returns the normalized version of a vector. More...
 
json WSM.Vector3d.GetAngleBetweenVectors (vector1, vector2)
 Returns the angle between two unit vectors in radians. More...
 
json WSM.Vector3d.GetPerpendicularVector (vector)
 Returns a unit vector that is perpendicular to the given unit vector. More...
 
json WSM.Vector3d.IsNull (vector)
 Returns true if the unit vector has zero length, false otherwise. More...
 
json WSM.Vector3d.AreParallel (vector1, vector2)
 Returns true if two unit vectors are parallel (same or opposite direction) Parameters: In: WSM.UnitVector3d, WSM.UnitVector3d Out: bool. More...
 
json WSM.Vector3d.ArePerpendicular (vector1, vector2)
 Returns true if two unit vectors are perpendicular Parameters: In: WSM.UnitVector3d, WSM.UnitVector3d Out: bool. More...
 
json WSM.Vector3d.GetDominantDirection (vector)
 Returns the dominant direction of a unit vector as an integer 0 is X direction 1 is Y direction 2 is Z direction Parameters: In: WSM.UnitVector3d Out: int. More...
 
json WSM.Vector3d.XDirection ()
 Returns the unit vector in the x direction Parameters: In: Out: WSM.UnitVector3d. More...
 
json WSM.Vector3d.YDirection ()
 Returns the unit vector in the y direction Parameters: In: Out: WSM.UnitVector3d. More...
 
json WSM.Vector3d.ZDirection ()
 Returns the unit vector in the z direction Parameters: In: Out: WSM.UnitVector3d. More...
 

Function Documentation

json WSM.Vector3d.AddVector ( vector1  ,
vector2   
)

Adds a unit vector to a unit vector.

Adds a vector to a vector.

Returns the new vector Parameters: In: WSM.UnitVector3d, WSM.UnitVector3d Out: WSM.Vector3d

Parameters
[in]vector1WSM.UnitVector3d
[in]vector2WSM.UnitVector3d
Returns
vector1 + vector2

Returns the new vector Parameters: In: WSM.Vector3d, WSM.Vector3d Out: WSM.Vector3d

Parameters
[in]vector1WSM.Vector3d
[in]vector2WSM.Vector3d
Returns
vector1 + vector2
json WSM.Vector3d.AreEqual ( v1  ,
v2   
)

Returns true if the two given unt vectors are equal.

Returns true if the two given Vectors are equal.

False otherwise Parameters: In: WSM.UnitVector3d, WSM.UnitVector3d Out: bool

Parameters
[in]v1WSM.UnitVector3d
[in]v2WSM.UnitVector3d
Returns
v1.isEqual(v2)

False otherwise Parameters: In: WSM.Vector3d, WSM.Vector3d Out: bool

Parameters
[in]v1WSM.Vector3d
[in]v2WSM.Vector3d
Returns
v1.isEqual(v2)
json WSM.Vector3d.AreParallel ( vector1  ,
vector2   
)

Returns true if two unit vectors are parallel (same or opposite direction) Parameters: In: WSM.UnitVector3d, WSM.UnitVector3d Out: bool.

Returns true if two vectors are parallel (same or opposite direction) Parameters: In: WSM.Vector3d, WSM.Vector3d Out: bool.

Parameters
[in]vector1WSM.UnitVector3d
[in]vector2WSM.UnitVector3d
Returns
vector1.isParallel(vector2)
Parameters
[in]vector1WSM.Vector3d
[in]vector2WSM.Vector3d
Returns
vector1.isParallel(vector2)
json WSM.Vector3d.ArePerpendicular ( vector1  ,
vector2   
)

Returns true if two unit vectors are perpendicular Parameters: In: WSM.UnitVector3d, WSM.UnitVector3d Out: bool.

Returns true if two vectors are perpendicular Parameters: In: WSM.Vector3d, WSM.Vector3d Out: bool.

Parameters
[in]vector1WSM.UnitVector3d
[in]vector2WSM.UnitVector3d
Returns
vector1.isPerpend(vector2)
Parameters
[in]vector1WSM.Vector3d
[in]vector2WSM.Vector3d
Returns
vector1.isPerpend(vector2)
json WSM.Vector3d.CrossProduct ( vector1  ,
vector2   
)

Returns the cross product between unit vector1 and unit vector2.

Returns the cross product between vector1 and vector2.

Parameters: In: WSM.UnitVector3d, WSM.UnitVector3d Out: WSM.Vector3d

Parameters
[in]vector1WSM.UnitVector3d
[in]vector2WSM.UnitVector3d
Returns
vector1 * vector2

Parameters: In: WSM.Vector3d, WSM.Vector3d Out: WSM.Vector3d

Parameters
[in]vector1WSM.Vector3d
[in]vector2WSM.Vector3d
Returns
vector1 * vector2
json WSM.Vector3d.Determinant ( vector1  ,
vector2  ,
vector3   
)

Returns the determinant of three unit vectors Parameters: In: WSM.UnitVector3d, WSM.UnitVector3d, WSM.UnitVector3d Out: double.

Returns the determinant of three vectors Parameters: In: WSM.Vector3d, WSM.Vector3d, WSM.Vector3d Out: double.

Parameters
[in]vector1WSM.UnitVector3d
[in]vector2WSM.UnitVector3d
[in]vector3WSM.UnitVector3d
Returns
WSM.UnitVector3d.det(vector1, vector2, vector3)
Parameters
[in]vector1WSM.Vector3d
[in]vector2WSM.Vector3d
[in]vector3WSM.Vector3d
Returns
WSM.Vector3d.det(vector1, vector2, vector3)
json WSM.Vector3d.DotProduct ( vector1  ,
vector2   
)

Returns the dot product between two unit vectors.

Returns the dot product between two vectors.

Parameters: In: WSM.UnitVector3d, WSM.UnitVector3d Out: double

Parameters
[in]vector1WSM.UnitVector3d
[in]vector2WSM.UnitVector3d
Returns
vector1 % vector2

Parameters: In: WSM.Vector3d, WSM.Vector3d Out: double

Parameters
[in]vector1WSM.Vector3d
[in]vector2WSM.Vector3d
Returns
vector1 % vector2
json WSM.Vector3d.GetAngleBetweenVectors ( vector1  ,
vector2   
)

Returns the angle between two unit vectors in radians.

Returns the angle between two vectors in radians.

Parameters: In: WSM.UnitVector3d, WSM.UnitVector3d Out: double

Parameters
[in]vector1WSM.UnitVector3d
[in]vector2WSM.UnitVector3d
Returns
vector1.angle(vector2)

Parameters: In: WSM.Vector3d, WSM.Vector3d Out: double

Parameters
[in]vector1WSM.Vector3d
[in]vector2WSM.Vector3d
Returns
vector1.angle(vector2)
json WSM.Vector3d.GetDominantDirection ( vector  )

Returns the dominant direction of a unit vector as an integer 0 is X direction 1 is Y direction 2 is Z direction Parameters: In: WSM.UnitVector3d Out: int.

Returns the dominant direction of a vector as an integer 0 is X direction 1 is Y direction 2 is Z direction Parameters: In: WSM.Vector3d Out: int.

Parameters
[in]vectorWSM.UnitVector3d
Returns
vector.dominantDirection()
Parameters
[in]vectorWSM.Vector3d
Returns
vector.dominantDirection()
json WSM.Vector3d.GetNormalized ( vector  )

Returns the normalized version of a vector.

Parameters: In: WSM.Vector3d Out: WSM.Vector3d

Parameters
[in]vectorWSM.Vector3d
Returns
vector.getNormalized()
json WSM.Vector3d.GetPerpendicularVector ( vector  )

Returns a unit vector that is perpendicular to the given unit vector.

Returns a vector that is perpendicular to the given vector.

Parameters: In: WSM.UnitVector3d Out: WSM.UnitVector3d

Parameters
[in]vectorWSM.UnitVector3d
Returns
vector.perpend()

Parameters: In: WSM.Vector3d Out: WSM.Vector3d

Parameters
[in]vectorWSM.Vector3d
Returns
vector.perpend()
json WSM.Vector3d.IsNull ( vector  )

Returns true if the unit vector has zero length, false otherwise.

Returns true if the vector has zero length, false otherwise.

Parameters: In: WSM.UnitVector3d Out: bool

Parameters
[in]vectorWSM.UnitVector3d
Returns
vector.isExactNull()

Parameters: In: WSM.Vector3d Out: bool

Parameters
[in]vectorWSM.Vector3d
Returns
vector.isNull()
json WSM.Vector3d.Length ( vector  )

Returns the length of a vector.

Parameters: In: WSM.Vector3d Out: double

Parameters
[in]vectorWSM.Vector3d
Returns
vector.length()
json WSM.Vector3d.LengthSquared ( vector  )

Returns the squared length of a vector.

Parameters: In: WSM.Vector3d Out: double

Parameters
[in]vectorWSM.Vector3d
Returns
vector.lengthSqrd()
json WSM.Vector3d.MultiplyByFactor ( vector  ,
factor   
)

Multiplies a unit vector by a factor.

Multiplies a vector by a factor.

Returns the new vector Parameters: In: WSM.UnitVector3d, double Out: WSM.Vector3d

Parameters
[in]vectorWSM.UnitVector3d
[in]factordouble
Returns
vector * factor

Returns the new vector Parameters: In: WSM.Vector3d, double Out: WSM.Vector3d

Parameters
[in]vectorWSM.Vector3d
[in]factordouble
Returns
vector * factor
json WSM.Vector3d.SubtractVector ( vector1  ,
vector2   
)

Subtracts unit vector 2 from unit vector 1.

Subtracts vector 2 from vector 1.

Returns a new vector Parameters: In: WSM.UnitVector3d, WSM.UnitVector3d Out: WSM.Vector3d

Parameters
[in]vector1WSM.UnitVector3d
[in]vector2WSM.UnitVector3d
Returns
vector1 - vector2

Returns a new vector Parameters: In: WSM.Vector3d, WSM.Vector3d Out: WSM.Vector3d

Parameters
[in]vector1WSM.Vector3d
[in]vector2WSM.Vector3d
Returns
vector1 - vector2
json WSM.Vector3d.Transform ( vector  ,
transf3d   
)

Transforms a unit vector with the given WSM.Transf3d.

Transforms a vector with the given WSM.Transf3d.

Returns the transformed unit vector Parameters: In: WSM.UnitVector3d, WSM.Transf3d Out: WSM.UnitVector3d

Parameters
[in]vectorWSM.UnitVector3d
[in]transf3dWSM.Transf3d
Returns
vector

Returns the transformed vector Parameters: In: WSM.Vector3d, WSM.Transf3d Out: WSM.Vector3d

Parameters
[in]vectorWSM.Vector3d
[in]transf3dWSM.Transf3d
Returns
transf3d * vector
json WSM.Vector3d.Vector3d ( ,
,
 
)

Vector3d constructs a Vector3d.

Parameters: In: x, y, z Out: Vector3d

Parameters
[in]xdouble
[in]ydouble
[in]zdouble
Returns
{...}
json WSM.Vector3d.XDirection ( )

Returns the unit vector in the x direction Parameters: In: Out: WSM.UnitVector3d.

Returns the unit vector in the x direction Parameters: In: Out: WSM.Vector3d.

Returns
WSM.UnitVector3d.kXDir
WSM.Vector3d.kXDir
json WSM.Vector3d.YDirection ( )

Returns the unit vector in the y direction Parameters: In: Out: WSM.UnitVector3d.

Returns the unit vector in the y direction Parameters: In: Out: WSM.Vector3d.

Returns
WSM.UnitVector3d.kYDir
WSM.Vector3d.kYDir
json WSM.Vector3d.ZDirection ( )

Returns the unit vector in the z direction Parameters: In: Out: WSM.UnitVector3d.

Returns the unit vector in the z direction Parameters: In: Out: WSM.Vector3d.

Returns
WSM.UnitVector3d.kZDir
WSM.Vector3d.kZDir