addMaterials method
(en) Add Sp3dMaterials to this object and returns the corresponding index. This method will add the material as is even if it already exists.
(ja) このオブジェクトにSp3dMaterialを追加し、対応するインデックスを返します。 このメソッドは既に存在するマテリアルの場合でもそのまま追加します。
m
: The Sp3dMaterials you want to add to this object.
Implementation
List<int> addMaterials(List<Sp3dMaterial> m) {
final int nowLen = materials.length;
List<int> r = [];
for (int i = 0; i < m.length; i++) {
materials.add(m[i]);
r.add(nowLen + i);
}
return r;
}