Ejemplo n.º 1
0
		/// <summary>
		/// Handles the click event by opening the text tool dialog.
		/// </summary>
		/// <param name="e">EventArgs.</param>
		/// <param name="position">Mouse position.</param>
		/// <returns>The mouse state handler for handling the next mouse events.</returns>
		public override void OnClick(PointD3D position, MouseButtonEventArgs e)
		{
			base.OnClick(position, e);

			_cachedActiveLayer = _grac.ActiveLayer;
			_cachedActiveLayerTransformation = _cachedActiveLayer.TransformationFromRootToHere();

			PointD3D hitPointOnLayerPlaneInLayerCoordinates;
			VectorD3D rotationsRadian;
			GetHitPointOnActiveLayerPlaneFacingTheCamera(_grac.Doc, _grac.ActiveLayer, position, out hitPointOnLayerPlaneInLayerCoordinates, out rotationsRadian);

			double sphereDiameter = _cachedActiveLayer.Size.Length / 10;
			Ellipsoid tgo = new Ellipsoid();
			tgo.SetParentSize(_cachedActiveLayer.Size, false);
			tgo.Size = new VectorD3D(sphereDiameter, sphereDiameter, sphereDiameter);
			tgo.Position = hitPointOnLayerPlaneInLayerCoordinates;
			tgo.ParentObject = _grac.ActiveLayer;

			// deselect the text tool
			_grac.SetGraphToolFromInternal(GraphToolType.ObjectPointer);

			_grac.ActiveLayer.GraphObjects.Add(tgo);
		}
Ejemplo n.º 2
0
		public Ellipsoid(Ellipsoid from)
			: base(from)
		{
		}