java.lang.Object
org.jfree.chart3d.graphics3d.RenderingInfo
Rendering info returned from the
Drawable3D
draw()
method.- Since:
- 1.3
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRenderingInfo
(List<Face> faces, Point2D[] projPts, double dx, double dy) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addElement
(RenderedElement element) Adds a rendered element to the rendering info.void
addOffsetElement
(RenderedElement element) Adds a rendered element to the list of offset elements.fetchObjectAt
(double x, double y) Fetches the object, if any, that is rendered at(x, y)
.findElementAt
(double x, double y) Finds the rendered element, if any, at the location(x, y)
.double
getDX()
Returns the x-translation amount.double
getDY()
Returns the y-translation amount.getFaces()
Returns the list of faces rendered.Point2D[]
Returns the projected points.
-
Field Details
-
dy
The y-translation.
-
-
Constructor Details
-
RenderingInfo
Creates a new instance.- Parameters:
faces
- the rendered faces (in order of rendering).projPts
- the projected points for all vertices in the 3D model.dx
- the x-delta.dy
- the y-delta.
-
-
Method Details
-
getFaces
Returns the list of faces rendered.- Returns:
- The list of faces.
-
getProjectedPoints
Returns the projected points.- Returns:
- The projected points.
-
getDX
Returns the x-translation amount. All projected points are centered on (0, 0) but the rendering to the screen (or other Graphics2D target) performs two translations: the first is to the center of the bounding rectangle, and the second is to apply the translate2D attribute of the chart. The result of these translations is stored here and used in the fetchObjectAt(x, y) method.- Returns:
- The x-translation.
-
getDY
Returns the y-translation amount.- Returns:
- The y-translation.
-
addElement
Adds a rendered element to the rendering info.- Parameters:
element
- the element (null
not permitted).
-
addOffsetElement
Adds a rendered element to the list of offset elements.- Parameters:
element
- the element (null
not permitted).
-
fetchObjectAt
Fetches the object, if any, that is rendered at(x, y)
.- Parameters:
x
- the x-coordinate.y
- the y-coordinate.- Returns:
- The object (or
null
).
-
findElementAt
Finds the rendered element, if any, at the location(x, y)
. The method first calls fetchObjectAt(x, y) to see if there is an object at the specified location and, if there is, returns a new RenderedElement instance for that object. Otherwise, it searches the otherElements list to see if there is some other element (such as a title, legend, axis label or axis tick label) and returns that item. Finally, if no element is found, the method returnsnull
.- Parameters:
x
- the x-coordinate.y
- the y-coordinate.- Returns:
- The interactive element or
null
.
-