Example #1
0
        private void PushCompositors(Camera camera)
        {
            if (this.handle != null && this.handle.Camera == camera)
            {
                this.compositorStorage.Clear();

                Mogre.CompositorManager comMngr = Mogre.CompositorManager.Singleton;
                if (!comMngr.HasCompositorChain(this.handle))
                {
                    return;
                }

                Mogre.CompositorChain chain = comMngr.GetCompositorChain(this.handle);

                foreach (Mogre.CompositorInstance compositor in chain.GetCompositors())
                {
                    CompositorPush compData = new CompositorPush();
                    compData.Name    = compositor.Compositor.Name;
                    compData.Enabled = compositor.Enabled;
                    this.compositorStorage.Add(compData);
                }
            }
        }
Example #2
0
        private void PushCompositors(Camera camera)
        {
            if (this.handle != null && this.handle.Camera == camera)
            {
                this.compositorStorage.Clear();

                Mogre.CompositorManager comMngr = Mogre.CompositorManager.Singleton;
                if (!comMngr.HasCompositorChain(this.handle))
                    return;

                Mogre.CompositorChain chain = comMngr.GetCompositorChain(this.handle);

                foreach (Mogre.CompositorInstance compositor in chain.GetCompositors())
                {
                    CompositorPush compData = new CompositorPush();
                    compData.Name = compositor.Compositor.Name;
                    compData.Enabled = compositor.Enabled;
                    this.compositorStorage.Add(compData);
                }
            }
        }
Example #3
0
        public override void ProcessParameters(Mogre.NameValuePairList parameters)
        {
            Mogre.NameValuePairList.Iterator ni;

            if ((ni = parameters.Find("Name")) != parameters.End())
            {
                this.name = ni.Value;
            }

            if ((ni = parameters.Find("Dimensions")) != parameters.End())
            {
                this.dimensions = MogreX.StringConverter.ParseVector4(ni.Value);
            }

            if ((ni = parameters.Find("Skies")) != parameters.End())
            {
                this.skies = Mogre.StringConverter.ParseBool(ni.Value);
            }

            if ((ni = parameters.Find("Shadows")) != parameters.End())
            {
                this.shadows = Mogre.StringConverter.ParseBool(ni.Value);
            }

            if ((ni = parameters.Find("Overlays")) != parameters.End())
            {
                this.overlays = Mogre.StringConverter.ParseBool(ni.Value);
            }

            if ((ni = parameters.Find("CamPosition")) != parameters.End())
            {
                this.camPosition = Mogre.StringConverter.ParseVector3(ni.Value);
            }

            if ((ni = parameters.Find("CamOrientation")) != parameters.End())
            {
                this.camOrientation = Mogre.StringConverter.ParseQuaternion(ni.Value);
            }

            if ((ni = parameters.Find("CamClipDistance")) != parameters.End())
            {
                this.camClipDistance = MogreX.StringConverter.ParseVector2(ni.Value);
            }

            if ((ni = parameters.Find("CamPolyMode")) != parameters.End())
            {
                this.camPolyMode = (Mogre.PolygonMode)Mogre.StringConverter.ParseInt(ni.Value);
                OnPropertyChanged("CamPolyMode");
            }

            if ((ni = parameters.Find("CamFOV")) != parameters.End())
            {
                this.camFOV = Mogre.StringConverter.ParseReal(ni.Value);
            }

            if ((ni = parameters.Find("Colour")) != parameters.End())
            {
                this.colour = Mogre.StringConverter.ParseColourValue(ni.Value);
            }

            this.compositorStorage.Clear();
            for (int cx = 0; cx < 100; ++cx)
            {
                string searchstr = "Compositor" + Mogre.StringConverter.ToString(cx);
                if ((ni = parameters.Find(searchstr + "Name")) != parameters.End())
                {
                    CompositorPush compData = new CompositorPush();
                    compData.Name    = ni.Value;
                    ni               = parameters.Find(searchstr + "Enabled");
                    compData.Enabled = Mogre.StringConverter.ParseBool(ni.Value);
                    this.compositorStorage.Add(compData);
                }
                else
                {
                    break;
                }
            }
        }
Example #4
0
        public override void ProcessParameters(Mogre.NameValuePairList parameters)
        {
            Mogre.NameValuePairList.Iterator ni;

            if ((ni = parameters.Find("Name")) != parameters.End())
                this.name = ni.Value;

            if ((ni = parameters.Find("Dimensions")) != parameters.End())
                this.dimensions = MogreX.StringConverter.ParseVector4(ni.Value);

            if ((ni = parameters.Find("Skies")) != parameters.End())
                this.skies = Mogre.StringConverter.ParseBool(ni.Value);

            if ((ni = parameters.Find("Shadows")) != parameters.End())
                this.shadows = Mogre.StringConverter.ParseBool(ni.Value);

            if ((ni = parameters.Find("Overlays")) != parameters.End())
                this.overlays = Mogre.StringConverter.ParseBool(ni.Value);

            if ((ni = parameters.Find("CamPosition")) != parameters.End())
                this.camPosition = Mogre.StringConverter.ParseVector3(ni.Value);

            if ((ni = parameters.Find("CamOrientation")) != parameters.End())
                this.camOrientation = Mogre.StringConverter.ParseQuaternion(ni.Value);

            if ((ni = parameters.Find("CamClipDistance")) != parameters.End())
                this.camClipDistance = MogreX.StringConverter.ParseVector2(ni.Value);

            if ((ni = parameters.Find("CamPolyMode")) != parameters.End())
            {
                this.camPolyMode = (Mogre.PolygonMode)Mogre.StringConverter.ParseInt(ni.Value);
                OnPropertyChanged("CamPolyMode");
            }

            if ((ni = parameters.Find("CamFOV")) != parameters.End())
                this.camFOV = Mogre.StringConverter.ParseReal(ni.Value);

            if ((ni = parameters.Find("Colour")) != parameters.End())
                this.colour = Mogre.StringConverter.ParseColourValue(ni.Value);

            this.compositorStorage.Clear();
            for (int cx = 0; cx < 100; ++cx)
            {
                string searchstr = "Compositor" + Mogre.StringConverter.ToString(cx);
                if ((ni = parameters.Find(searchstr + "Name")) != parameters.End())
                {
                    CompositorPush compData = new CompositorPush();
                    compData.Name = ni.Value;
                    ni = parameters.Find(searchstr + "Enabled");
                    compData.Enabled = Mogre.StringConverter.ParseBool(ni.Value);
                    this.compositorStorage.Add(compData);
                }
                else
                    break;
            }
        }