Module org.jfree.chart3d
Package org.jfree.chart3d.graphics3d

# Class RenderingInfo

java.lang.Object
org.jfree.chart3d.graphics3d.RenderingInfo

public class RenderingInfo extends Object
Rendering info returned from the `Drawable3D` `draw()` method.

Since:
  1.3

## Field Summary

Fields
Modifier and Type
Field
Description
`double`
`dy`
The y-translation.

## Constructor Summary

Constructors
Constructor
Description
`RenderingInfo(List<Face> faces, Point2D[] projPts, double dx, double dy)`
Creates a new instance.

## Method Summary

Modifier and Type
Method
Description
`void`
`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.
`Object3D`
`fetchObjectAt(double x, double y)`
Fetches the object, if any, that is rendered at `(x, y)`.
`RenderedElement`
`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.
`List<Face>`
`getFaces()`
Returns the list of faces rendered.
`Point2D[]`
`getProjectedPoints()`
Returns the projected points.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### dy

public double dy
The y-translation.

## Constructor Details

### RenderingInfo

public RenderingInfo(List<Face> faces, Point2D[] projPts, double dx, double dy)
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

public List<Face> getFaces()
Returns the list of faces rendered.

Returns:
  The list of faces.

### getProjectedPoints

public Point2D[] getProjectedPoints()
Returns the projected points.

Returns:
  The projected points.

### getDX

public double 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

public double getDY()
Returns the y-translation amount.

Returns:
  The y-translation.

### addElement

public void addElement(RenderedElement element)
Adds a rendered element to the rendering info.

Parameters:
  `element` - the element (`null` not permitted).

### addOffsetElement

public void addOffsetElement(RenderedElement element)
Adds a rendered element to the list of offset elements.

Parameters:
  `element` - the element (`null` not permitted).

### fetchObjectAt

public Object3D fetchObjectAt(double x, double y)
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

public RenderedElement findElementAt(double x, double y)
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 returns `null`.

Parameters:
  `x` - the x-coordinate.
  `y` - the y-coordinate.
Returns:
  The interactive element or `null`.