• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • lib
  • marble
  • routing
Route.h
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2011 Dennis Nienhüser <earthwings@gentoo.org>
9 //
10 
11 #ifndef MARBLE_ROUTE_H
12 #define MARBLE_ROUTE_H
13 
14 #include "RouteSegment.h"
15 #include "GeoDataLatLonBox.h"
16 
17 namespace Marble
18 {
19 
20 class MARBLE_EXPORT Route
21 {
22 public:
23  Route();
24 
25  void addRouteSegment( const RouteSegment &segment );
26 
27  GeoDataLatLonBox bounds() const;
28 
29  qreal distance() const;
30 
31  const RouteSegment & at( int index ) const;
32 
33  int size() const;
34 
35  const GeoDataLineString & path() const;
36 
37  int travelTime() const;
38 
39  const GeoDataLineString & turnPoints() const;
40 
41  const GeoDataLineString & waypoints() const;
42 
43  void setPosition( const GeoDataCoordinates &position );
44 
45  GeoDataCoordinates position() const;
46 
47  const RouteSegment & currentSegment() const;
48 
49  GeoDataCoordinates currentWaypoint() const;
50 
51  GeoDataCoordinates positionOnRoute() const;
52 
53 private:
54  void updatePosition() const;
55 
56  GeoDataLatLonBox m_bounds;
57 
58  qreal m_distance;
59 
60  QVector<RouteSegment> m_segments;
61 
62  GeoDataLineString m_path;
63 
64  GeoDataLineString m_turnPoints;
65 
66  GeoDataLineString m_waypoints;
67 
68  int m_travelTime;
69 
70  mutable bool m_positionDirty;
71 
72  mutable int m_closestSegmentIndex;
73 
74  mutable GeoDataCoordinates m_positionOnRoute;
75 
76  mutable GeoDataCoordinates m_currentWaypoint;
77 
78  GeoDataCoordinates m_position;
79 };
80 
81 }
82 
83 #endif
Marble::GeoDataCoordinates
A 3d point representation.
Definition: GeoDataCoordinates.h:52
MARBLE_EXPORT
#define MARBLE_EXPORT
Definition: marble_export.h:20
Marble::GeoDataLineString
A LineString that allows to store a contiguous set of line segments.
Definition: GeoDataLineString.h:75
RouteSegment.h
GeoDataLatLonBox.h
QVector
Marble::Route
Definition: Route.h:20
Marble::RouteSegment
Definition: RouteSegment.h:23
Marble::GeoDataLatLonBox
A class that defines a 2D bounding box for geographic data.
Definition: GeoDataLatLonBox.h:51
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal