BufferFloat¶

-
class
BufferFloat¶ Bases:
rumba.BufferConstFloatA writable buffer for basic types like floats, integers, Imath::V3f, Imath::M44f..
The predefined Buffer types:
- BufferInt32
- BufferUInt8
- BufferUInt32
- BufferFloat
- BufferDouble
- BufferV2f
- BufferV3f
- BufferV4f
- BufferV2i
- BufferV3i
- BufferV4i
- BufferM44f
- BufferBox3f
Constructors
__init__Methods
__getitem__operator[](i: int) -> reference __iter__grow(size)Grow the buffer in order for it to be large enough for this size. resize(size)Resize the buffer. write()Return a writable accessor on the buffer data. -
__getitem__()¶ operator[](i: int) -> reference
Returns the i-th array element.
This method is slower than using a buffer span
Parameters: i (int) – The buffer element to access. Expect an access violation error if i is out of bounds. Return type: reference
-
grow(size: int) → None¶ Grow the buffer in order for it to be large enough for this size.
If the buffer is already large enough, does nothing.
Parameters: size (int) – The minimal number of element the buffer must have
-
resize(size: int, d: T) → None¶ Resize the buffer.
The previous data are copied in the new buffer.
Parameters: - size (int) – The number of element.
- d (T) – The value to use to fill the new allocated elements.
-
write()¶ Return a writable accessor on the buffer data.
Use this buffer span for the best access performances.