public class ViewAdjuster extends Object
Modifier and Type | Field and Description |
---|---|
static int |
ADJUST_BOTH
Fit the points both horizontally and vertically
|
static int |
ADJUST_HORIZONTAL
Fit the points horizontally
|
static int |
ADJUST_VERTICAL
Fit the points vertically
|
Constructor and Description |
---|
ViewAdjuster(Image3DUniverse univ,
int dir)
Create a new ViewAdjuster.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Content c)
Add another Content which should be completely visible in the canvas.
|
void |
add(Point3d p)
Add another point which should be visible in the canvas; the point is
expected to be in vworld coordinates.
|
void |
add(Transform3D localToVworld,
Point3d local)
Add another point which should be visible in the canvas; the point is
expected to be in local coordinates, with the given local-to-vworld
transformation.
|
void |
addCenterOf(Iterable<Content> contents)
Make sure that the average center of all contents is visible in the canvas.
|
void |
apply()
After all points/contents were added, apply() finally adjusts center and
zoom transformations of the view.
|
public static final int ADJUST_HORIZONTAL
public static final int ADJUST_VERTICAL
public static final int ADJUST_BOTH
public ViewAdjuster(Image3DUniverse univ, int dir)
dir
- One of ADJUST_HEIGHT, ADJUST_WIDTH or ADJUST_BOTH. The former
adjusts the view so that the added points fit in width, the latter
so that they fit in height in the canvas.public void apply()
public void addCenterOf(Iterable<Content> contents)
public void add(Content c)
public void add(Transform3D localToVworld, Point3d local)
public void add(Point3d p)
Copyright © 2015–2021 Fiji. All rights reserved.