copyCenterAndHalfExtents method

void copyCenterAndHalfExtents (Vector3 center, Vector3 halfExtents)

Copy the center and the halfExtends of this.

Implementation

void copyCenterAndHalfExtents(Vector3 center, Vector3 halfExtents) {
  center
    ..setFrom(_min)
    ..add(_max)
    ..scale(0.5);
  halfExtents
    ..setFrom(_max)
    ..sub(_min)
    ..scale(0.5);
}