Exemplo n.º 1
0
 private Model3D CreateGeometry(bool isFinal)
 {
     return(FuelTankDesign.CreateGeometry(this.MaterialBrushes, base.SelectionEmissives,
                                          GetTransformForGeometry(isFinal),
                                          WorldColors.PlasmaTank_Color, WorldColors.PlasmaTank_Specular,
                                          isFinal));
 }
Exemplo n.º 2
0
        private void btnFuelTank_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                // Clear debug visuals
                foreach (var visual in _debugVisuals)
                {
                    _viewport.Children.Remove(visual);
                }
                _debugVisuals.Clear();

                #region OLD

                //// Material
                //MaterialGroup material = new MaterialGroup();
                //material.Children.Add(new DiffuseMaterial(new SolidColorBrush(_colors.FuelTank)));
                //material.Children.Add(_colors.FuelTankSpecular);

                //// Geometry Model
                //GeometryModel3D geometry = new GeometryModel3D();
                //geometry.Material = material;
                //geometry.BackMaterial = material;
                //geometry.Geometry = UtilityWPF.GetCapsule_AlongZ(20, 6, 1, 4);

                #endregion

                FuelTankDesign fuelTank = new FuelTankDesign(_options, false);

                // Model
                ModelVisual3D model = new ModelVisual3D();        // this is the expensive one, so as few of these should be made as possible
                model.Content = fuelTank.Model;

                // Add debug visuals
                _debugVisuals.Add(model);
                _viewport.Children.Add(_debugVisuals[_debugVisuals.Count - 1]);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), _msgboxCaption, MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Exemplo n.º 3
0
 public override UtilityNewt.IObjectMassBreakdown GetMassBreakdown(double cellSize)
 {
     return(FuelTankDesign.GetTankMassBreakdown(ref _massBreakdown, this.Scale, cellSize));
 }
Exemplo n.º 4
0
 public override CollisionHull CreateCollisionHull(WorldBase world)
 {
     return(FuelTankDesign.CreateTankCollisionHull(world, this.Scale, this.Orientation, this.Position));
 }