Exemplo n.º 1
0
        public RenderSettingsForm(CameraFactory initCF, FileRenderSettings initRenderSettings)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            renderSettings = initRenderSettings;
            cf = initCF;

            LoadRenderSettings();
        }
Exemplo n.º 2
0
        public FileRenderThread(IObject3D scene, DeviceManager dm, FileRenderSettings initRenderSettings)
        {
            this.renderSettings = initRenderSettings;

            renderSurface = new HiddenRenderSurface(dm, scene, renderSettings.Width, renderSettings.Height);

            frameCount = renderSettings.StartFrame;

            thread = new Thread(new ThreadStart(this.Run));

            // setup temp directory in case the user chooses to save to a file format other than bitmap
            tempDirectory = Application.StartupPath + thread.GetHashCode().ToString();

            // if not a bitmap make the temp directory
            if(renderSettings.FileFormat != FileFormat.bmp)
                Directory.CreateDirectory(tempDirectory);
        }
Exemplo n.º 3
0
        public RenderPreview(DeviceManager dm, SceneManager sm, FileRenderSettings settings)
        {
            // init DeviceManager and SceneManager
            this.dm = dm;
            this.sm = sm;

            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            renderPanel.DeviceManager = dm;
            renderPanel.SceneManager = sm;
            renderPanel.Camera = settings.Camera;
            renderPanel.Width = settings.Width;
            renderPanel.Height = settings.Height;
            this.renderPanel.Size = new System.Drawing.Size(settings.Width, settings.Height);
        }
Exemplo n.º 4
0
        public FileRenderThread(IObject3D scene, DeviceManager dm, FileRenderSettings initRenderSettings)
        {
            this.renderSettings = initRenderSettings;

            renderSurface = new HiddenRenderSurface(dm, scene, renderSettings.Width, renderSettings.Height);

            frameCount = renderSettings.StartFrame;

            thread = new Thread(new ThreadStart(this.Run));

            // setup temp directory in case the user chooses to save to a file format other than bitmap
            tempDirectory = Application.StartupPath + thread.GetHashCode().ToString();

            // if not a bitmap make the temp directory
            if (renderSettings.FileFormat != FileFormat.bmp)
            {
                Directory.CreateDirectory(tempDirectory);
            }
        }
Exemplo n.º 5
0
 public FileRenderThread NewFileRender(FileRenderSettings renderSettings)
 {
     return new FileRenderThread(sm.Scene,dm,renderSettings);
 }
Exemplo n.º 6
0
 public FileRenderThread NewFileRender(FileRenderSettings renderSettings)
 {
     return(new FileRenderThread(sm.Scene, dm, renderSettings));
 }
Exemplo n.º 7
0
        public MainForm()
        {
            // TODO:	get rid of this crap. This is a temporary fix to the MagicShelf
            //			selection bug
            string something = Midget.Command.CommandManager.Instance.ToString();
            something = DeviceManager.Instance.ToString();	// init the DM
            something = SceneManager.Instance.ToString();	// init the SM

            selectedObjects = new ArrayList();

            Midget.Events.EventFactory.DeleteObject +=new Midget.Events.Object.Lifetime.DeleteObjectEventHandler(EventFactory_DeleteObject);
            Midget.Events.EventFactory.SelectAdditionalObject +=new Midget.Events.Object.Selection.SelectAdditionalObjectEventHandler(EventFactory_SelectAdditionalObject);
            Midget.Events.EventFactory.DeselectObjects +=new Midget.Events.Object.Selection.DeselectObjectEventHandler(EventFactory_DeselectObjects);
            Midget.Events.EventFactory.CreateObject +=new Midget.Events.Object.Lifetime.CreateObjectEventHandler(EventFactory_CreateObject);
            Midget.Events.EventFactory.Transformation +=new Midget.Events.Object.Transformation.TransformationEventHandler(EventFactory_Transformation);

            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            renderSettings = new FileRenderSettings();
            renderSettings.Camera = CameraFactory.Instance.GetExistingCamera(0);
        }