Struct gdnative_visual_script::common::Float32Array [−]
pub struct Float32Array(_);
A reference-counted vector of f32
that uses Godot's pool allocator.
Methods
impl Float32Array
impl Float32Array
pub fn new() -> Float32Array
pub fn new() -> Float32Array
Creates an empty Float32Array
.
pub fn from_variant_array(array: &VariantArray) -> Float32Array
pub fn from_variant_array(array: &VariantArray) -> Float32Array
Creates an array by trying to convert each variant.
See Variant::to_float32_array
.
pub fn push(&mut self, val: f32)
pub fn push(&mut self, val: f32)
Appends an element at the end of the array.
pub fn push_array(&mut self, array: &Float32Array)
pub fn push_array(&mut self, array: &Float32Array)
Appends a Float32Array
at the end of this array.
pub fn insert(&mut self, offset: i32, val: f32) -> bool
pub fn insert(&mut self, offset: i32, val: f32) -> bool
Insert a new f32 at a given position in the array.
pub fn invert(&mut self)
pub fn invert(&mut self)
Inverts the order of the elements in the array.
pub fn remove(&mut self, idx: i32)
pub fn remove(&mut self, idx: i32)
Removes an element at the given offset.
pub fn resize(&mut self, size: i32)
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) -> f32
pub fn get(&self, idx: i32) -> f32
Returns a copy of the element at the given offset.
pub fn set(&mut self, idx: i32, val: f32)
pub fn set(&mut self, idx: i32, val: f32)
Sets the value of the element at the given offset.
pub fn len(&self) -> i32
pub fn len(&self) -> i32
Returns the number of elements in the array.
pub fn new_ref(&self) -> Float32Array
pub fn new_ref(&self) -> Float32Array
Trait Implementations
impl ToVariant for Float32Array
impl ToVariant for Float32Array
fn to_variant(&self) -> Variant
fn to_variant(&self) -> Variant
fn from_variant(variant: &Variant) -> Option<Float32Array>
fn from_variant(variant: &Variant) -> Option<Float32Array>
impl<'l> From<&'l Float32Array> for Variant
impl<'l> From<&'l Float32Array> for Variant
fn from(val: &'l Float32Array) -> Variant
fn from(val: &'l Float32Array) -> Variant
Performs the conversion.
impl Default for Float32Array
impl Default for Float32Array
fn default() -> Float32Array
fn default() -> Float32Array
Returns the "default value" for a type. Read more
impl Drop for Float32Array
impl Drop for Float32Array
Auto Trait Implementations
impl Send for Float32Array
impl Send for Float32Array
impl Sync for Float32Array
impl Sync for Float32Array