Struct gdnative_core::Vector2Array [−][src]
pub struct Vector2Array(_);
A reference-counted vector of Vector2 that uses Godot's pool allocator.
Methods
impl Vector2Array[src]
impl Vector2Arraypub fn new() -> Self[src]
pub fn new() -> SelfCreates an empty array.
pub fn from_variant_array(array: &VariantArray) -> Self[src]
pub fn from_variant_array(array: &VariantArray) -> SelfCreates an array by trying to convert each variant
See Variant::to_vector2.
pub fn push(&mut self, vector: &Vector2)[src]
pub fn push(&mut self, vector: &Vector2)Appends a vector to the end of the array.
pub fn push_array(&mut self, vectors: &Vector2Array)[src]
pub fn push_array(&mut self, vectors: &Vector2Array)Appends each vector to the end of the array.
pub fn insert(&mut self, offset: i32, vector: &Vector2) -> bool[src]
pub fn insert(&mut self, offset: i32, vector: &Vector2) -> boolInserts a vector at the given offset.
pub fn invert(&mut self)[src]
pub fn invert(&mut self)Inverts the order of the elements in the array.
pub fn remove(&mut self, idx: i32)[src]
pub fn remove(&mut self, idx: i32)Removes an element at the given offset.
pub fn resize(&mut self, size: i32)[src]
pub fn resize(&mut self, size: i32)Changes the size of the array, possibly removing elements or pushing default values.
pub fn get(&self, idx: i32) -> Vector2[src]
pub fn get(&self, idx: i32) -> Vector2Returns a copy of the element at the given offset.
pub fn set(&mut self, idx: i32, vector: &Vector2)[src]
pub fn set(&mut self, idx: i32, vector: &Vector2)Sets the value of the element at the given offset.
pub fn len(&self) -> i32[src]
pub fn len(&self) -> i32Returns the number of elements in the array.
pub fn new_ref(&self) -> Vector2Array[src]
pub fn new_ref(&self) -> Vector2ArrayTrait Implementations
impl<'l> From<&'l Vector2Array> for Variant[src]
impl<'l> From<&'l Vector2Array> for Variantfn from(val: &'l Vector2Array) -> Variant[src]
fn from(val: &'l Vector2Array) -> VariantPerforms the conversion.
impl Drop for Vector2Array[src]
impl Drop for Vector2Arrayimpl Default for Vector2Array[src]
impl Default for Vector2Arrayimpl ToVariant for Vector2Array[src]
impl ToVariant for Vector2Arrayfn to_variant(&self) -> Variant[src]
fn to_variant(&self) -> Variantfn from_variant(variant: &Variant) -> Option<Self>[src]
fn from_variant(variant: &Variant) -> Option<Self>Auto Trait Implementations
impl Send for Vector2Array
impl Send for Vector2Arrayimpl Sync for Vector2Array
impl Sync for Vector2Array