pub struct Vector3Array(/* private fields */);Expand description
A reference-counted vector of Vector3 that uses Godot’s pool allocator.
Implementations§
Source§impl Vector3Array
impl Vector3Array
Sourcepub fn new() -> Vector3Array
pub fn new() -> Vector3Array
Creates an empty array.
Sourcepub 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.
Sourcepub 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.
Sourcepub fn push_array(&mut self, vectors: &Vector3Array)
pub fn push_array(&mut self, vectors: &Vector3Array)
Appends each vector to the end of the array.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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 new_ref(&self) -> Vector3Array
Trait Implementations§
Source§impl Default for Vector3Array
impl Default for Vector3Array
Source§fn default() -> Vector3Array
fn default() -> Vector3Array
Returns the “default value” for a type. Read more
Source§impl Drop for Vector3Array
impl Drop for Vector3Array
Source§impl<'l> From<&'l Vector3Array> for Variant
impl<'l> From<&'l Vector3Array> for Variant
Source§fn from(val: &'l Vector3Array) -> Variant
fn from(val: &'l Vector3Array) -> Variant
Converts to this type from the input type.
Source§impl ToVariant for Vector3Array
impl ToVariant for Vector3Array
fn to_variant(&self) -> Variant
fn from_variant(variant: &Variant) -> Option<Vector3Array>
Auto Trait Implementations§
impl Freeze for Vector3Array
impl RefUnwindSafe for Vector3Array
impl Send for Vector3Array
impl Sync for Vector3Array
impl Unpin for Vector3Array
impl UnsafeUnpin for Vector3Array
impl UnwindSafe for Vector3Array
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more