Ejemplo n.º 1
0
 /// <summary>
 /// Adds a new vertex to the end of the Vertex list.
 /// </summary>
 /// <param name="vertex">Location of new vertex.</param>
 /// <returns>The index of the newly added vertex.</returns>
 public static int Add(this PlanktonVertexList vertexList, Point3d vertex)
 {
     return(vertexList.Add(vertex.X, vertex.Y, vertex.Z));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// <para>Moves a vertex by a vector.</para>
 /// </summary>
 /// <param name="index">Index of vertex to move.</param>
 /// <param name="vector">Vector to move by.</param>
 /// <returns><c>true</c> on success, <c>false</c> on failure.</returns>
 public static bool MoveVertex(this PlanktonVertexList vertexList, int index, Vector3d vector)
 {
     return(vertexList.SetVertex(index, vertexList[index].X + vector.X, vertexList[index].Y + vector.Y, vertexList[index].Z + vector.Z));
 }
Ejemplo n.º 3
0
 public static Vector3 GetPositionUnity(this PlanktonVertexList list, int i)
 {
     return(list[i].ToUnity());
 }
Ejemplo n.º 4
0
 /// <summary>
 /// <para>Sets or adds a vertex to the Vertex List.</para>
 /// <para>If [index] is less than [Count], the existing vertex at [index] will be modified.</para>
 /// <para>If [index] equals [Count], a new vertex is appended to the end of the vertex list.</para>
 /// <para>If [index] is larger than [Count], the function will return false.</para>
 /// </summary>
 /// <param name="index">Index of vertex to set.</param>
 /// <param name="vertex">Vertex location.</param>
 /// <returns><c>true</c> on success, <c>false</c> on failure.</returns>
 public static bool SetVertex(this PlanktonVertexList vertexList, int index, Point3d vertex)
 {
     return(vertexList.SetVertex(index, vertex.X, vertex.Y, vertex.Z));
 }
Ejemplo n.º 5
0
 public static int Add(this PlanktonVertexList vList, Point3d pt)
 {
     return(vList.Add(pt.X, pt.Y, pt.Z));
 }