public static void DrawVertices(LINE_MODE mode, Camera camera, Color color, IList <Vector3> vertices, IList <int> indices, Matrix4x4 localToWorld) { if (camera == null || vertices == null || indices == null) { return; } int count = vertices.Count; IList <Vector3> verts = Vertices(count); for (int i = 0; i < count; i++) { verts[i] = localToWorld.MultiplyPoint(vertices[i]); } switch (mode) { case LINE_MODE.LINES: DrawVerticesAsLines(camera, color, verts, indices); break; case LINE_MODE.TRIANGLES: DrawVerticesAsTriangles(camera, color, verts, indices); break; case LINE_MODE.TETRAHEDRON: DrawVerticesAsTetrahedron(camera, color, verts, indices); break; } }
public SegmentRenderer(LINE_MODE lineMode, DRAW_ORIENTATION orientation) { LineMode = LINE_MODE.LINES; Orientation = DRAW_ORIENTATION.XY; }