Esempio n. 1
0
                    public static EllipsoidEmitterFactory FromBaseObject(BaseObject baseObj)
                    {
                        if (baseObj == null || baseObj.NativeObject == IntPtr.Zero)
                        {
                            return(null);
                        }
                        EllipsoidEmitterFactory obj = baseObj as  EllipsoidEmitterFactory;

                        if (object.Equals(obj, null))
                        {
                            obj = new EllipsoidEmitterFactory(CreatedWhenConstruct.CWC_NotToCreate);
                            obj.BindNativeObject(baseObj.NativeObject, "CEllipsoidEmitterFactory");
                            obj.IncreaseCast();
                        }

                        return(obj);
                    }
Esempio n. 2
0
        public void Initialize()
        {
            ParticleEmitterFactory  emitterFactory;
            ParticleAffectorFactory affectorFactory;

            // box emitter
            emitterFactory = new BoxEmitterFactory();
            ParticleSystemManager.Instance.AddEmitterFactory(emitterFactory);

            // point emitter
            emitterFactory = new PointEmitterFactory();
            ParticleSystemManager.Instance.AddEmitterFactory(emitterFactory);

            // cylinder emitter
            emitterFactory = new CylinderEmitterFactory();
            ParticleSystemManager.Instance.AddEmitterFactory(emitterFactory);

            // ellipsoid emitter
            emitterFactory = new EllipsoidEmitterFactory();
            ParticleSystemManager.Instance.AddEmitterFactory(emitterFactory);

            // hollow ellipsoid emitter
            emitterFactory = new HollowEllipsoidEmitterFactory();
            ParticleSystemManager.Instance.AddEmitterFactory(emitterFactory);

            // ring emitter
            emitterFactory = new RingEmitterFactory();
            ParticleSystemManager.Instance.AddEmitterFactory(emitterFactory);

            // linear force affector
            affectorFactory = new LinearForceAffectorFactory();
            ParticleSystemManager.Instance.AddAffectorFactory(affectorFactory);

            // color fader affector
            affectorFactory = new ColorFaderAffectorFactory();
            ParticleSystemManager.Instance.AddAffectorFactory(affectorFactory);

            // color fader 2 affector
            affectorFactory = new ColorFaderAffector2Factory();
            ParticleSystemManager.Instance.AddAffectorFactory(affectorFactory);

            // color image affector
            affectorFactory = new ColorImageAffectorFactory();
            ParticleSystemManager.Instance.AddAffectorFactory(affectorFactory);

            // color interpolator affector
            affectorFactory = new ColorInterpolatorAffectorFactory();
            ParticleSystemManager.Instance.AddAffectorFactory(affectorFactory);

            // scale affector
            affectorFactory = new ScaleAffectorFactory();
            ParticleSystemManager.Instance.AddAffectorFactory(affectorFactory);

            // scale affector
            affectorFactory = new RotationAffectorFactory();
            ParticleSystemManager.Instance.AddAffectorFactory(affectorFactory);

            // deflector plane affector
            affectorFactory = new DeflectorPlaneAffectorFactory();
            ParticleSystemManager.Instance.AddAffectorFactory(affectorFactory);

            //direction randomizer affector
            affectorFactory = new DirectionRandomizerAffectorFactory();
            ParticleSystemManager.Instance.AddAffectorFactory(affectorFactory);
        }
Esempio n. 3
0
                    public BaseObject Create()
                    {
                        EllipsoidEmitterFactory emptyInstance = new EllipsoidEmitterFactory(CreatedWhenConstruct.CWC_NotToCreate);

                        return(emptyInstance);
                    }
        public void Start()
        {
            ParticleEmitterFactory  emitterFactory;
            ParticleAffectorFactory affectorFactory;

            // point emitter
            emitterFactory = new PointEmitterFactory();
            ParticleSystemManager.Instance.AddEmitterFactory(emitterFactory);

            // box emitter
            emitterFactory = new BoxEmitterFactory();
            ParticleSystemManager.Instance.AddEmitterFactory(emitterFactory);

            // ellipsoid emitter
            emitterFactory = new EllipsoidEmitterFactory();
            ParticleSystemManager.Instance.AddEmitterFactory(emitterFactory);

            // cylinder emitter
            emitterFactory = new CylinderEmitterFactory();
            ParticleSystemManager.Instance.AddEmitterFactory(emitterFactory);

            // ring emitter
            emitterFactory = new RingEmitterFactory();
            ParticleSystemManager.Instance.AddEmitterFactory(emitterFactory);

            // hollow ellipsoid emitter
            emitterFactory = new HollowEllipsoidEmitterFactory();
            ParticleSystemManager.Instance.AddEmitterFactory(emitterFactory);

            // draw emitter
            // emitterFactory = new DrawEmitterFactory();
            // ParticleSystemManager.Instance.AddEmitterFactory(emitterFactory);

            // linear force affector
            affectorFactory = new LinearForceAffectorFactory();
            ParticleSystemManager.Instance.AddAffectorFactory(affectorFactory);

            // color fader affector
            affectorFactory = new ColorFaderAffectorFactory();
            ParticleSystemManager.Instance.AddAffectorFactory(affectorFactory);

            // color fader 2 affector
            affectorFactory = new ColorFaderAffector2Factory();
            ParticleSystemManager.Instance.AddAffectorFactory(affectorFactory);

            // color image affector
            affectorFactory = new ColorImageAffectorFactory();
            ParticleSystemManager.Instance.AddAffectorFactory(affectorFactory);

            // color interpolator affector
            affectorFactory = new ColorInterpolatorAffectorFactory();
            ParticleSystemManager.Instance.AddAffectorFactory(affectorFactory);

            // scale affector
            affectorFactory = new ScaleAffectorFactory();
            ParticleSystemManager.Instance.AddAffectorFactory(affectorFactory);

            // scale affector
            affectorFactory = new RotationAffectorFactory();
            ParticleSystemManager.Instance.AddAffectorFactory(affectorFactory);

            // TODO: Ogre has direction and deflector affectors
        }