public AddVertex ( double x, double y, VertexCmd cmd ) : void | ||
x | double | |
y | double | |
cmd | VertexCmd | |
return | void |
public void AddVertex(double x, double y, VertexCmd cmd)
{
if (m_num_vertices >= m_allocated_vertices)
{
AllocIfRequired(m_num_vertices);
}
m_coord_xy[m_num_vertices << 1] = x;
m_coord_xy[(m_num_vertices << 1) + 1] = y;
m_cmds[m_num_vertices] = (byte)cmd;
m_num_vertices++;
}
//--------------------------------------------------
public static VertexStore CreateVxs(IEnumerable <VertexData> iter, VertexStore vxs) { foreach (VertexData v in iter) { vxs.AddVertex(v.x, v.y, v.command); } return(vxs); }