public class ViewPlatformTransformer extends Object
| Modifier and Type | Field and Description | 
|---|---|
| protected ImageCanvas3D | canvas | 
| protected Point3d | rotCenter | 
| protected DefaultUniverse | univ | 
| Constructor and Description | 
|---|
| ViewPlatformTransformer(DefaultUniverse univ,
                       BehaviorCallback callback)Initialize this ViewPlatformTransformer. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | centerAt(Point3d center)Center the view at the given point. | 
| double | distanceEyeOrigin()Calculates the distance between the viewer's eye and the origin in the
 vworld space. | 
| double | distanceEyeTo(Point3d p)Calculates the distance between the viewer's eye and an arbitrary point in
 the vworld space. | 
| void | getAxisVworld(Vector3d axis,
             Vector3d axisVW)Calculates from the specified axis in image plate coordinate system the
 corresponding vector in the vworld coordinate system. | 
| void | getCenterTranslation(Vector3d v)Retrieves the translation vector which is responsible for centering the
 view. | 
| void | getRotationCenter(Tuple3d ret)Copies the rotation center into the given Tuple3d. | 
| void | getTranslateTranslation(Vector3d v)Retrieves the manual translation vector of the view. | 
| void | getXDir(Vector3d v)Transforms the x-direction of the image plate to a normalized vector
 representing this direction in the vworld space. | 
| void | getXDir(Vector3d v,
       Transform3D ipToVWorld)Transforms the x-direction of the image plate to a normalized vector
 representing this direction in the vworld space. | 
| void | getYDir(Vector3d v)Stores the y-direction in the image plate coordinate system, i.e. | 
| void | getYDir(Vector3d v,
       Transform3D ipToVWorld)Transforms the y-direction of the image plate to a normalized vector
 representing this direction in the vworld space. | 
| void | getZDir(Vector3d v)Transforms the z-direction of the image plate to a normalized vector
 representing this direction in the vworld space. | 
| void | getZDir(Vector3d v,
       Transform3D ipToVWorld)Transforms the z-direction of the image plate to a normalized vector
 representing this direction in the vworld space. | 
| void | getZoomTranslation(Vector3d v)Retrieves the translation vector which is responsible for the current
 zooming and stores it in the given Vector3d. | 
| void | originInCanvas(Point2d out)Stores the canvas position of the origin of the vworld in the specified
 Point2d. | 
| void | pointInCanvas(Point3d in,
             Point2d out)Calculates where the specified point in the vworld space is placed on the
 canvas and stores the result in the specified Point2d. | 
| void | rotate(Vector3d axis,
      double angle)Rotates the view around the center of view by the specified angle around
 the given axis (of the image plate). | 
| void | rotateX(double angle)Rotates the view around the global rotation center by the specified angle
 around the x axis (of the image plate). | 
| void | rotateXY(double angleX,
        double angleY)Rotates the view around the center of view by the specified angles around
 the x and y axis (of the image plate). | 
| void | rotateY(double angle)Rotates the view around the global rotation center by the specified angle
 around the y axis (of the image plate). | 
| void | rotateZ(double angle)Rotates the view around the global rotation center by the specified angle
 around the z axis (of the image plate). | 
| void | translate(Vector3d v)Translates the view by the specified distances along the x, y and z
 direction (of the vworld). | 
| void | translateXY(double dx,
           double dy)Translates the view by the specified distances along the x and y direction
 (of the image plate). | 
| void | translateXY(int dxPix,
           int dyPix)Translates the view suitable to a mouse movement by dxPix and dyPix on the
 canvas. | 
| void | updateFrontBackClip() | 
| void | zoom(int units)Zoom by the specified amounts of units. | 
| void | zoomTo(double distance)Moves the view back (i.e. | 
protected DefaultUniverse univ
protected ImageCanvas3D canvas
protected final Point3d rotCenter
public ViewPlatformTransformer(DefaultUniverse univ, BehaviorCallback callback)
univ - callback - public void getRotationCenter(Tuple3d ret)
public void zoomTo(double distance)
distance - public void updateFrontBackClip()
public void zoom(int units)
units - public void centerAt(Point3d center)
center - public void translateXY(int dxPix,
                        int dyPix)
dxPix - dyPix - public void translate(Vector3d v)
v - The distances in x, y and z direction, given in vworld dimensions.public void translateXY(double dx,
                        double dy)
dx - The distance in x direction, given in vworld dimensions.dy - The distance in y direction, given in vworld dimensions.public void rotateX(double angle)
angle - The angle (in rad) around the x-axispublic void rotateY(double angle)
angle - The angle (in rad) around the y-axispublic void rotateZ(double angle)
angle - The angle (in rad) around the z-axispublic void rotate(Vector3d axis, double angle)
axis - The axis of rotation (in image plate coordinate system)angle - The angle (in rad) around the given axispublic void rotateXY(double angleX,
                     double angleY)
angleX - The angle (in rad) around the x-axisangleY - The angle (in rad) around the y-axispublic void getTranslateTranslation(Vector3d v)
v - public void getCenterTranslation(Vector3d v)
v - public void getZoomTranslation(Vector3d v)
v - public void originInCanvas(Point2d out)
out - public void pointInCanvas(Point3d in, Point2d out)
in - out - public double distanceEyeTo(Point3d p)
public double distanceEyeOrigin()
public void getAxisVworld(Vector3d axis, Vector3d axisVW)
public void getXDir(Vector3d v)
v - Vector3d in which the result in stored.public void getXDir(Vector3d v, Transform3D ipToVWorld)
v - Vector3d in which the result in stored.ipToVWorld - the image plate to vworld transformation.public void getYDir(Vector3d v)
v - Vector3d in which the result in stored.public void getYDir(Vector3d v, Transform3D ipToVWorld)
v - Vector3d in which the result in stored.ipToVWorld - the image plate to vworld transformation.public void getZDir(Vector3d v)
v - Vector3d in which the result in stored.public void getZDir(Vector3d v, Transform3D ipToVWorld)
v - Vector3d in which the result in stored.ipToVWorld - the image plate to vworld transformation.Copyright © 2015–2021 Fiji. All rights reserved.