Aabb2.fromBuffer constructor

Aabb2.fromBuffer(ByteBuffer buffer, int offset)

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

Implementation

Aabb2.fromBuffer(ByteBuffer buffer, int offset)
    : _min = new Vector2.fromBuffer(buffer, offset),
      _max = new Vector2.fromBuffer(
          buffer, offset + Float64List.bytesPerElement * 2);