getCenter method

Sp3dV3D getCenter(
  1. Sp3dObj parent
)

(en)Gets the average coordinates of this fragment.

(ja)このフラグメントの平均座標を取得します。

  • parent : parent obj.

Implementation

Sp3dV3D getCenter(Sp3dObj parent) {
  List<Sp3dV3D> allV = [];
  for (Sp3dFace i in faces) {
    allV.addAll(i.getVertices(parent));
  }
  return Sp3dV3D.ave(allV);
}