FormIt Plugin API v25.0.0 (2025.0.0)
Loading...
Searching...
No Matches
WSM.Vector3d API

Description

Functions

json WSM.Vector3d.Vector3d (x, y, z)
 Vector3d constructs a Vector3d.
 
json WSM.Vector3d.AreEqual (v1, v2)
 Returns true if the two given unt vectors are equal.
 
json WSM.Vector3d.Determinant (vector1, vector2, vector3)
 Returns the determinant of three unit vectors Parameters: In: WSM.UnitVector3d, WSM.UnitVector3d, WSM.UnitVector3d Out: double
 
json WSM.Vector3d.AddVector (vector1, vector2)
 Adds a unit vector to a unit vector.
 
json WSM.Vector3d.SubtractVector (vector1, vector2)
 Subtracts unit vector 2 from unit vector 1.
 
json WSM.Vector3d.MultiplyByFactor (vector, factor)
 Multiplies a unit vector by a factor.
 
json WSM.Vector3d.Transform (vector, transf3d)
 Transforms a unit vector with the given WSM.Transf3d.
 
json WSM.Vector3d.DotProduct (vector1, vector2)
 Returns the dot product between two unit vectors.
 
json WSM.Vector3d.CrossProduct (vector1, vector2)
 Returns the cross product between unit vector1 and unit vector2.
 
json WSM.Vector3d.Length (vector)
 Returns the length of a vector.
 
json WSM.Vector3d.LengthSquared (vector)
 Returns the squared length of a vector.
 
json WSM.Vector3d.GetNormalized (vector)
 Returns the normalized version of a vector.
 
json WSM.Vector3d.GetAngleBetweenVectors (vector1, vector2)
 Returns the angle between two unit vectors in radians.
 
json WSM.Vector3d.GetPerpendicularVector (vector)
 Returns a unit vector that is perpendicular to the given unit vector.
 
json WSM.Vector3d.IsNull (vector)
 Returns true if the unit vector has zero length, false otherwise.
 
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
 
json WSM.Vector3d.ArePerpendicular (vector1, vector2)
 Returns true if two unit vectors are perpendicular Parameters: In: WSM.UnitVector3d, WSM.UnitVector3d Out: bool
 
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
 
json WSM.Vector3d.XDirection ()
 Returns the unit vector in the x direction Parameters: In: Out: WSM.UnitVector3d
 
json WSM.Vector3d.YDirection ()
 Returns the unit vector in the y direction Parameters: In: Out: WSM.UnitVector3d
 
json WSM.Vector3d.ZDirection ()
 Returns the unit vector in the z direction Parameters: In: Out: WSM.UnitVector3d
 

Function Documentation

◆ AddVector()

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

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

Parameters
[in]vector1WSM.Vector3d
[in]vector2WSM.Vector3d
Returns

◆ AreEqual()

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)

◆ AreParallel()

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)

◆ ArePerpendicular()

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)

◆ CrossProduct()

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

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

Parameters
[in]vector1WSM.Vector3d
[in]vector2WSM.Vector3d
Returns

◆ Determinant()

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)

◆ DotProduct()

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

◆ GetAngleBetweenVectors()

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)

◆ GetDominantDirection()

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()

◆ GetNormalized()

json WSM.Vector3d.GetNormalized ( vector  )

Returns the normalized version of a vector.

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

Parameters
[in]vectorWSM.Vector3d
Returns

◆ GetPerpendicularVector()

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

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

Parameters
[in]vectorWSM.Vector3d
Returns

◆ IsNull()

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()

◆ Length()

json WSM.Vector3d.Length ( vector  )

Returns the length of a vector.

Parameters: In: WSM.Vector3d Out: double

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

◆ LengthSquared()

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()

◆ MultiplyByFactor()

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

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

Parameters
[in]vectorWSM.Vector3d
[in]factordouble
Returns

◆ SubtractVector()

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

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

Parameters
[in]vector1WSM.Vector3d
[in]vector2WSM.Vector3d
Returns

◆ Transform()

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

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

Parameters
[in]vectorWSM.Vector3d
[in]transf3dWSM.Transf3d
Returns

◆ Vector3d()

json WSM.Vector3d.Vector3d ( ,
,
 
)

Vector3d constructs a Vector3d.

WSM.Vector3d Javascript Namespace.

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

Parameters
[in]xdouble
[in]ydouble
[in]zdouble
Returns

Vector3d constructs a Vector3d from the given values.

Parameters: In: double x, y, z Out: WSM.Vector3d

Parameters
[in]xdouble
[in]ydouble
[in]zdouble
Returns

◆ XDirection()

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

◆ YDirection()

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

◆ ZDirection()

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