public JadeSkyBox(string[] textures) { Files = textures; SetScale(new Vector3(500)); Sides = new JadeTexturedQuad[6]; CreateSides(); CalculateOffsets(); }
private void CreateSides() { for (int i = 0; i < 6; i++) { Sides[i] = new JadeTexturedQuad(Files[i]); Sides[i].SetScale(Scale); } Sides[0].SetRotation(Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), MathHelper.PiOver2)); Sides[1].SetRotation(Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), -MathHelper.PiOver2)); Sides[2].SetRotation(Quaternion.CreateFromAxisAngle(new Vector3(0, 1, 0), MathHelper.PiOver2)); Sides[3].SetRotation(Quaternion.CreateFromAxisAngle(new Vector3(0, 1, 0), -MathHelper.PiOver2)); Sides[5].SetRotation(Quaternion.CreateFromAxisAngle(new Vector3(0, 1, 0), MathHelper.Pi)); }