[][src]Struct gdnative::Vector2Array

pub struct Vector2Array(_);

A reference-counted vector of Vector2 that uses Godot's pool allocator.

Methods

impl Vector2Array[src]

pub fn new() -> Vector2Array[src]

Creates an empty array.

pub fn from_variant_array(array: &VariantArray) -> Vector2Array[src]

Creates an array by trying to convert each variant

See Variant::to_vector2.

pub fn push(&mut self, vector: &Vector2D<f32, UnknownUnit>)[src]

Appends a vector to the end of the array.

pub fn push_array(&mut self, vectors: &Vector2Array)[src]

Appends each vector to the end of the array.

pub fn insert(
    &mut self,
    offset: i32,
    vector: &Vector2D<f32, UnknownUnit>
) -> bool
[src]

Inserts a vector at the given offset.

pub fn invert(&mut self)[src]

Inverts the order of the elements in the array.

pub fn remove(&mut self, idx: i32)[src]

Removes an element at the given offset.

pub fn resize(&mut self, size: i32)[src]

Changes the size of the array, possibly removing elements or pushing default values.

pub fn get(&self, idx: i32) -> Vector2D<f32, UnknownUnit>[src]

Returns a copy of the element at the given offset.

pub fn set(&mut self, idx: i32, vector: &Vector2D<f32, UnknownUnit>)[src]

Sets the value of the element at the given offset.

pub fn len(&self) -> i32[src]

Returns the number of elements in the array.

pub fn read(&'a self) -> Aligned<ReadGuard<'a>>[src]

pub fn write(&'a mut self) -> Aligned<WriteGuard<'a>>[src]

pub fn new_ref(&self) -> Vector2Array[src]

Trait Implementations

impl Default for Vector2Array[src]

impl Drop for Vector2Array[src]

impl Export for Vector2Array[src]

type Hint = ()

A type-specific hint type that is valid for the type being exported.

impl<'l> From<&'l Vector2Array> for Variant[src]

impl FromVariant for Vector2Array[src]

impl ToVariant for Vector2Array[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Export for T where
    T: GodotObject + ToVariant
[src]

type Hint = ()

A type-specific hint type that is valid for the type being exported.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.