36 lines
792 B
C++
Executable File
36 lines
792 B
C++
Executable File
/*
|
|
* @RDE_HEADER@
|
|
* Generates a postion for a player
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Hanna E. Rathje, SLTE, 2022-03-29
|
|
*/
|
|
#pragma once
|
|
#include <NGLLogger/INGLLogger.h>
|
|
|
|
#include <QRectF>
|
|
#include <QPair>
|
|
/*
|
|
* Class only works with Relative Positions!!!!
|
|
*/
|
|
|
|
namespace WlsRandomPositions
|
|
{
|
|
|
|
class PositionHelper
|
|
{
|
|
public:
|
|
PositionHelper(const QPointF &topLeft, const QPointF &bottomRight, double heightMin, double heightMax);
|
|
|
|
static QPair<QPointF, double> randPos(); // lon/lat, height
|
|
static QPair<QPointF, double> randPos(const QPointF &oldPos, double maxDistance); // lon/lat, height
|
|
|
|
void set(const QPointF &topLeft, const QPointF &bottomRight, double heightMin, double heightMax);
|
|
|
|
private:
|
|
NGL::INGLLogger &m_logger;
|
|
};
|
|
|
|
} // Namespace WlsRandomPositions
|