Thanks for taking the time out to look at this. Here is the complete method. The code dealing with the vertex buffer is copied and edited from the XNA tutorials on www.riemers.net i've added various comments to try and explain what is going on or why the code is what it is.
int numPlanes = 20;
float size = 20;
triangles = new SHARenderedTriangle[numPlanes];
vb = new VertexBuffer(device, SHARenderedVertex.SizeInBytes * numPlanes * 3, ResourceUsage.WriteOnly);
triangleList = new SHARenderedVertex[numPlanes * 3];
Vector3 origin = new Vector3(-321.805f, 3.711f, 258.372f);
Random random = new Random();
int counter = 0;
int triangleCounter = 0;
for (int i = 0; i < numPlanes; i++)
{
//this is my attempt at making random right triangles, though i don't think it's actually working, but that currently is not my greatest concern, that's something i should be able to figure out on my own eventually
Vector3 tempOrigin = origin + new Vector3((float)random.NextDouble() * size, (float)random.NextDouble() * size, (float)random.NextDouble() * size);
Vector3 p1 = Vector3.Zero;
Vector3 p2 = new Vector3((float)random.NextDouble(), (float)random.NextDouble(), (float)random.NextDouble());
p2.Normalize();
p2 *= size / 3;
Vector3 direction = new Vector3((float)random.NextDouble(), (float)random.NextDouble(), (float)random.NextDouble());
Vector3 p3 = Vector3.Cross(p2, direction);
p3.Normalize();
p3 *= size / 3;
Vector3 p4 = p2 + p3;
p1 += tempOrigin;
p2 += tempOrigin;
p3 += tempOrigin;
p4 += tempOrigin;
//here are the 4 vertices that i'm trying to use as my quad
SHARenderedVertex v1 = new SHARenderedVertex(p1, new Vector2(0, 0));
SHARenderedVertex v2 = new SHARenderedVertex(p2, new Vector2(1, 0));
SHARenderedVertex v3 = new SHARenderedVertex(p3, new Vector2(1, 1));
SHARenderedVertex v4 = new SHARenderedVertex(p4, new Vector2(0, 1));
SHARenderedTriangle tempTriangle = new SHARenderedTriangle(v1, v2, v3, texture);
triangles[triangleCounter++] = tempTriangle;
//adding the following two lines will eventually cause the InvalidOperationException at the bottom
SHARenderedTriangle tempTriangle2 = new SHARenderedTriangle(v1, v3, v4, texture);
triangles2[triangleCounter++] = tempTriangle2;
}
counter = 0;
foreach (SHARenderedTriangle triangle in triangles)
{
triangleList[counter++] = triangle.vertices[0];
triangleList[counter++] = triangle.vertices[1];
triangleList[counter++] = triangle.vertices[2];
}
//this is where the exception is thrown, so the program never gets to drawing the triangles
vb.SetData(triangleList);