public Plane(Game game, Vector3 position, Vector3 r, float i1, Plane previous, Plane next, Color color, float deltaY) { baseColor = color; MakeVectors(position, r, i1, previous, next, deltaY); MakeNormal(game, position, deltaY); type = 3; }
/// <summary> /// Make front and back vectors and take others from side planes /// </summary> private void MakeVectors(Vector3 position, Vector3 r, float i1, Plane previous, Plane next, float deltaY) { Vector prev = previous.v2; v1 = new Vector(position, r * i1, baseColor); v2 = next.v3; v3 = prev; v4 = new Vector(position + prev.delta, r * i1, baseColor); }