Beispiel #1
0
void
TaskPointRenderer::DrawOZForeground(const OrderedTaskPoint &tp)
{
  int offset = index - active_index;
  if (mode_optional_start)
    offset = -1; // render optional starts as deactivated

  ozv.Draw(canvas, OZRenderer::LAYER_INACTIVE, m_proj, *tp.GetOZPoint(),
           offset);
  ozv.Draw(canvas, OZRenderer::LAYER_ACTIVE, m_proj, *tp.GetOZPoint(),
           offset);
}
Beispiel #2
0
gcc_pure
static unsigned
get_radius(const OrderedTaskPoint &tp)
{
  const ObservationZonePoint *oz = tp.GetOZPoint();
  if (oz == NULL)
    return Declaration::TurnPoint::SECTOR;

  return (unsigned)((const CylinderZone *)oz)->getRadius();
}
Beispiel #3
0
gcc_pure
static Declaration::TurnPoint::Shape
get_shape(const OrderedTaskPoint &tp)
{
  const ObservationZonePoint *oz = tp.GetOZPoint();
  if (oz == NULL)
    return Declaration::TurnPoint::SECTOR;

  switch (oz->shape) {
  case ObservationZonePoint::LINE:
    return Declaration::TurnPoint::LINE;

  case ObservationZonePoint::CYLINDER:
    return Declaration::TurnPoint::CYLINDER;

  default:
    return Declaration::TurnPoint::SECTOR;
  }
}
Beispiel #4
0
void
Serialiser::serialise(const OrderedTaskPoint& data, const TCHAR* name)
{
  // do nothing
  DataNode* child = m_node.add_child(_T("Point"));
  child->set_attribute(_T("type"), name);

  DataNode* wchild = child->add_child(_T("Waypoint"));
  Serialiser wser(*wchild);
  wser.serialise(data.GetWaypoint());
  delete wchild;

  DataNode* ochild = child->add_child(_T("ObservationZone"));
  Serialiser oser(*ochild);
  oser.serialise(*data.GetOZPoint());
  delete ochild;

  delete child;
}
Beispiel #5
0
static fixed
GetRadius(const OrderedTaskPoint &tp)
{
  return GetRadius(*tp.GetOZPoint());
}
Beispiel #6
0
void
TaskPointRenderer::DrawOZBackground(Canvas &canvas, const OrderedTaskPoint &tp)
{
  ozv.Draw(canvas, OZRenderer::LAYER_SHADE, m_proj, *tp.GetOZPoint(),
           index - active_index);
}