Array¶

-
class
Array¶ Bases:
rumba.ValueAn array of values.
The values in the array can have any type.
Constructors
__init__Array() -> None Methods
__getitem__operator[](i: int) -> Value __len____lshift__operator<<(value: Value) -> Array appendAlias for push_back, only available in Python. as_Box3f(i)Returns the i-th value as a Box3f. as_M44f(i)Returns the i-th value as a M44f. as_Quatf(i)Returns the i-th value as a Quatf. as_V2f(i)Returns the i-th value as a V2f. as_V3f(i)Returns the i-th value as a V3f. as_V4f(i)Returns the i-th value as a V4f. as_bool(i)Returns a value as a bool. as_float(i)Returns the i-th value as a float. as_int(i)Returns the i-th value as an integer. as_string(i)Returns the i-th value as a string. push_back(value)Insert a value at the end of the array. read(i)Returns the i-th value. resize(size)resize the array. size()Returns the array size. write(i)Write the i-th array element. -
__getitem__()¶ operator[](i: int) -> Value
Returns the i-th array element.
Expect an access violation error if i is out of bounds.
Return type: Value
-
__init__()¶ Array() -> None
Construct an empty Array.
Array(v: Value) -> None
Cast a Value object in Array.
If v has not the good type, a default value is constructed.
-
__lshift__()¶ operator<<(value: Value) -> Array
Insert a value at the end of the array.
The array size is increased by one.
Return type: Array
-
append()¶ Alias for push_back, only available in Python.
-
as_Box3f(i: int) → Imath.Box3f¶ Returns the i-th value as a Box3f.
You must be sure this value is a Box3f or you will have an empty box.
Parameters: i (int) – the index of the value to query Return type: Imath.Box3f
-
as_M44f(i: int) → Imath.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.
Parameters: i (int) – the index of the value to query Return type: Imath.M44f
-
as_Quatf(i: int) → Imath.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.
Parameters: i (int) – the index of the value to query Return type: Imath.Quatf
-
as_V2f(i: int) → Imath.V2f¶ Returns the i-th value as a V2f.
You must be sure this value is a V2f or you will have {0,0}.
Parameters: i (int) – the index of the value to query Return type: Imath.V2f
-
as_V3f(i: int) → Imath.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}.
Parameters: i (int) – the index of the value to query Return type: Imath.V3f
-
as_V4f(i: int) → Imath.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}.
Parameters: i (int) – the index of the value to query Return type: Imath.V4f
-
as_bool(i: int) → bool¶ Returns a value as a bool.
You must be sure this value is an integer, a float or a boolean or you get false.
Parameters: i (int) – the index of the value to query Return type: bool
-
as_float(i: int) → float¶ Returns the i-th value as a float.
You must be sure this value is an integer, a float or a boolean or you get 0.f.
Parameters: i (int) – the index of the value to query Return type: float
-
as_int(i: int) → int¶ Returns the i-th value as an integer.
You must be sure this value is an integer, a float or a boolean or you get 0.
Parameters: i (int) – the index of the value to query Return type: int
-
as_string(i: int) → unicode¶ Returns the i-th value as a string.
You must be sure this value is a string or you will have an empty string.
Parameters: i (int) – the index of the value to query Return type: unicode
-
push_back(value: Value) → None¶ Insert a value at the end of the array.
The array size is increased by one.
-
read(i: int) → Value¶ Returns the i-th value.
Expect an access violation error if i is out of bounds.
Return type: Value
-
resize(size: int) → None¶ resize the array.
-
size() → int¶ Returns the array size.
Return type: int
-
write(i: int, v: Value) → None¶ Write the i-th array element.
Expect an access violation error if i is out of bounds.
-