class Godot::PackedVector3Array

Included Modules

Defined in:

libgodot/collections.cr

Constructors

Instance Method Summary

Constructor Detail

def self.from(items : Array(Vector3)) : PackedVector3Array #

def self.new(size : Int, initial_value : Vector3 = Vector3.new) #

def self.new(initial_items : Array(Vector3)) #

def self.new #

Instance Method Detail

def <<(value : Vector3) : self #

def [](index : Int) : Vector3 #

def []=(index : Int, value : Vector3) : Vector3 #

def []?(index : Int) : Vector3 | Nil #

def append(value : Vector3) : self #

def clear : Void #

def each(&block : Vector3 -> Void) : Void #
Description copied from module Enumerable(Godot::Vector3)

Must yield this collection's elements to the block.


def empty? : Bool #
Description copied from module Enumerable(Godot::Vector3)

Returns true if self does not contain any element.

([] of Int32).empty? # => true
([1]).empty?         # => false
[nil, false].empty?  # => false
  • #present? returns the inverse.

def is_empty : Bool #

def push(value : Vector3) : self #

def resize(new_size : Int) : Void #

def size : Int64 #
Description copied from module Enumerable(Godot::Vector3)

Returns the number of elements in the collection.

[1, 2, 3, 4].size # => 4

def to_a : Array(Vector3) #
Description copied from module Enumerable(Godot::Vector3)

Returns an Array with all the elements in the collection.

(1..5).to_a # => [1, 2, 3, 4, 5]