Beispiel #1
0
        // Methods --------------------------------------------------------------------
        public CaelumMoon(CaelumItem item)
        {
            Initialise(RenderQueueGroupID.SkiesEarly + 2, item.Material, item.Scale);
            mMainLight.CastShadows = false;

            mInstance = this;
        }
Beispiel #2
0
        // Methods --------------------------------------------------------------------
        public CaelumSkydome(CaelumItem item)
        {
            Initialise(RenderQueueGroupID.SkiesEarly + 1, item.Mesh, item.Scale, item.Rotation);

            Pass pass = MainMaterial.GetBestTechnique().Passes[0];
            mShadersEnabled = !(string.IsNullOrEmpty(pass.FragmentProgramName) ||
                                string.IsNullOrEmpty(pass.VertexProgramName));

            mInstance = this;
        }
Beispiel #3
0
        // Methods --------------------------------------------------------------------
        /// <summary>
        /// Creates the element in the world. It automatically
        /// sets up the mesh and the node with the infos in <paramref name="Item"/></summary>.
        /// <param name="item">Describes the element and all necessary infos</param>
        public CaelumClouds(CaelumItem item)
        {
            Initialise(RenderQueueGroupID.Queue2, item.Mesh, item.Scale, item.Rotation);

            Pass pass = MainMaterial.GetBestTechnique().Passes[0];
            mShadersEnabled = !(string.IsNullOrEmpty(pass.FragmentProgramName) ||
                                string.IsNullOrEmpty(pass.VertexProgramName));

            SetCloudMassOffset(Vec2.Zero);
            SetCloudDetailOffset(Vec2.Zero);
            SetCloudMassBlend(0.5f);

            mInstance = this;
        }
Beispiel #4
0
 // Methods --------------------------------------------------------------------
 public CaelumStarfield(CaelumItem item)
 {
     Initialise(RenderQueueGroupID.SkiesEarly, item.Mesh, item.Scale, item.Rotation);
     mInstance = this;
 }
Beispiel #5
0
 // Methods --------------------------------------------------------------------
 public CaelumSun(CaelumItem item)
 {
     Initialise(RenderQueueGroupID.Queue1, item.Material, item.Scale);
     mInstance = this;
 }
Beispiel #6
0
 /// <summary>
 /// Checks if an item describes a type of caelum.</summary>
 /// <remarks>An item can describe more than one type.</remarks>
 /// <param name="item">The item which may contain <paramref name="type"/></param>
 /// <param name="type">The type to search</param>
 /// <returns>Returns true if this item contains</returns>
 public static bool IsContainType(CaelumItem item, CaelumComponent type)
 {
     return IsContainType(item.Type, type);
 }