- class Array
An array of values. The values in the array can have any type.
- Array()
Create an empty array
- size() int
Return the array’s size
- resize(n: int)
Resize the array
- reserve(n: int)
Reserve some space in the array without resizing
- write(i: int, v: Value)
Write the i-th array element. Expect an access violation error if i is out of bounds.
- __getitem__(i: int) Value
Returns the i-th value. Expect an access violation error if i is out of bounds.
- __setitem__(i: int, v: Value) Value
Write the i-th array element. Expect an access violation error if i is out of bounds.
- as_bool(i: int) bool
Returns a value as a bool. You must be sure this value is an integer, a float, a double or a boolean or you get false.
- as_int(i: int) int
Returns the i-th value as an integer. You must be sure this value is an integer, a float, a double or a boolean or you get 0.
- as_float(i: int) float
Returns the i-th value as a float. You must be sure this value is an integer, a float, a double or a boolean or you get 0.f.
- as_double(i: int) double
Returns the i-th value as a double. You must be sure this value is an integer, a float, a double or a boolean or you get 0.0.
- as_string(i: int) str
Returns the i-th value as a string. You must be sure this value is a string or you will have an empty string.
- as_V2f(i: int) V2f
Returns the i-th value as a V2f. You must be sure this value is a V2f or you will have {0,0}.
- as_V2d(i: int) V2d
Returns the i-th value as a V2d. You must be sure this value is a V2d or you will have {0,0}.
- as_V3f(i: int) V3f
Returns the i-th value as a V3f. You must be sure this value is a V3f or you will have {0,0,0}.
- as_V3d(i: int) V3d
Returns the i-th value as a V3d. You must be sure this value is a V3d or you will have {0,0,0}.
- as_V4f(i: int) V4f
Returns the i-th value as a V4f. You must be sure this value is a V4f or you will have {0,0,0,0}.
- as_V4d(i: int) V4d
Returns the i-th value as a V4d. You must be sure this value is a V4d or you will have {0,0,0,0}.
- as_M44f(i: int) M44f
Returns the i-th value as a M44f. You must be sure this value is a M44f or you will have an identity matrix.
- as_M44d(i: int) M44d
Returns the i-th value as a M44d. You must be sure this value is a M44d or you will have an identity matrix.
- as_Quatf(i: int) Quatf
Returns the i-th value as a Quatf. You must be sure this value is a Quatf or you will have an identity quaternion.