Class ColladaMeshShape.OrderedMeshShape
- java.lang.Object
-
- gov.nasa.worldwind.ogc.collada.impl.ColladaMeshShape.OrderedMeshShape
-
- All Implemented Interfaces:
OrderedRenderable,Renderable
- Enclosing class:
- ColladaMeshShape
public static class ColladaMeshShape.OrderedMeshShape extends java.lang.Object implements OrderedRenderable
Class to represent an instance of the mesh to be drawn as an ordered renderable. We can't use the mesh itself as the ordered renderable because it may be drawn multiple times with different transforms.
-
-
Field Summary
Fields Modifier and Type Field Description protected doubleeyeDistanceDistance from the eye to the shape's reference position.protected ColladaMeshShapemeshShape to render.protected MatrixrenderMatrixTransform applied to this instance of the mesh.
-
Constructor Summary
Constructors Constructor Description OrderedMeshShape(ColladaMeshShape mesh, Matrix renderMatrix, double eyeDistance)Create a new ordered renderable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetDistanceFromEye()Returns the ordered renderable's distance from the current view's eye point.voidpick(DrawContext dc, java.awt.Point pickPoint)Executes a pick of the ordered renderable.voidrender(DrawContext dc)Causes thisRenderableto render itself using the provided draw context.
-
-
-
Field Detail
-
mesh
protected ColladaMeshShape mesh
Shape to render.
-
eyeDistance
protected double eyeDistance
Distance from the eye to the shape's reference position.
-
renderMatrix
protected Matrix renderMatrix
Transform applied to this instance of the mesh.
-
-
Constructor Detail
-
OrderedMeshShape
public OrderedMeshShape(ColladaMeshShape mesh, Matrix renderMatrix, double eyeDistance)
Create a new ordered renderable.- Parameters:
mesh- Mesh shape to render.renderMatrix- Transform matrix to apply when rendering the shape.eyeDistance- Distance from the eye position to the shape's reference position.
-
-
Method Detail
-
getDistanceFromEye
public double getDistanceFromEye()
Description copied from interface:OrderedRenderableReturns 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:
getDistanceFromEyein 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:OrderedRenderableExecutes a pick of the ordered renderable.- Specified by:
pickin interfaceOrderedRenderable- Parameters:
dc- the current draw context.pickPoint- the pick point.
-
render
public void render(DrawContext dc)
Description copied from interface:RenderableCauses thisRenderableto render itself using the provided draw context.- Specified by:
renderin interfaceRenderable- Parameters:
dc- theDrawContextto be used- See Also:
DrawContext
-
-