public static void DrawLine(Vector3 vec, Vector3 vec1, Color4 color) { P[0] = vec; P[1] = vec1; C[0] = color; C[1] = color; BP.SubData(P); //BN.SubData(N); BC.SubData(C); //BT.SubData(T); UpdateStates(new Color4(0.1f, 0.1f, 0.1f, 1.0f), Color4.White); B.Draw(PrimitiveType.Lines, 2); }
public static void DrawTriangle(Vector3 vec, Vector3 vec1, Vector3 vec2, Color4 color) { P[0] = vec; P[1] = vec1; P[2] = vec2; C[0] = color; C[1] = color; C[2] = color; Vector3 normal = EG.GetTriangleNormal(vec, vec1, vec2); N[0] = normal; N[1] = normal; N[2] = normal; BP.SubData(P); BN.SubData(N); BC.SubData(C); //BT.SubData(T); UpdateStates(new Color4(0.1f, 0.1f, 0.1f, 1.0f), Color4.White); B.Draw(PrimitiveType.Triangles, 3); }