Vector2List class
A list of Vector2.
- Inheritance
-
- Object
- VectorList<
Vector2> - Vector2List
Constructors
- Vector2List(int length, [int offset = 0, int stride = 0])
-
Create a new vector list with
length
elements. Optionally it is possible to specify anoffset
in the buffer and astride
between each vector. -
Vector2List.fromList(List<
Vector2> list, [int offset = 0, int stride = 0]) -
Create a new vector list from a list of vectors. Optionally it is possible
to specify an
offset
in the buffer and astride
between each vector. - Vector2List.view(Float32List buffer, [int offset = 0, int stride = 0])
-
Create a new vector list as a view of
buffer
. Optionally it is possible to specify aoffset
in thebuffer
and astride
between each vector.
Properties
- buffer → Float32List
-
The internal storage buffer of this list.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- length → int
-
The count of vectors in this list.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
add(
int index, Vector2 vector) → void -
Add
vector
to the vector atindex
. -
addScaled(
int index, Vector2 vector, double factor) → void -
Add
vector
scaled byfactor
to the vector atindex
. -
copy(
VectorList< Vector2> src, {int srcOffset = 0, int offset = 0, int count = 0}) → void -
Copy a range of
count
vectors beginning atsrcOffset
fromsrc
into this list starting atoffset
.inherited -
load(
int index, Vector2 vector) → void -
Retrieves the vector at
index
and stores it invector
.override -
multiply(
int index, Vector2 vector) → void -
Multiply the vector at
index
byvector
. -
newVector(
) → Vector2 -
Create a new instance of
T
.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
scale(
int index, double factor) → void -
Scale the vector at
index
byfactor
. -
setValues(
int index, double x, double y) → void -
Set the vector at
index
tox
andy
. -
setZero(
int index) → void -
Set the vector at
index
to zero. -
store(
int index, Vector2 vector) → void -
Store
vector
in the list atindex
.override -
sub(
int index, Vector2 vector) → void -
Substract
vector
from the vector atindex
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
int index) → Vector2 -
Retrieves the vector at
index
.inherited -
operator []=(
int index, Vector2 v) → void -
Store
v
in the list atindex
.inherited