setCoord method

void setCoord(
  1. double value,
  2. int dim, {
  3. Vector3? direction,
})

Implementation

void setCoord(double value, int dim, {Vector3? direction}) {
  direction ??= ORIGIN;
  var curr = getCoord(dim, direction: direction);
  var shiftVec = ORIGIN.withComponent(dim, value - curr);
  shift(shiftVec);
}