Package gov.nasa.worldwind.render
Class Quadrilateral
- java.lang.Object
-
- gov.nasa.worldwind.render.Quadrilateral
-
- All Implemented Interfaces:
Draggable
,Movable
,Renderable
public class Quadrilateral extends java.lang.Object implements Renderable, Movable, Draggable
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
dragEnabled
protected DraggableSupport
draggableSupport
protected WWTexture
texture
protected java.nio.DoubleBuffer
textureCoordinates
-
Constructor Summary
Constructors Constructor Description Quadrilateral(LatLon southwestCorner, LatLon northeastCorner, double elevation)
Quadrilateral(Sector sector, double elevation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doDrag(DragContext dragContext)
void
drag(DragContext dragContext)
Drag the object given the providedDragContext
.int
getAntiAliasHint()
java.awt.Color
getColor()
LatLon[]
getCorners()
double
getElevation()
java.lang.Object
getImageSource()
Position
getReferencePosition()
A position associated with the object that indicates its aggregate geographic position.protected void
initializeTextureCoordinates()
boolean
isDragEnabled()
Indicates whether the object is enabled for dragging.void
move(Position delta)
Shift the shape over the globe's surface while maintaining its original azimuth, its orientation relative to North.void
moveTo(Position position)
Move the shape over the globe's surface while maintaining its original azimuth, its orientation relative to North.void
render(DrawContext dc)
Causes thisRenderable
to render itself using the provided draw context.void
setAntiAliasHint(int hint)
void
setColor(java.awt.Color color)
void
setCorners(LatLon southWest, LatLon northEast)
void
setDragEnabled(boolean enabled)
Controls whether the object is enabled for dragging.void
setElevation(double elevation)
void
setImageSource(java.lang.Object imageSource)
-
-
-
Field Detail
-
texture
protected WWTexture texture
-
textureCoordinates
protected java.nio.DoubleBuffer textureCoordinates
-
dragEnabled
protected boolean dragEnabled
-
draggableSupport
protected DraggableSupport draggableSupport
-
-
Method Detail
-
getColor
public java.awt.Color getColor()
-
setColor
public void setColor(java.awt.Color color)
-
setImageSource
public void setImageSource(java.lang.Object imageSource)
-
getImageSource
public java.lang.Object getImageSource()
-
getAntiAliasHint
public int getAntiAliasHint()
-
setAntiAliasHint
public void setAntiAliasHint(int hint)
-
getCorners
public LatLon[] getCorners()
-
getElevation
public double getElevation()
-
setElevation
public void setElevation(double elevation)
-
initializeTextureCoordinates
protected void initializeTextureCoordinates()
-
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
-
getReferencePosition
public Position getReferencePosition()
Description copied from interface:Movable
A position associated with the object that indicates its aggregate geographic position. The chosen position varies among implementers of this interface. For objects defined by a list of positions, the reference position is typically the first position in the list. For symmetric objects the reference position is often the center of the object. In many cases the object's reference position may be explicitly specified by the application.- Specified by:
getReferencePosition
in interfaceMovable
- Returns:
- the object's reference position, or null if no reference position is available.
-
move
public void move(Position delta)
Description copied from interface:Movable
Shift the shape over the globe's surface while maintaining its original azimuth, its orientation relative to North.
-
moveTo
public void moveTo(Position position)
Description copied from interface:Movable
Move the shape over the globe's surface while maintaining its original azimuth, its orientation relative to North.
-
isDragEnabled
public boolean isDragEnabled()
Description copied from interface:Draggable
Indicates whether the object is enabled for dragging.- Specified by:
isDragEnabled
in interfaceDraggable
- Returns:
- true if the object is enabled, else false.
-
setDragEnabled
public void setDragEnabled(boolean enabled)
Description copied from interface:Draggable
Controls whether the object is enabled for dragging.- Specified by:
setDragEnabled
in interfaceDraggable
- Parameters:
enabled
-true
if the object is enabled, elsefalse
.
-
drag
public void drag(DragContext dragContext)
Description copied from interface:Draggable
Drag the object given the providedDragContext
.- Specified by:
drag
in interfaceDraggable
- Parameters:
dragContext
- theDragContext
of this dragging event.
-
doDrag
protected void doDrag(DragContext dragContext)
-
-