KOSMIndoorMap
scenegeometry.cpp
88/* the algorithm in here would be pretty simple (see https://en.wikipedia.org/wiki/Polygon#Centroid)
89 * if it weren't for numeric stability. We need something that keeps sufficient precision (~7 digits)
93 * - scale the value by the bbox size, to enable the use of 64bit integers for the intermediate values.
95 * and thus become very large. As we don't use divisions on the intermediate values, integers work for this.
160 // project p on a line extending the line segment given by @p line, and clamp to that to the segment
161 const auto r = qBound(0.0, QPointF::dotProduct(p - line.p1(), line.p2() - line.p1()) / (len*len), 1.0);
QString path(const QString &relativePath)
OSM-based multi-floor indoor maps for buildings.
Definition locationqueryoverlayproxymodel.h:20
qreal length() const const
QPointF p1() const const
QPointF p2() const const
const_reference at(qsizetype i) const const
iterator begin()
void clear()
iterator end()
void push_back(parameter_type value)
void reserve(qsizetype size)
qsizetype size() const const
LineToElement
qreal dotProduct(const QPointF &p1, const QPointF &p2)
qreal x() const const
qreal y() const const
QRectF boundingRect() const const
QPointF center() const const
const QChar at(qsizetype position) const const
iterator begin()
iterator end()
bool isEmpty() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:17:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:17:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.