NASA World Wind

gov.nasa.worldwind.render.markers
Class BasicMarkerShape.Shape

java.lang.Object
  extended by 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 Object
implements MarkerShape, Disposable


Field Summary
protected  boolean applyOrientation
          Indicates that the shape must apply heading, pitch, and roll.
protected  Object displayListCacheKey
           
protected  boolean isInitialized
           
protected  String name
           
protected  GLUquadric quadric
           
protected  String shapeType
           
 
Constructor Summary
protected BasicMarkerShape.Shape()
           
 
Method Summary
protected  Vec4 computeOrientationVector(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)
           
 void dispose()
          Disposes of any internal resources allocated by the object.
protected abstract  void doRender(DrawContext dc, Marker marker, Vec4 point, double radius, int[] dlResource)
           
protected abstract  int drawShape(DrawContext dc, double radius)
           
 String getName()
           
 String getShapeType()
           
protected  void initialize(DrawContext dc)
           
 boolean isApplyOrientation()
          Indicates whether or not the shape applies heading, pitch, and roll when it draws itself.
 void render(DrawContext dc, Marker marker, Vec4 point, double radius)
           
 void render(DrawContext dc, Marker marker, Vec4 point, double radius, boolean isRelative)
           
 void setApplyOrientation(boolean applyOrientation)
          Specifies whether or not the shape applies heading, pitch, and roll when it renders.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

applyOrientation

protected boolean applyOrientation
Indicates that the shape must apply heading, pitch, and roll.


displayListCacheKey

protected Object displayListCacheKey

isInitialized

protected boolean isInitialized

name

protected String name

quadric

protected GLUquadric quadric

shapeType

protected String shapeType
Constructor Detail

BasicMarkerShape.Shape

protected BasicMarkerShape.Shape()
Method Detail

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 context
point - point at which to compute direction vector
normal - surface normal at point
heading - desired heading
pitch - desired pitch
Returns:
A vector pointing in the direction of the desired heading and pitch

createDisplayList

protected int[] createDisplayList(DrawContext dc,
                                  double radius)

dispose

public void dispose()
Description copied from interface: Disposable
Disposes of any internal resources allocated by the object.

Specified by:
dispose in interface Disposable

doRender

protected abstract void doRender(DrawContext dc,
                                 Marker marker,
                                 Vec4 point,
                                 double radius,
                                 int[] dlResource)

drawShape

protected abstract int drawShape(DrawContext dc,
                                 double radius)

getName

public String getName()

getShapeType

public String getShapeType()
Specified by:
getShapeType in interface MarkerShape

initialize

protected void initialize(DrawContext dc)

isApplyOrientation

public boolean isApplyOrientation()
Indicates whether or not the shape applies heading, pitch, and roll when it draws itself. Even if this field is true, the shape may not apply all of the rotations.

Returns:
true if orientation is applied to the rendered shape, false if not.

render

public void render(DrawContext dc,
                   Marker marker,
                   Vec4 point,
                   double radius)
Specified by:
render in interface MarkerShape

render

public void render(DrawContext dc,
                   Marker marker,
                   Vec4 point,
                   double radius,
                   boolean isRelative)
Specified by:
render in interface MarkerShape

setApplyOrientation

public void setApplyOrientation(boolean applyOrientation)
Specifies whether or not the shape applies heading, pitch, and roll when it renders.

Parameters:
applyOrientation - true if the shape must apply heading, pitch, and roll (if they are supported by the shape), false if it the shape must not apply this orientation.

NASA World Wind