HelixToolkit.Wpf.MeshBuilder.AddBox C# (CSharp) Method

AddBox() public method

Adds a box aligned with the X, Y and Z axes.
public AddBox ( System.Windows.Media.Media3D.Point3D center, double xlength, double ylength, double zlength ) : void
center System.Windows.Media.Media3D.Point3D /// The center point of the box. ///
xlength double /// The length of the box along the X axis. ///
ylength double /// The length of the box along the Y axis. ///
zlength double /// The length of the box along the Z axis. ///
return void
        public void AddBox(Point3D center, double xlength, double ylength, double zlength)
        {
            this.AddBox(center, xlength, ylength, zlength, BoxFaces.All);
        }

Same methods

MeshBuilder::AddBox ( System.Windows.Media.Media3D.Point3D center, double xlength, double ylength, double zlength, BoxFaces faces ) : void
MeshBuilder::AddBox ( System.Windows.Media.Media3D.Rect3D rectangle ) : void

Usage Example

示例#1
3
 public MainViewModel()
 {
     var gm = new MeshBuilder();
     gm.AddBox(new Point3D(0, 0, 0.5), 1, 1, 1);
     gm.AddCylinder(new Point3D(5, 0, 0), new Point3D(5, 0, 5), 1, 36);
     this.Model = new GeometryModel3D(gm.ToMesh(true), Materials.Blue);
     this.Model.Freeze();
 }
All Usage Examples Of HelixToolkit.Wpf.MeshBuilder::AddBox