Aabb3.fromBuffer constructor Null safety

Aabb3.fromBuffer(
  1. ByteBuffer buffer,
  2. int offset
)

Constructs Aabb3 with a min/max storage that views given buffer starting at offset. offset has to be multiple of Float32List.bytesPerElement.

Implementation

Aabb3.fromBuffer(ByteBuffer buffer, int offset)
    : _min = Vector3.fromBuffer(buffer, offset),
      _max = Vector3.fromBuffer(
          buffer, offset + Float32List.bytesPerElement * 3);