PackedVector2Array

A packed array of Vector2s.

Description

An array specifically designed to hold Vector2. Packs data tightly, so it saves memory for large array sizes.

Note

There are notable differences when using this API with C#. See C# API differences to GDScript for more information.

Tutorials

Constructors

PackedVector2Array

PackedVector2Array ( )

PackedVector2Array

PackedVector2Array ( PackedVector2Array from )

PackedVector2Array

PackedVector2Array ( Array from )

Methods

bool

append ( Vector2 value )

void

append_array ( PackedVector2Array array )

int

bsearch ( Vector2 value, bool before=true )

void

clear ( )

int

count ( Vector2 value ) const

PackedVector2Array

duplicate ( )

void

fill ( Vector2 value )

int

find ( Vector2 value, int from=0 ) const

bool

has ( Vector2 value ) const

int

insert ( int at_index, Vector2 value )

bool

is_empty ( ) const

bool

push_back ( Vector2 value )

void

remove_at ( int index )

int

resize ( int new_size )

void

reverse ( )

int

rfind ( Vector2 value, int from=-1 ) const

void

set ( int index, Vector2 value )

int

size ( ) const

PackedVector2Array

slice ( int begin, int end=2147483647 ) const

void

sort ( )

PackedByteArray

to_byte_array ( ) const

Operators

bool

operator != ( PackedVector2Array right )

PackedVector2Array

operator * ( Transform2D right )

PackedVector2Array

operator + ( PackedVector2Array right )

bool

operator == ( PackedVector2Array right )

Vector2

operator [] ( int index )


Constructor Descriptions

PackedVector2Array PackedVector2Array ( )

Constructs an empty PackedVector2Array.


PackedVector2Array PackedVector2Array ( PackedVector2Array from )

Constructs a PackedVector2Array as a copy of the given PackedVector2Array.


PackedVector2Array PackedVector2Array ( Array from )

Constructs a new PackedVector2Array. Optionally, you can pass in a generic