Ejemplo n.º 1
0
        public PictureBox3D(DeviceManager initDM, SceneManager initSM)
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            // initialize members
            nameVisible = true;				// show the name of this viewport on-screen?
            _drawMode = DrawMode.wireFrame;	// default to wireframe view
            arcBall = new ArcBall(this);
            arcBall.Radius = 1.0f;

            BuildCameraMenu();

            // new events
            Midget.Events.EventFactory.DeselectObjects +=new Midget.Events.Object.Selection.DeselectObjectEventHandler(EventFactory_DeselectObjects);
            Midget.Events.EventFactory.SelectAdditionalObject +=new Midget.Events.Object.Selection.SelectAdditionalObjectEventHandler(EventFactory_SelectAdditionalObject);
            Midget.Events.EventFactory.AdjustCameraEvent +=new Midget.Events.User.AdjustCameraEventHandler(EventFactory_AdjustCameraEvent);
            Midget.Events.EventFactory.SwitchEditModeEvent +=new Midget.Events.User.SwitchEditModeEventHandler(EventFactory_SwitchEditModeEvent);
            selectedObjects = new ArrayList();

            this.dm = initDM;

            // attach listener for render event
            dm.Render += new System.EventHandler(this.Viewport_Render);
            this.renderView += new RenderSingleViewHandler(dm.OnRenderSingleView);

            this.sm = initSM;

            this.ConfigureRenderTarget();
        }
Ejemplo n.º 2
0
        public RenderPanel(DeviceManager initDM, SceneManager initSM)
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            dm = initDM;
            sm = initSM;

            this.renderView += new RenderSingleViewHandler(dm.OnRenderSingleView);
        }
Ejemplo n.º 3
0
        public HiddenRenderSurface( DeviceManager initDM, IObject3D initScene, int initWidth, int initHeight)
        {
            this.dm = initDM;
            this.scene = initScene;
            this.width = initWidth;
            this.height = initHeight;

            this.InitRenderTarget();

            this.renderView += new RenderSingleViewHandler(dm.OnRenderSingleView);
        }
Ejemplo n.º 4
0
        public RenderPanel()
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            // init deviceManager and scene (safety)
            // - this should not be called
            try
            {
                this.dm = Midget.DeviceManager.Instance;
                this.sm = Midget.SceneManager.Instance;
            }
            catch
            {}

            this.renderView += new RenderSingleViewHandler(dm.OnRenderSingleView);
        }
Ejemplo n.º 5
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);
        }
Ejemplo n.º 6
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);
        }
Ejemplo n.º 7
0
 public FileRenderThreadFactory(DeviceManager initDM, SceneManager initSM)
 {
     this.dm = initDM;
     this.sm = initSM;
 }
Ejemplo n.º 8
0
 public FileRenderThreadFactory(DeviceManager initDM, SceneManager initSM)
 {
     this.dm = initDM;
     this.sm = initSM;
 }