Module imp3d

Class Scale

All Implemented Interfaces:
Transformation, Manageable, PersistenceCapable, Shareable, UserFields, XObject, Disposable, EventListener, Map, Serializable, EventListener

public class Scale extends TransformTool
Scaling tool. There are three cubes for each axis. Clicking and dragging them allows to resize the object in that direction. There is a fourth cube in the center of the tool. Clicking and dragging the mouse allows to resize the object in all directions by the same amount. There is a minimum scale factor of 1% of the original size for resizing an object with one drag operation. Shrinking an object even further requires to finish the drag and start a new one. This prevents objects from disappearing unvoluntarily.
Author:
Reinhard Hemmerling
See Also:
  • Field Details

  • Constructor Details

    • Scale

      public Scale()
  • Method Details

    • getNTypeImpl

      protected Node.NType getNTypeImpl()
      Description copied from class: Node
      This method returns the Node.NType which describes the managed fields of the class of this node. This method has to be implemented in every concrete subclass.
      Overrides:
      getNTypeImpl in class Node
      Returns:
      type describing the managed fields of the class of this node
    • newInstance

      protected Node newInstance()
      Description copied from class: Node
      This method returns a new instance of the class of this node. This method has to be implemented in every concrete subclass.
      Overrides:
      newInstance in class Node
      Returns:
      new instance of class of this node
    • adjustToolTransformation

      protected void adjustToolTransformation(Matrix4d t, CameraBase c)
      Description copied from class: ToolRoot3D
      This method is invoked to compute an adjustment of the tool coordinates system. The invoker sets t to the transformation matrix from target coordinates to world coordinates. Implementations of this method may adjust t, e.g., they may set a certain scaling factor between tool coordinates and camera coordinates in order to ensure a fixed size of tool nodes on the 3D view.
      Overrides:
      adjustToolTransformation in class TransformTool
      Parameters:
      t - the tool transformation to be adjusted
      c - the camera of the tool's 3D view