public void showHideManipulator() { if (showManipulator) { if (_manipulator == null) { Rect3D r = this.Content.Bounds; _manipulator = new CombinedManipulator(); //_manipulator.Position = new Point3D(r.X + (r.SizeX/2),r.Y + (r.SizeY / 2),r.Z + (r.SizeZ/2)); _manipulator.Offset = new Vector3D(r.X + (r.SizeX / 2), r.Y + (r.SizeY / 2), r.Z + (r.SizeZ / 2)); _manipulator.Pivot = new Point3D(r.X + (r.SizeX / 2), r.Y + (r.SizeY / 2), r.Z + (r.SizeZ / 2)); //_manipulator.Pivot = new Point3D(0, 0, 0); _manipulator.Diameter = Math.Max(r.SizeX, Math.Max(r.SizeY, r.SizeZ)); _manipulator.Length = _manipulator.Diameter * 0.75; _manipulator.Bind(this); } this.parent.Children.Add(_manipulator); showManipulator = false; } else { this.parent.Children.Remove(_manipulator); _manipulator = null; showManipulator = true; } }
public CombinedManipulatorExploration() { var manipulator = new CombinedManipulator(); Sphere = new SphereVisual3D() { Radius = 1 }; manipulator.Bind(Sphere); InitializeComponent(); viewport.Children.Add(Sphere); viewport.Children.Add(manipulator); }
/// <summary> /// @Deprecated /// Not used anymore since changes in CONTAINER design. /// <see cref="displayManipulator"/> /// </summary> public void showHideManipulator() { this.brace1.clearManipulator(); if (_manipulator == null) { Rect3D r = this.Content.Bounds; _manipulator = new CombinedManipulator(); //_manipulator.Position = new Point3D(r.X + (r.SizeX/2),r.Y + (r.SizeY / 2),r.Z + (r.SizeZ/2)); _manipulator.Offset = new Vector3D(r.X + (r.SizeX / 2), r.Y + (r.SizeY / 2), r.Z + (r.SizeZ / 2)); _manipulator.Pivot = new Point3D(r.X + (r.SizeX / 2), r.Y + (r.SizeY / 2), r.Z + (r.SizeZ / 2)); //_manipulator.Pivot = new Point3D(0, 0, 0); //_manipulator.Diameter = Math.Max(r.SizeX, Math.Max(r.SizeY, r.SizeZ)) + 1; //_manipulator.Length = _manipulator.Diameter * 0.75; _manipulator.Bind(this); } this.brace1.Children.Add(_manipulator); }
public void displayManipulator() { this.parent.cleanManipulator(); if (_manipulator == null) { Rect3D r = this.Content.Bounds; _manipulator = new CombinedManipulator(); //_manipulator.Position = new Point3D(r.X + (r.SizeX/2),r.Y + (r.SizeY / 2),r.Z + (r.SizeZ/2)); _manipulator.Offset = new Vector3D(r.X + (r.SizeX / 2), r.Y + (r.SizeY / 2), r.Z + (r.SizeZ / 2)); _manipulator.Pivot = new Point3D(r.X + (r.SizeX / 2), r.Y + (r.SizeY / 2), r.Z + (r.SizeZ / 2)); //_manipulator.Pivot = new Point3D(0, 0, 0); _manipulator.Diameter = Math.Max(r.SizeX, Math.Max(r.SizeY, r.SizeZ)) + 1; _manipulator.Length = _manipulator.Diameter * 0.75; _manipulator.Bind(this); Bind(_manipulator); //addTeethRoot(); //test //MeshGeometry3D mesh = GetMesh(); //drawBorderEdges(mesh); } tc.Children.Add(_manipulator); }