public FormFor3DObjectParam(cObject3D Object3D) { this.Object3D = Object3D; InitializeComponent(); this.Text += " - " + Object3D.GetName(); this.numericUpDownPosX.ValueChanged -= new EventHandler(numericUpDownPosX_ValueChanged); this.numericUpDownPosY.ValueChanged -= new EventHandler(numericUpDownPosY_ValueChanged); this.numericUpDownPosZ.ValueChanged -= new EventHandler(numericUpDownPosZ_ValueChanged); this.numericUpDownOpacity.ValueChanged -= new EventHandler(numericUpDownOpacity_ValueChanged); this.radioButtonSolid.CheckedChanged -= new EventHandler(radioButtonSolid_CheckedChanged); this.radioButtonWireFrame.CheckedChanged -= new EventHandler(radioButtonWireFrame_CheckedChanged); this.radioButtonPoint.CheckedChanged -= new EventHandler(radioButtonPoint_CheckedChanged); if (this.Object3D.GetMode() == eMesh3DMode.SOLID) { this.radioButtonSolid.Checked = true; this.radioButtonWireFrame.Checked = false; this.radioButtonPoint.Checked = false; } else if (this.Object3D.GetMode() == eMesh3DMode.WIREFRAME) { this.radioButtonSolid.Checked = false; this.radioButtonWireFrame.Checked = true; this.radioButtonPoint.Checked = false; } else { this.radioButtonSolid.Checked = false; this.radioButtonWireFrame.Checked = false; this.radioButtonPoint.Checked = true; } this.radioButtonSolid.CheckedChanged += new EventHandler(radioButtonSolid_CheckedChanged); this.radioButtonWireFrame.CheckedChanged += new EventHandler(radioButtonWireFrame_CheckedChanged); this.radioButtonPoint.CheckedChanged += new EventHandler(radioButtonPoint_CheckedChanged); this.numericUpDownPosX.Value = (decimal)Object3D.GetPosition().X; this.numericUpDownPosY.Value = (decimal)Object3D.GetPosition().Y; this.numericUpDownPosZ.Value = (decimal)Object3D.GetPosition().Z; this.numericUpDownOpacity.Value = (decimal)Object3D.GetOpacity(); this.numericUpDownPosX.ValueChanged += new EventHandler(numericUpDownPosX_ValueChanged); this.numericUpDownPosY.ValueChanged += new EventHandler(numericUpDownPosY_ValueChanged); this.numericUpDownPosZ.ValueChanged += new EventHandler(numericUpDownPosZ_ValueChanged); this.numericUpDownOpacity.ValueChanged += new EventHandler(numericUpDownOpacity_ValueChanged); this.panelColor.BackColor = Object3D.Colour; }
private void AddObject3D(cObject3D Object3D) { // Object3D.SetColor(Object3D.Colour.R, Object3D.Colour.G, Object3D.Colour.B); // Object3D.vtk_Actor.SetPosition(Object3D.vtk_Actor.GetPosition()[0] * Xres, Object3D.vtk_Actor.GetPosition()[1] * Yres, Object3D.vtk_Actor.GetPosition()[2] * Zres); ListObject.Add(Object3D); Object3D.AddMeToTheWorld(ren1); }
private void AddObject3D(cObject3D Object3D) { Object3D.SetColor(Object3D.Colour); // Object3D.vtk_Actor.SetPosition(Object3D.vtk_Actor.GetPosition()[0] * Xres, Object3D.vtk_Actor.GetPosition()[1] * Yres, Object3D.vtk_Actor.GetPosition()[2] * Zres); ListObject.Add(Object3D); Object3D.AssociatedWorld = this; if (Object3D.AssociatedWorld.AssociatedVTKRenderer!=null) Object3D.AddMeToTheWorld(Object3D.AssociatedWorld.AssociatedVTKRenderer); }