Documentation API of the 'vmm3d.core.Transform' Java class
Transform
vmm3d.core

Class Transform

  • All Implemented Interfaces:
    Cloneable
    Direct Known Subclasses:
    Transform3D


    public class Transformextends Objectimplements Cloneable
    The transform that should be applied when an Exhibit is drawn. This class represents a 2D "Window-to-Viewport" transformation. (A 3D transform subclass will also include the projection transformation from 3D to 2D.) For example, an object of this type is used as a parmeter to vmm3d.core.Exhibit#doDraw(Graphics2D, View, Transform).

    An object of this class represents a rectangular "window" in the xy-plane and possibly a corresponding rectagular "viewport" of pixels. (The viewport is only valid during actual drawing operations, where the destination of the drawing is known; however, the transform is only likely to be used when this is true.) The window-to-viewport transformation is the one that is applied to xy-coordinates to transform them to pixel coordinates -- this transformation can be applied either automatically (when the apply2DTransform parameter to the setUpDrawInfo(org.freehep.graphics2d.VectorGraphics, int, int, int, int, boolean, boolean) method is set to true), or it can be performed by hand using information contained in the Transform object.

    The rectangle in the xy-plane is represented by four numbers xmin, xmax, ymin, and ymax. The pixel area is represented by the coordinates of its upper left corner (x and y) and by its width and height. The values of x, y, width, and height can be set only by calling the setUpDrawInfo method. Otherwise, they are 0. Note that this class does NOT enforce xmax greater than xmin or ymax greater than ymin. It does enforce that width and height are greater than 0. Note that the xmin, xmax, ymin, ymax might be adjusted from the values requested when setUpDrawInfo is called with preserveAspect set to true.

    A Transform emits a ChangeEvent when the requested window (xmin,xmax,ymin,ymax) changes; it does not emit a ChangeEvent when the viewport (pixel rectangle to which the window is mapped) changes. A Transform3D also emits a ChangeEvent when the 3D view changes.

Warning: You cannot see the full API documentation of this class since the access to the DatMelt documentation for third-party Java classes is denied. Guests can only view jhplot Java API. To view the complete description of this class and its methods, please request the full DataMelt membership.

If you are already a full member, please login to the DataMelt member area before visiting this documentation.