* @param rpobj Das RadarPlaneObject aus dem die Daten kommen.
*/
private void drawPlaneShape(final Graphics2D g,
final RadarPlaneObject rpobj) {
IPlaneDataObject dir = rpobj.getCurrentPos();
/*IPlaneDataObject base = null;
if (rpobj.getPositions().size() > 1) {
base = (IPlaneDataObject) rpobj.getPositions().get(rpobj.getPositions().size() - 2);
}*/
//Colisiontest just if not on ground and faster than 100
int coll = 0;
String ps = rpobj.getPlaneState();
if (doCollisionTest(rpobj)) {
coll = collisionTest((PlaneDataObject) rpobj.getCurrentPos());
}
g.setColor(colors.get("PLANE_NAME_COLOR").getColor());
g.setFont(AIRPLANE_NAME_FONT);
if (zoomLevel < OWN_PLANE_MAX_ZOOM_NAMERENDER && rpobj != null && rpobj.getActiveController() != null && rpobj.getActiveController().equals(atmcModel.getUser())) {
g.drawString(rpobj.getFlightNumber(),
getXFloat(dir.getLongitude()) - 4,
getYFloat(dir.getLatitude()) - 4);
}
if (zoomLevel < OTHER_PLANE_MAX_ZOOM_NAMERENDER && rpobj != null && rpobj.getActiveController() != null && !rpobj.getActiveController().equals(atmcModel.getUser())) {
g.drawString(rpobj.getFlightNumber(), getXFloat(dir.getLongitude()) - 4, getYFloat(dir.getLatitude()) - 4);
}
g.setColor(colors.get("PLANE_SHAPE_COLOR").getColor());
double heading = -(rpobj.getHeading() + 190) * Math.PI / 180.0;
double baseX = getXFloat(dir.getLongitude());
double baseY = getYFloat(dir.getLatitude());
double xFactor = 3 * Math.sin(heading);
double yFactor = 3 * Math.cos(heading);
Point fwdPt = new Point((int) (baseX + 4 * xFactor), (int) (baseY + 4 * yFactor));
Point lwingbasePt = new Point((int) (baseX + yFactor), (int) (baseY - xFactor));
Point rwingbasePt = new Point((int) (baseX - yFactor), (int) (baseY + xFactor));