BufferFloat

- class BufferFloat
A 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
BufferM33f
BufferM44f
BufferBox3f
Methods
__eq__Return self==value.
__getitem__operator[](i: int) -> reference
Constructor(s)
__iter____len____neq____repr__Return repr(self).
__setitem__operator[](i: int) -> reference
grow(size)Grow the buffer in order for it to be large enough for this size.
resize(size, d)Resize the buffer.
write()Return a writable accessor on the buffer data.
- __init__()
Constructor(s)
Buffer ()
Construct an empty buffer.
Buffer (v: Value)
Cast a Value object in Buffer.
If v has not the good type, a default value is constructed.
Buffer (size: int)
Allocate a buffer.
- Parameters
size (int) - The number of element to allocate in the buffer.
- 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.