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