Example #1
0
        public static bool RenderVideo(string dataPath, PartSysSpec spec, string filename)
        {
            var specStr = spec.ToSpec();

            var activeSys = ParticleSystem.FromSpec(specStr);

            return(activeSys.RenderVideo(Color.FromArgb(255, 32, 32, 32), filename));
        }
Example #2
0
        public static bool RenderVideo(Device device, string dataPath, PartSysSpec spec, string filename)
        {
            var specStr = spec.ToSpec();

            var activeSys = ParticleSystem.FromSpec(device, dataPath, specStr);

            return activeSys.RenderVideo(device, Color.FromArgb(255, 32, 32, 32), filename);
        }
Example #3
0
        private void NewSystem_OnClick(object sender, RoutedEventArgs e)
        {
            var NewSystem = new PartSysSpec();
            var shit      = Microsoft.VisualBasic.Interaction.InputBox("Enter system name", "System Name", "");

            NewSystem.Name = shit;

            Model.Systems.Add(NewSystem);
            Model.SelectedSystem = NewSystem;
        }
Example #4
0
    public PartSys(IPartSysExternal external, PartSysSpec spec)
    {
        _external = external;
        _spec     = spec;
        _emitters = new List <PartSysEmitter>(spec.GetEmitters().Count);
        // Instantiate the emitters
        for (var i = 0; i < _spec.GetEmitters().Count; ++i)
        {
            var emitterSpec = spec.GetEmitters()[i];
            _emitters.Add(new PartSysEmitter(external, emitterSpec));

            // Update the screen bounds
            _screenBounds.left   = MathF.Min(_screenBounds.left, emitterSpec.GetBoxLeft());
            _screenBounds.top    = MathF.Min(_screenBounds.top, emitterSpec.GetBoxTop());
            _screenBounds.right  = MathF.Max(_screenBounds.right, emitterSpec.GetBoxRight());
            _screenBounds.bottom = MathF.Max(_screenBounds.bottom, emitterSpec.GetBoxBottom());
        }
    }
 public PartSysEmitterSpec(PartSysSpec parent, string name)
 {
     mParent = parent;
     mName   = name;
     mParams = new IPartSysParam[(int)PartSysParamId.part_attractorBlend + 1];
 }