public class TracePoint2DUtil extends Object
ITracePoint2D
instances.
Constructor and Description |
---|
TracePoint2DUtil() |
Modifier and Type | Method and Description |
---|---|
static IAxis<?> |
getAxisXOfTracePoint(ITracePoint2D tracePoint)
Returns the x-axis this tracepoint is related to.
|
static IAxis<?> |
getAxisYOfTracePoint(ITracePoint2D tracePoint)
Returns the y-axis this tracepoint is related to.
|
static Chart2D |
getChartFromTrace(ITrace2D trace)
Returns the chart this trace is attached to.
|
static Chart2D |
getChartFromTracePoint(ITracePoint2D tracePoint)
Returns the chart this tracepoint is attached to.
|
static ITrace2D |
getTraceFromTracePoint(ITracePoint2D tracePoint)
Returns the trace this tracepoint is attached to.
|
static ITracePoint2D |
interpolateVisible(ITracePoint2D invisible,
ITracePoint2D visible,
ITracePointProvider tracePointProvider)
Interpolates (linear) the two neighboring points.
|
public static final Chart2D getChartFromTracePoint(ITracePoint2D tracePoint) throws IllegalStateException
tracePoint
- the tracepoint to find the chart of.IllegalStateException
- if the tracepoint is not contained in an ITrace2D
which
is added to a Chart2D
.public static final Chart2D getChartFromTrace(ITrace2D trace) throws IllegalStateException
trace
- the trace to find the chart of.IllegalStateException
- if the trace is not added to a Chart2D
.public static final IAxis<?> getAxisYOfTracePoint(ITracePoint2D tracePoint) throws IllegalStateException
tracePoint
- the tracepoint to find the chart of.IllegalStateException
- if the tracepoint is not contained in an ITrace2D
which
is added to a Chart2D
.public static final IAxis<?> getAxisXOfTracePoint(ITracePoint2D tracePoint) throws IllegalStateException
tracePoint
- the tracepoint to find the chart of.IllegalStateException
- if the tracepoint is not contained in an ITrace2D
which
is added to a Chart2D
.public static final ITrace2D getTraceFromTracePoint(ITracePoint2D tracePoint) throws IllegalStateException
tracePoint
- the tracepoint to find the chart of.IllegalStateException
- if the tracepoint is not contained in an ITrace2D
.public static ITracePoint2D interpolateVisible(ITracePoint2D invisible, ITracePoint2D visible, ITracePointProvider tracePointProvider)
Calling this method only makes sense if argument invisible is not null or if argument visible is not null (if then invisible is null, the visible point will be returned).
Precondition
Given points scaled values (TracePoint2D.getScaledX()
,
TracePoint2D.getScaledY()
) are computed by division of the x and y
rage. So the bounding box (0,0) (1,1) defines the visible area.
Important
Visibility is determined only by their internally normalized coordinates
that are within [0.0,1.0] for visible points. The original x and y value is
not set to the resulting point, you have to scale this up (by
multiplication with your x and y value range) by yourself!
Interpolation is done by the two point form:
visible
- the visible point.invisible
- the invisible point.tracePointProvider
- needed to create a new trace point of the desired subtype.Copyright © 2018. All rights reserved.