How to make mesh having array of vertices?

How to make mesh having array of vertices positions (and faces) so normals of faces will face outside (i.e. mesh will be visible)? I need it to my CSG alghorithm.

//edit: To be more specific, here what my structures are:

Vector3 faces[20][3]

First array index is face number, second index is face’s vertex number. Vertices are stored as their positions in 3d space.

If I understand your requirements, this should work:

Vector3[] vertices = new Vector3[faces.Length*3];
int[] tris = new Vector3[faces.Length*3];
for (int i = 0; i < faces.Length;)
	for (int j = 0; j < faces*.Length; j++)*
  • {*
    _ vertices[i*3 + j] = nvaces[i,j];_
    _ tris[i*3 + j] = i*3 + j;_
  • }*

mesh.vertices = vertices;
mesh.triangles = tris;
This assumes that your faces always have exactly 3 vertices.