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); }
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(); }
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; } }
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; }
static fixed GetRadius(const OrderedTaskPoint &tp) { return GetRadius(*tp.GetOZPoint()); }
void TaskPointRenderer::DrawOZBackground(Canvas &canvas, const OrderedTaskPoint &tp) { ozv.Draw(canvas, OZRenderer::LAYER_SHADE, m_proj, *tp.GetOZPoint(), index - active_index); }