copyCenterAndHalfExtents method

void copyCenterAndHalfExtents(
  1. Vector3 center,
  2. Vector3 halfExtents
)

Copy the center and the halfExtents 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);
}