Class PoolVector3Array

PoolVector3Array metatype, wrapper for godot_pool_vector3_array

Methods

PoolVector3Array:append (...) Alias for push_back.
PoolVector3Array:empty () Returns true if the array is empty.
PoolVector3Array:extend (iterable) Append all vectors of iterable at the end of Array.
PoolVector3Array:get (index) Get the vector at index.
PoolVector3Array:get_buffer () Returns array's buffer as a PoolByteArray.
PoolVector3Array:has (value) Returns true if the array contains the given value.
PoolVector3Array:insert (index, value) Inserts a new element at a given position in the array.
PoolVector3Array:invert () Reverses the order of the elements in the array.
PoolVector3Array:join ([delimiter=""]) Returns a String with each element of the array joined with the given delimiter.
PoolVector3Array:push_back (...) Append elements at the end of the array.
PoolVector3Array:read () Returns the Read access for the array.
PoolVector3Array:remove (index) Removes an element from the array by index.
PoolVector3Array:resize (size) Sets the size of the array.
PoolVector3Array:safe_get (index) Get the vector at index.
PoolVector3Array:safe_set (index, value) Set a new vector for index.
PoolVector3Array:set (index, value) Set a new vector for index.
PoolVector3Array:size () Returns the size of the array.
PoolVector3Array:sort () Sorts the elements of the array in ascending order.
PoolVector3Array:write () Returns the Write access for the array.

Static Functions

PoolVector3Array:from (iterable) Create a new array with the elements from iterable.

Metamethods

PoolVector3Array:__concat (a, b) Concatenates values.
PoolVector3Array:__eq (a, b) Equality operation
PoolVector3Array:__index (index) Returns method named index or the result of safe_get(index - 1).
PoolVector3Array:__ipairs () Returns an iterator for array's elements, called by the idiom ipairs(array).
PoolVector3Array:__len () Alias for size.
PoolVector3Array:__new (...) PoolVector3Array constructor, called by the idiom PoolVector3Array(...).
PoolVector3Array:__newindex (index, value) Alias for safe_set(index - 1, value).
PoolVector3Array:__pairs () Alias for __ipairs, called by the idiom pairs(array).
PoolVector3Array:__tostring () Returns a Lua string representation of this array.

Class PoolVector3Array.Read

Read:assign (other) Assign a new Read access.
Read:copy () Create a copy of Read access.
Read:destroy () Destroy a Read access.
Read:ptr () Get Read access povector3er.

Class PoolVector3Array.Write

Write:assign (other) Assign a new Write access.
Write:copy () Create a copy of Write access.
Write:destroy () Destroy a Write access.
Write:ptr () Get Write access pointer.


Methods

PoolVector3Array:append (...)
Alias for push_back.

Parameters:

  • ...

See also:

PoolVector3Array:empty ()
Returns true if the array is empty.

Returns:

    bool
PoolVector3Array:extend (iterable)
Append all vectors of iterable at the end of Array.

Parameters:

  • iterable Any object iterable by ipairs, including Lua tables, Arrays and Pool*Arrays.
PoolVector3Array:get (index)
Get the vector at index. Unlike Lua tables, indices start at 0 instead of 1. For 1-based indexing, use the idiom array[index] instead.

If index is invalid (index < 0 or index >= size()), the application will crash. For a safe version that returns nil if index is invalid, use safe_get or the idiom array[index] instead.

Parameters:

  • index int

Returns:

    Vector3

See also:

PoolVector3Array:get_buffer ()
Returns array's buffer as a PoolByteArray.

Returns:

    PoolByteArray
PoolVector3Array:has (value)
Returns true if the array contains the given value.

Parameters:

Returns:

    bool
PoolVector3Array:insert (index, value)
Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (index == size()).

Parameters:

PoolVector3Array:invert ()
Reverses the order of the elements in the array.
PoolVector3Array:join ([delimiter=""])
Returns a String with each element of the array joined with the given delimiter.

Parameters:

  • delimiter (default "")

Returns:

    String
PoolVector3Array:push_back (...)
Append elements at the end of the array.

Parameters:

  • ... Vectors to be appended
PoolVector3Array:read ()
Returns the Read access for the array.

Returns:

    Read
PoolVector3Array:remove (index)
Removes an element from the array by index.

Parameters:

  • index int
PoolVector3Array:resize (size)
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size.

Parameters:

  • size int
PoolVector3Array:safe_get (index)
Get the vector at index. Unlike Lua tables, indices start at 0 instead of 1. For 1-based indexing, use the idiom array[index] instead.

The idiom array[index] also calls this method.

Parameters:

  • index int

Returns:

    Vector3

Or

    nil If index is invalid (index < 0 or index >= size())

See also:

PoolVector3Array:safe_set (index, value)
Set a new vector for index. Unlike Lua tables, indices start at 0 instead of 1. For 1-based indexing, use the idiom array[index] = value instead.

If index >= size(), the array is resized first. The idiom array[index] = value also calls this method.

Parameters:

Raises:

If index < 0

See also:

PoolVector3Array:set (index, value)
Set a new vector for index. Unlike Lua tables, indices start at 0 instead of 1. For 1-based indexing, use the idiom array[index] = value instead.

If index is invalid (index < 0 or index >= size()), the application will crash. For a safe approach that resizes if index >= size(), use safe_set or the idiom array[index] = value instead.

Parameters:

See also:

PoolVector3Array:size ()
Returns the size of the array.

Returns:

    int
PoolVector3Array:sort ()
Sorts the elements of the array in ascending order.
PoolVector3Array:write ()
Returns the Write access for the array.

Returns:

    Write

Static Functions

These don't receive self and should be called directly as Array.static_function(...)
PoolVector3Array:from (iterable)
Create a new array with the elements from iterable.

Parameters:

  • iterable If another PoolVector3Array is passed, return a copy of it. Otherwise, the new array is extended with iterable.

Returns:

    PoolVector3Array

See also:

Usage:

    local array = PoolVector3Array.from(some_table_or_other_iterable)

Metamethods

PoolVector3Array:__concat (a, b)
Concatenates values.

Parameters:

  • a First value, stringified with GD.str
  • b First value, stringified with GD.str

Returns:

    String
PoolVector3Array:__eq (a, b)
Equality operation

Parameters:

Returns:

    bool
PoolVector3Array:__index (index)
Returns method named index or the result of safe_get(index - 1).

Like Lua tables, indices start at 1. For 0-based indexing, call get or safe_get directly.

Parameters:

  • index

Returns:

    Method or element or nil

See also:

PoolVector3Array:__ipairs ()
Returns an iterator for array's elements, called by the idiom ipairs(array).

Returns:

  1. function
  2. PoolVector3Array self
  3. int 0

Usage:

    for i, vector in ipairs(array) do
        -- do something
    end
PoolVector3Array:__len ()
Alias for size.

Returns:

    int

See also:

PoolVector3Array:__new (...)
PoolVector3Array constructor, called by the idiom PoolVector3Array(...).

Parameters:

Returns:

    PoolVector3Array
PoolVector3Array:__newindex (index, value)
Alias for safe_set(index - 1, value).

Like Lua tables, indices start at 1. For 0-based indexing, call set or safe_set directly.

Parameters:

  • index int
  • value

See also:

PoolVector3Array:__pairs ()
Alias for __ipairs, called by the idiom pairs(array).

Returns:

  1. function
  2. PoolVector3Array self
  3. int 0

See also:

PoolVector3Array:__tostring ()
Returns a Lua string representation of this array.

Returns:

    string

Class PoolVector3Array.Read

PoolVector3Array.Read access metatype, wrapper for godot_pool_vector3_array_read_access.
Read:assign (other)
Assign a new Read access.

Parameters:

Read:copy ()
Create a copy of Read access.

Returns:

    Read
Read:destroy ()
Destroy a Read access. Holding a valid access object may lock a PoolVector3Array, so this method should be called manually when access is no longer needed.
Read:ptr ()
Get Read access povector3er.

Returns:

    const Vector3 *

Class PoolVector3Array.Write

PoolVector3Array.Write access metatype, wrapper for godot_pool_vector3_array_write_access.
Write:assign (other)
Assign a new Write access.

Parameters:

Write:copy ()
Create a copy of Write access.

Returns:

    Write
Write:destroy ()
Destroy a Write access. Holding a valid access object may lock a PoolVector3Array, so this method should be called manually when access is no longer needed.
Write:ptr ()
Get Write access pointer.

Returns:

    Vector3 *
generated by LDoc 1.4.6 Last updated 2023-01-04 08:52:34