/// <summary> /// コンストラクタ /// </summary> public Mesh(IEnumerable <Point3d> vertices, IEnumerable <Pointd> uvs, IEnumerable <int> indices) { if (vertices == null) { throw new ArgumentNullException("vertices"); } if (indices == null) { throw new ArgumentNullException("indexes"); } if (uvs == null) { throw new ArgumentNullException("uvs"); } VertexArray = vertices.ToArray(); IndexArray = indices.ToArray(); TextureUVArray = uvs.ToArray(); if (VertexArray.Count() != TextureUVArray.Count()) { throw new ArgumentException( "頂点配列とテクスチャUV配列の数が一致しません。"); } if (IndexArray.Count() % 3 != 0) { throw new ArgumentException( "インデックス配列は三角形による指定をお願いします。"); } }
public long Count() { return(IndexArray.Count()); }