private void TriangulateRoadSegment(Vector3 v1, Vector3 v2, Vector3 v3, Vector3 v4, Vector3 v5, Vector3 v6) { Roads.AddQuad(v1, v2, v4, v5); Roads.AddQuad(v2, v3, v5, v6); Roads.AddQuadUV(0f, 1f, 0f, 0f); Roads.AddQuadUV(1f, 0f, 0f, 0f); }
private void TriangulateRiverQuad(Vector3 v1, Vector3 v2, Vector3 v3, Vector3 v4, float elevation1, float elevation2, float v, bool reversed) { v1 = Vector3.ClampMagnitude(v1, elevation1); v2 = Vector3.ClampMagnitude(v2, elevation1); v3 = Vector3.ClampMagnitude(v3, elevation2); v4 = Vector3.ClampMagnitude(v4, elevation2); Rivers.AddQuad(v1, v2, v3, v4); if (reversed) { Rivers.AddQuadUV(1f, 0f, 0.8f - v, 0.6f - v); } else { Rivers.AddQuadUV(0f, 1f, v, v + 0.2f); } }