VR-Forces 5.1 Lua Function Documentation

VectorGeoc3D

(For high level concepts about how to use Lua to write scripted tasks, please see VR-Forces User's Guide.)

A VectorGeoc3D is a straight line in space, unlike a Vector3D. The coordinate system is not accessible to a Lua script, but it can be thought of as a vector in geocentric coordinates. There is no constructor for this type of vector in Lua, as the coordinate system is abstracted away. These vectors are only created as a result of operations on locations.

Function List

crossVectorGeoc3D (geocVector) Creates a vector that is the cross product of this vector with the given vector, i.e.
dotVectorGeoc3D (geocVector) Computes the dot product of this vector with the given one.
getLength () Computes the length of this vector.
getNegated () Creates a vector that is the negation of this vector.
getScaled (scale) Creates a scaled version of this vector.
getUnit () Creates a unit vector of this vector, i.e.
makeCopy () Makes a copy of the given vector object.
makeVector3DAtLoc (location) Creates a Vector3D with the same direction as this vector, at the given location.


Functions

crossVectorGeoc3D (geocVector)
Creates a vector that is the cross product of this vector with the given vector, i.e. this x offsetVector.

Parameters:

  • geocVector: A VectorGeoc3D

Return value:

    A VectorGeoc3D
dotVectorGeoc3D (geocVector)
Computes the dot product of this vector with the given one.

Parameters:

  • geocVector: A VectorGeoc3D

Return value:

    A number that is the dot product of this vector with the given vector.
getLength ()
Computes the length of this vector.

Return value:

    The length of the vector.
getNegated ()
Creates a vector that is the negation of this vector.

Return value:

    A VectorGeoc3D which is this vector negated.
getScaled (scale)
Creates a scaled version of this vector. I.e. one whose length is this vector's length times scale.

Parameters:

  • scale: A number that this vector is multiplied by to produce the output vector.

Return value:

    A VectorGeoc3D which is this vector scaled by the input scale.
getUnit ()
Creates a unit vector of this vector, i.e. this / |this| .

Return value:

    A VectorGeoc3D which is a unit vector of this vector.
makeCopy ()
Makes a copy of the given vector object.

Return value:

    VectorGeoc3D that is a copy of this object.
makeVector3DAtLoc (location)
Creates a Vector3D with the same direction as this vector, at the given location.

Parameters:

  • location: A Location3D

Return value:

    A Vector3D

Copyright© 2024 MAK Technologies, Inc. All rights reserved.