An ElevationCurveData for river elevation profiles. More...
#include <WaterElevationLayer.h>
Public Types | |
enum | riverType { BORDER = -2, OBSTACLE = -1, RIVER = 0, ISLAND = 1, LAKE = 2 } |
Predefined types for rivers. More... | |
Public Member Functions | |
WaterElevationCurveData (CurveId id, CurvePtr flattenCurve, ptr< TileProducer > elevations) | |
Creates a new RoadElevationCurveData. | |
~WaterElevationCurveData () | |
Deletes this WaterElevationCurveData. | |
virtual float | getAltitude (float s) |
Returns the height corresponding to the given s coordinate. | |
virtual float | getSampleLength (CurvePtr c) |
Returns the distance to be used between samples for the elevation profile of the given curve. | |
Protected Member Functions | |
virtual float | getCapLength (NodePtr p, vec2d q) |
Computes the cap length at a given extremity. |
An ElevationCurveData for river elevation profiles.
Predefined types for rivers.
Used for drawing and managing rivers.
proland::WaterElevationLayer::WaterElevationCurveData::WaterElevationCurveData | ( | 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::WaterElevationLayer::WaterElevationCurveData::~WaterElevationCurveData | ( | ) |
Deletes this WaterElevationCurveData.
virtual float proland::WaterElevationLayer::WaterElevationCurveData::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::WaterElevationLayer::WaterElevationCurveData::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::WaterElevationLayer::WaterElevationCurveData::getSampleLength | ( | CurvePtr | c | ) | [virtual] |
Returns the distance to be used between samples for the elevation profile of the given curve.
This distance depends on the curve's width (so that wider curves have a smoother profile).
c | a curve. |
Reimplemented from proland::ElevationCurveData.