JSVec3Array
An object for arrays of 3D coordinates.
Create a new Module.JSVec3Array API.
var vec_array = new Module.JSVec3Array();
clear()
Initializes the vector list.
var vectorList = new Module.JSVec3Array();
vectorList.clear();
count() → number
Returns the number of data in the array.
Return
number: The number of vectors in the list.
get(index) → JSVector3D
Returns the vector object corresponding to the index.
index
number
The index of the data to return (sorted from 0 onwards)
Return
A valid vector object (JSVector3D): Successfully returns the vector at the specified index.
An initialized object (JSVector3D): If the index exceeds the size of the vector list.
pop() → JSVector3D
Returns the last vector in the vector list.
After returning, the last vector is deleted from the vector list.
Return
A valid vector object (JSVector3D): Successfully returns the last vector.
An initialized object (JSVector3D): If the vector list is empty.
push(element) → number
Add a new vector (JSVector3D).
Return
number: The number of vectors in the list after adding the new vector.
pushLonLatAlt(lon, lat, alt) → number
Adds a new vector.
lon
number
longitude location coordinates.
lat
number
latitude location coordinates.
alt
number
altitude location coordinates.
Return
number: The number of vectors in the list after adding the new vector.
set(index, vec)
Resets the value of the vector at the specified index.
index
number
The index of the vector to set.
setLonLatAlt(index, lon, lat, alt)
Resets the value of the vector at the specified index.
index
number
The index of the vector to set.
lon
number
longitude location coordinates.
lat
number
latitude location coordinates.
alt
number
altitude location coordinates.
shift()
Returns the first vector in the vector list and moves the order of the remaining vectors one position forward.
Return
A valid vector object (JSVector3D): Successfully returns the first vector.
An initialized object (JSVector3D): If the vector list is empty.
Last updated