Vector

Vector structure with data accesible with [N] or swizzling

Constructors

this
this(T val)
this(T[N] vals)

Constructs Vector from components. If no components present vector will be filled with 0

Alias This

data

Alias to allow easy data access

Members

Aliases

VecType
alias VecType = Vector!(T, N)

Alias to vector type. Can be used to contruct vectors of same type

dataType
alias dataType = T

Alias to data type (e.g. float, int)

Functions

copyof
VecType copyof()

Returns copy of vector

godotVector
Vector2 godotVector()
Undocumented in source. Be warned that the author may not have intended to support it.
godotVector
Vector2i godotVector()
Undocumented in source. Be warned that the author may not have intended to support it.
godotVector
Vector3 godotVector()
Undocumented in source. Be warned that the author may not have intended to support it.
godotVector
Vector3i godotVector()
Undocumented in source. Be warned that the author may not have intended to support it.
godotVector
Vector4 godotVector()
Undocumented in source. Be warned that the author may not have intended to support it.
godotVector
Vector4i godotVector()
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
auto opBinary(Vector!(R, N) b)
auto opBinary(R b)
opBinaryRight
auto opBinaryRight(Vector!(R, N) b)
auto opBinaryRight(R b)

opBinary x [+, -, *, /, %] y

opCmp
int opCmp(Vector!(R, N) b)

opCmp x [< > <= >=] y

opEquals
bool opEquals(Vector!(R, size) b)

opEquals x == y

opOpAssign
auto opOpAssign(Vector!(R, N) b)
auto opOpAssign(R b)

opOpAssign x [+, -, *, /, %]= y

opUnary
auto opUnary()

opUnary [-, +, --, ++] x

ptr
T* ptr()

Returns pointer to data

toHash
size_t toHash()

Returns hash

toString
string toString()

Returns string representation of vector: [1.00, 1.00,... , 1.00]

Manifest constants

AccessString
enum AccessString;
Undocumented in source.
AccessString
enum AccessString;
Undocumented in source.
AccessString
enum AccessString;
Undocumented in source.

Mixins

__anonymous
mixin accessByString!(T, N, "data", AccessString)
Undocumented in source.

Variables

data
T[N] data;

Vector data

size
enum size_t size;

Alias to vector size

Meta