An ElevationCurveData for road elevation profiles. More...
#include <RoadElevationLayer.h>
Public Types | |
enum | roadType { , ROAD = 0, UNKNOWN = 1, BRIDGE = 2 } |
Predefined types for roads. More... | |
Public Member Functions | |
RoadElevationCurveData (CurveId id, CurvePtr flattenCurve, ptr< TileProducer > elevations) | |
Creates a new RoadElevationCurveData. | |
~RoadElevationCurveData () | |
Deletes this RoadElevationCurveData. | |
virtual float | getStartHeight () |
Returns the height of the starting point of the curve. | |
virtual float | getEndHeight () |
Returns the height of the ending point of the curve. | |
virtual float | getAltitude (float s) |
Returns the height corresponding to the given s coordinate. | |
virtual void | getUsedTiles (set< TileCache::Tile::Id > &tiles, float rootSampleLength) |
Returns the list of tiles intersected by the curve with which this ElevationCurveData is associated. | |
Protected Member Functions | |
virtual float | getCapLength (NodePtr p, vec2d q) |
Computes the cap length at a given extremity. | |
Protected Attributes | |
bool | startBridge |
True if the starting point of the road is connected to a bridge. | |
bool | endBridge |
True if the ending point of the road is connected to a bridge. | |
float | startBridgez |
Elevation at the starting point of the road, if connected to a bridge. | |
float | endBridgez |
Elevation at the ending point of the road, if connected to a bridge. | |
bool | initBridges |
True if extremities were checked. |
An ElevationCurveData for road elevation profiles.
proland::RoadElevationLayer::RoadElevationCurveData::RoadElevationCurveData | ( | CurveId | id, | |
CurvePtr | flattenCurve, | |||
ptr< TileProducer > | elevations | |||
) |
Creates a new RoadElevationCurveData.
id | the id of the curve for which we need to store the data. | |
flattenCurve | the flattened version of the curve for which we need to store the data. | |
elevations | the producer used to compute raw terrain elevations, themselves used to compute the elevation profile. |
proland::RoadElevationLayer::RoadElevationCurveData::~RoadElevationCurveData | ( | ) |
Deletes this RoadElevationCurveData.
virtual float proland::RoadElevationLayer::RoadElevationCurveData::getAltitude | ( | float | s | ) | [virtual] |
Returns the height corresponding to the given s coordinate.
s | a pseudo curvilinear coordinate (see Curve::Vertex::s). |
Reimplemented from proland::ElevationCurveData.
virtual float proland::RoadElevationLayer::RoadElevationCurveData::getCapLength | ( | NodePtr | p, | |
vec2d | q | |||
) | [protected, virtual] |
Computes the cap length at a given extremity.
p | the Node from which to compute the cap length. | |
q | a point determining the direction of the cap length. | |
path | the Curve to compute the cap length from. Must contain p & q. |
Reimplemented from proland::CurveData.
virtual float proland::RoadElevationLayer::RoadElevationCurveData::getEndHeight | ( | ) | [virtual] |
Returns the height of the ending point of the curve.
Reimplemented from proland::ElevationCurveData.
virtual float proland::RoadElevationLayer::RoadElevationCurveData::getStartHeight | ( | ) | [virtual] |
Returns the height of the starting point of the curve.
Reimplemented from proland::ElevationCurveData.
virtual void proland::RoadElevationLayer::RoadElevationCurveData::getUsedTiles | ( | set< TileCache::Tile::Id > & | tiles, | |
float | rootSampleLength | |||
) | [virtual] |
Returns the list of tiles intersected by the curve with which this ElevationCurveData is associated.
[out] | tiles | the list of usedTiles. |
rootSampleLength | Curve sample length at level 0. |
Reimplemented from proland::ElevationCurveData.
bool proland::RoadElevationLayer::RoadElevationCurveData::endBridge [protected] |
True if the ending point of the road is connected to a bridge.
float proland::RoadElevationLayer::RoadElevationCurveData::endBridgez [protected] |
Elevation at the ending point of the road, if connected to a bridge.
bool proland::RoadElevationLayer::RoadElevationCurveData::initBridges [protected] |
True if extremities were checked.
bool proland::RoadElevationLayer::RoadElevationCurveData::startBridge [protected] |
True if the starting point of the road is connected to a bridge.
float proland::RoadElevationLayer::RoadElevationCurveData::startBridgez [protected] |
Elevation at the starting point of the road, if connected to a bridge.