copyWith method

Vertex copyWith({
  1. Vector3? position,
  2. Vector2? texCoord,
  3. Vector3? normal,
  4. Color? color,
  5. Vector4? joints,
  6. Vector4? weights,
})

Implementation

Vertex copyWith({
  Vector3? position,
  Vector2? texCoord,
  Vector3? normal,
  Color? color,
  Vector4? joints,
  Vector4? weights,
}) {
  // TODO(wolfenrain): optimize this.
  return Vertex(
    position: position ?? this.position.mutable,
    texCoord: texCoord ?? this.texCoord.mutable,
    normal: normal ?? this.normal?.mutable,
    color: color ?? this.color,
    joints: joints ?? this.joints?.mutable,
    weights: weights ?? this.weights?.mutable,
  );
}