{
this.placePoint = null;
this.terrainPoint = null;
this.screenPoint = null;
Position pos = this.getPosition();
if (pos == null)
return;
if (this.altitudeMode == WorldWind.CLAMP_TO_GROUND)
{
this.placePoint = dc.computeTerrainPoint(pos.getLatitude(), pos.getLongitude(), 0);
}
else if (this.altitudeMode == WorldWind.RELATIVE_TO_GROUND)
{
this.placePoint = dc.computeTerrainPoint(pos.getLatitude(), pos.getLongitude(), pos.getAltitude());
}
else // ABSOLUTE
{
double height = pos.getElevation()
* (this.isApplyVerticalExaggeration() ? dc.getVerticalExaggeration() : 1);
this.placePoint = dc.getGlobe().computePointFromPosition(pos.getLatitude(), pos.getLongitude(), height);
}
if (this.placePoint == null)
return;
// Compute a terrain point if needed.
if (this.isLineEnabled() && this.altitudeMode != WorldWind.CLAMP_TO_GROUND)
this.terrainPoint = dc.computeTerrainPoint(pos.getLatitude(), pos.getLongitude(), 0);
// Compute the placemark point's screen location.
this.screenPoint = dc.getView().project(this.placePoint);
this.eyeDistance = this.placePoint.distanceTo3(dc.getView().getEyePoint());
}