Class BasicMarkerShape.Shape
- java.lang.Object
-
- gov.nasa.worldwind.render.markers.BasicMarkerShape.Shape
-
- All Implemented Interfaces:
Disposable,MarkerShape
- Direct Known Subclasses:
BasicMarkerShape.Cone,BasicMarkerShape.Cube,BasicMarkerShape.Cylinder,BasicMarkerShape.HeadingArrow,BasicMarkerShape.HeadingLine,BasicMarkerShape.Sphere
- Enclosing class:
- BasicMarkerShape
protected abstract static class BasicMarkerShape.Shape extends java.lang.Object implements MarkerShape, Disposable
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanapplyOrientationIndicates that the shape must apply heading, pitch, and roll.protected java.lang.ObjectdisplayListCacheKeyprotected booleanisInitializedprotected java.lang.Stringnameprotected com.jogamp.opengl.glu.GLUquadricquadricprotected java.lang.StringshapeType
-
Constructor Summary
Constructors Modifier Constructor Description protectedShape()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Vec4computeOrientationVector(DrawContext dc, Vec4 point, Vec4 normal, Angle heading, Angle pitch)Compute a direction vector given a point, heading and pitch.protected int[]createDisplayList(DrawContext dc, double radius)voiddispose()Disposes of any internal resources allocated by the object.protected abstract voiddoRender(DrawContext dc, Marker marker, Vec4 point, double radius, int[] dlResource)protected abstract intdrawShape(DrawContext dc, double radius)java.lang.StringgetName()java.lang.StringgetShapeType()protected voidinitialize(DrawContext dc)booleanisApplyOrientation()Indicates whether or not the shape applies heading, pitch, and roll when it draws itself.voidrender(DrawContext dc, Marker marker, Vec4 point, double radius)voidrender(DrawContext dc, Marker marker, Vec4 point, double radius, boolean isRelative)voidsetApplyOrientation(boolean applyOrientation)Specifies whether or not the shape applies heading, pitch, and roll when it renders.
-
-
-
Field Detail
-
name
protected java.lang.String name
-
shapeType
protected java.lang.String shapeType
-
quadric
protected com.jogamp.opengl.glu.GLUquadric quadric
-
isInitialized
protected boolean isInitialized
-
displayListCacheKey
protected java.lang.Object displayListCacheKey
-
applyOrientation
protected boolean applyOrientation
Indicates that the shape must apply heading, pitch, and roll.
-
-
Method Detail
-
doRender
protected abstract void doRender(DrawContext dc, Marker marker, Vec4 point, double radius, int[] dlResource)
-
drawShape
protected abstract int drawShape(DrawContext dc, double radius)
-
initialize
protected void initialize(DrawContext dc)
-
dispose
public void dispose()
Description copied from interface:DisposableDisposes of any internal resources allocated by the object.- Specified by:
disposein interfaceDisposable
-
getName
public java.lang.String getName()
-
getShapeType
public java.lang.String getShapeType()
- Specified by:
getShapeTypein interfaceMarkerShape
-
isApplyOrientation
public boolean isApplyOrientation()
Indicates whether or not the shape applies heading, pitch, and roll when it draws itself. Even if this field istrue, the shape may not apply all of the rotations.- Returns:
trueif orientation is applied to the rendered shape,falseif not.
-
setApplyOrientation
public void setApplyOrientation(boolean applyOrientation)
Specifies whether or not the shape applies heading, pitch, and roll when it renders.- Parameters:
applyOrientation-trueif the shape must apply heading, pitch, and roll (if they are supported by the shape),falseif it the shape must not apply this orientation.
-
render
public void render(DrawContext dc, Marker marker, Vec4 point, double radius)
- Specified by:
renderin interfaceMarkerShape
-
render
public void render(DrawContext dc, Marker marker, Vec4 point, double radius, boolean isRelative)
- Specified by:
renderin interfaceMarkerShape
-
computeOrientationVector
protected Vec4 computeOrientationVector(DrawContext dc, Vec4 point, Vec4 normal, Angle heading, Angle pitch)
Compute a direction vector given a point, heading and pitch.- Parameters:
dc- current draw contextpoint- point at which to compute direction vectornormal- surface normal atpointheading- desired headingpitch- desired pitch- Returns:
- A vector pointing in the direction of the desired heading and pitch
-
createDisplayList
protected int[] createDisplayList(DrawContext dc, double radius)
-
-