本文整理汇总了Java中gov.nasa.worldwind.Locatable类的典型用法代码示例。如果您正苦于以下问题:Java Locatable类的具体用法?Java Locatable怎么用?Java Locatable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Locatable类属于gov.nasa.worldwind包,在下文中一共展示了Locatable类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doPick
import gov.nasa.worldwind.Locatable; //导入依赖的package包/类
@Override
protected void doPick(DrawContext dc, java.awt.Point pickPoint) {
this.pickSupport.clearPickList();
this.pickSupport.beginPicking(dc);
for (Renderable renderable : getRenderables()) {
// If the caller has specified their own Iterable,
// then we cannot make any guarantees about its contents.
if (renderable != null) {
float[] inColor = new float[4];
dc.getGL().glGetFloatv(GL2.GL_CURRENT_COLOR, inColor, 0);
java.awt.Color color = dc.getUniquePickColor();
dc.getGL().getGL2().glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
renderable.render(dc);
dc.getGL().getGL2().glColor4fv(inColor, 0);
if (renderable instanceof Locatable) {
this.pickSupport.addPickableObject(color.getRGB(), renderable,
((Locatable) renderable).getPosition(), false);
} else {
this.pickSupport.addPickableObject(color.getRGB(), renderable);
}
}
}
this.pickSupport.resolvePick(dc, pickPoint, this);
this.pickSupport.endPicking(dc);
}