Class Cube.OrderedCube
- java.lang.Object
-
- gov.nasa.worldwindx.examples.tutorial.Cube.OrderedCube
-
- All Implemented Interfaces:
OrderedRenderable
,Renderable
- Enclosing class:
- Cube
protected class Cube.OrderedCube extends java.lang.Object implements OrderedRenderable
This class holds the Cube's Cartesian coordinates. An instance of it is added to the scene controller's ordered renderable queue during picking and rendering.
-
-
Field Summary
Fields Modifier and Type Field Description protected Extent
extent
The cube's Cartesian bounding extent.protected double
eyeDistance
Distance from the eye point to the cube.protected Vec4
placePoint
Cartesian position of the cube, computed fromCube.position
.
-
Constructor Summary
Constructors Modifier Constructor Description protected
OrderedCube()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getDistanceFromEye()
Returns the ordered renderable's distance from the current view's eye point.void
pick(DrawContext dc, java.awt.Point pickPoint)
Executes a pick of the ordered renderable.void
render(DrawContext dc)
Causes thisRenderable
to render itself using the provided draw context.
-
-
-
Field Detail
-
placePoint
protected Vec4 placePoint
Cartesian position of the cube, computed fromCube.position
.
-
eyeDistance
protected double eyeDistance
Distance from the eye point to the cube.
-
extent
protected Extent extent
The cube's Cartesian bounding extent.
-
-
Method Detail
-
getDistanceFromEye
public double getDistanceFromEye()
Description copied from interface:OrderedRenderable
Returns the ordered renderable's distance from the current view's eye point. Intended to be used only to sort a list of ordered renderables according to eye distance, and only during frame generation when a view is active.- Specified by:
getDistanceFromEye
in interfaceOrderedRenderable
- Returns:
- the distance of the ordered renderable from the current view's eye point.
-
pick
public void pick(DrawContext dc, java.awt.Point pickPoint)
Description copied from interface:OrderedRenderable
Executes a pick of the ordered renderable.- Specified by:
pick
in interfaceOrderedRenderable
- Parameters:
dc
- the current draw context.pickPoint
- the pick point.
-
render
public void render(DrawContext dc)
Description copied from interface:Renderable
Causes thisRenderable
to render itself using the provided draw context.- Specified by:
render
in interfaceRenderable
- Parameters:
dc
- theDrawContext
to be used- See Also:
DrawContext
-
-