Esempio n. 1
0
        public ParticleRenderer(ParticleSystem particleSystem, VrfGuiContext vrfGuiContext)
        {
            this.particleSystem    = particleSystem;
            childParticleRenderers = new List <ParticleRenderer>();
            this.vrfGuiContext     = vrfGuiContext;

            particles         = new List <Particle>();
            systemRenderState = new ParticleSystemRenderState();

            SetupEmitters(particleSystem.GetData(), particleSystem.GetEmitters());
            SetupInitializers(particleSystem.GetInitializers());
            SetupOperators(particleSystem.GetOperators());
            SetupRenderers(particleSystem.GetRenderers());

            SetupChildParticles(particleSystem.GetChildParticleNames(true));

            Start();
        }
Esempio n. 2
0
        // TODO: Passing in position here was for testing, do it properly
        public ParticleRenderer(ParticleSystem particleSystem, VrfGuiContext vrfGuiContext, Vector3 pos = default)
        {
            childParticleRenderers = new List <ParticleRenderer>();
            this.vrfGuiContext     = vrfGuiContext;

            particles         = new List <Particle>();
            systemRenderState = new ParticleSystemRenderState();

            systemRenderState.SetControlPoint(0, pos);

            SetupEmitters(particleSystem.GetData(), particleSystem.GetEmitters());
            SetupInitializers(particleSystem.GetInitializers());
            SetupOperators(particleSystem.GetOperators());
            SetupRenderers(particleSystem.GetRenderers());

            SetupChildParticles(particleSystem.GetChildParticleNames(true));

            Start();
        }