public interface Camera
| Modifier and Type | Method and Description |
|---|---|
double |
getGraphDimension()
A number in GU that gives the approximate graph size (often the diagonal
of the graph).
|
GraphMetrics |
getMetrics()
Get the
GraphMetrics object linked to this Camera. |
Point3 |
getViewCenter()
The view centre (a point in graph units).
|
double |
getViewPercent()
The portion of the graph visible.
|
double |
getViewRotation()
The current rotation angle.
|
boolean |
isVisible(GraphicElement element)
True if the element would be visible on screen.
|
void |
removeGraphViewport()
Remove the specified graph view port.
|
void |
resetView()
Reset the view to the automatic mode.
|
void |
setAutoFitView(boolean on)
Enable or disable automatic adjustment of the view to see the entire
graph.
|
void |
setBounds(double minx,
double miny,
double minz,
double maxx,
double maxy,
double maxz)
Set the bounds of the graphic graph in GU.
|
void |
setGraphViewport(double minx,
double miny,
double maxx,
double maxy)
Specify exactly the minimum and maximum points in GU that are visible
(more points may be visible due to aspect-ratio constraints).
|
void |
setViewCenter(double x,
double y,
double z)
Change the view centre.
|
void |
setViewPercent(double percent)
Zoom the view.
|
void |
setViewRotation(double theta)
Rotate the view around its centre point by a given theta angles (in
degrees).
|
Point3 |
transformGuToPx(double x,
double y,
double z)
Transform a point in graph units into pixels.
|
Point3 |
transformPxToGu(double x,
double y)
Return the given point in pixels converted in graph units (GU) using the
inverse transformation of the current projection matrix.
|
Point3 getViewCenter()
void setViewCenter(double x,
double y,
double z)
x - The new abscissa.y - The new ordinate.z - The new depth.double getViewPercent()
void setViewPercent(double percent)
percent - Percent of the graph visible.double getViewRotation()
void setViewRotation(double theta)
theta - The rotation angle in degrees.double getGraphDimension()
void removeGraphViewport()
void setGraphViewport(double minx,
double miny,
double maxx,
double maxy)
minx - The minimum abscissa visible.miny - The minimum ordinate visible.maxx - The maximum abscissa visible.maxy - The maximum abscissa visible.removeGraphViewport()void resetView()
void setBounds(double minx,
double miny,
double minz,
double maxx,
double maxy,
double maxz)
minx - Lowest abscissa.miny - Lowest ordinate.minz - Lowest depth.maxx - Highest abscissa.maxy - Highest ordinate.maxz - Highest depth.GraphMetrics getMetrics()
GraphMetrics object linked to this Camera. It can be used
to convert pixels to graphic units and vice versa.void setAutoFitView(boolean on)
on - If true, automatic adjustment is enabled.Point3 transformGuToPx(double x, double y, double z)
Point3 transformPxToGu(double x, double y)
x - The source point abscissa in pixels.y - The source point ordinate in pixels.boolean isVisible(GraphicElement element)
element - The element to test.Copyright © 2015. All rights reserved.