/// <summary> /// Constructor /// </summary> public SkyPlaneDescription() : base() { this.Static = true; this.CastShadow = false; this.DeferredEnabled = true; this.DepthEnabled = false; this.AlphaEnabled = false; this.MaxBrightness = 0.75f; this.MinBrightness = 0.15f; this.CloudBaseColor = new Color4(1f, 1f, 1f, 1f); this.Size = 100; this.Repeat = 2; this.PlaneWidth = 50; this.PlaneTop = 1f; this.PlaneBottom = -0.5f; this.FadingDistance = 20f; this.Velocity = 1f; this.Direction = Vector2.One; this.PerturbationScale = 0.3f; this.SkyMode = SkyPlaneModes.Static; }
/// <summary> /// Constructor /// </summary> /// <param name="scene">Scene</param> /// <param name="description">Sky plane description class</param> public SkyPlane(Scene scene, SkyPlaneDescription description) : base(scene, description) { var img1 = new ImageContent() { Streams = ContentManager.FindContent(description.ContentPath, description.Texture1Name), }; this.skyTexture1 = this.Game.ResourceManager.CreateResource(img1); var img2 = new ImageContent() { Streams = ContentManager.FindContent(description.ContentPath, description.Texture2Name), }; this.skyTexture2 = this.Game.ResourceManager.CreateResource(img2); this.skyMode = description.SkyMode; this.rotation = Matrix.Identity; this.MaxBrightness = description.MaxBrightness; this.MinBrightness = description.MinBrightness; this.FadingDistance = description.FadingDistance; this.Velocity = description.Velocity; this.PerturbationScale = description.PerturbationScale; this.Direction = description.Direction; this.CloudsBaseColor = description.CloudBaseColor; //Create sky plane GeometryUtil.CreateCurvePlane( description.Size, description.Repeat, description.PlaneWidth, description.PlaneTop, description.PlaneBottom, out Vector3[] vData, out Vector2[] uvs, out uint[] iData);