public void RenderPointCoords()
{
if (line != null && hat != null)
{
double mapLengthMult = 1.0; // for scaling when on map view.
double mapWidthMult = 1.0; // for scaling when on map view.
float useWidth;
if (isOnMap)
{
mapLengthMult = ScaledSpace.InverseScaleFactor;
mapWidthMult = Math.Max(camLookVec.magnitude, 100.0f) / 100.0f;
}
Vector3d point1 = mapLengthMult * Start;
Vector3d point2 = mapLengthMult * (Start + (Scale * 0.95 * Vector));
Vector3d point3 = mapLengthMult * (Start + (Scale * Vector));
label.fontSize = (int)(12.0 * (Width / 0.2) * Scale);
useWidth = (float)(Width * Scale * mapWidthMult);
// Position the arrow line:
line.SetVertexCount(2);
line.SetWidth(useWidth, useWidth);
line.SetPosition(0, point1);
line.SetPosition(1, point2);
// Position the arrow hat:
hat.SetVertexCount(2);
hat.SetWidth(useWidth * 3.5f, 0.0F);
hat.SetPosition(0, point2);
hat.SetPosition(1, point3);
// Put the label at the midpoint of the arrow:
labelLocation = (point1 + point3) / 2;
PutAtShipRelativeCoords();
}
}