Contains data about a Curve. More...
#include <CurveData.h>
Public Types | |
enum | curveBoundary |
Determines the side of the boundary we are currently treating. More... | |
Public Member Functions | |
CurveData (CurveId id, CurvePtr flattenCurve) | |
Creates a new CurveData. | |
virtual | ~CurveData () |
Deletes this CurveData. | |
float | getCurvilinearLength () |
Returns the curvilinear length of the curve (at point size - 1). | |
float | getCurvilinearLength (float s, vec2d *p=NULL, vec2d *n=NULL) |
Computes the curvilinear length corresponding to the given s coordinate. | |
float | getCurvilinearCoordinate (float l, vec2d *p=NULL, vec2d *n=NULL) |
Computes the pseudo curvilinear coordinate corresponding to the given l coordinate. | |
float | getStartCapLength () |
Returns the cap length from the begining of the curve. | |
float | getEndCapLength () |
Returns the cap length from the end of the curve. | |
CurveId | getId () |
Returns the id of curve corresponding to this CurveData. | |
virtual void | getUsedTiles (set< TileCache::Tile::Id > &tiles, float rootSampleLength) |
Returns the list of used tiles. | |
int | getSize () |
Returns this Curve's flattened Size. | |
float | getS (int rank) |
Returns the pseudo curvilinear coordinate of a selected vertex in the flattened Curve. | |
Protected Member Functions | |
virtual float | getCapLength (NodePtr p, vec2d q) |
Computes the cap length at a given extremity. | |
Protected Attributes | |
CurveId | id |
The CurveId of the described Curve. | |
CurvePtr | flattenCurve |
Flattened version of the described Curve. | |
set< TileCache::Tile::Id > | usedTiles |
Used Tiles. | |
float | length |
Curve length. | |
float | startCapLength |
Cap length at extremities of the curve. |
Contains data about a Curve.
This data will be used when drawing any child (and sub-levels) of this curve. Contains profile and general aspect of the curve. Used to compute stripes, elevations, etc...
Determines the side of the boundary we are currently treating.
proland::CurveData::CurveData | ( | CurveId | id, | |
CurvePtr | flattenCurve | |||
) |
virtual proland::CurveData::~CurveData | ( | ) | [virtual] |
Deletes this CurveData.
virtual float proland::CurveData::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. |
Reimplemented in proland::RoadElevationLayer::RoadElevationCurveData, and proland::WaterElevationLayer::WaterElevationCurveData.
float proland::CurveData::getCurvilinearCoordinate | ( | float | l, | |
vec2d * | p = NULL , |
|||
vec2d * | n = NULL | |||
) |
Computes the pseudo curvilinear coordinate corresponding to the given l coordinate.
l | a curvilinear coordinate (see Curve::Vertex::l). | |
p | where to store the x,y coordinates corresponding to l, or NULL if these coordinates are not needed. | |
n | where to store the normal to the curve at l, or NULL if this normal is not needed. |
float proland::CurveData::getCurvilinearLength | ( | float | s, | |
vec2d * | p = NULL , |
|||
vec2d * | n = NULL | |||
) |
Computes the curvilinear length corresponding to the given s coordinate.
s | a pseudo curvilinear coordinate (see Curve::Vertex::s). | |
p | where to store the x,y coordinates corresponding to s, or NULL if these coordinates are not needed. | |
n | where to store the normal to the curve at s, or NULL if this normal is not needed. |
float proland::CurveData::getCurvilinearLength | ( | ) |
Returns the curvilinear length of the curve (at point size - 1).
float proland::CurveData::getEndCapLength | ( | ) |
Returns the cap length from the end of the curve.
float proland::CurveData::getS | ( | int | rank | ) |
Returns the pseudo curvilinear coordinate of a selected vertex in the flattened Curve.
i | rank of the vertex to return. |
int proland::CurveData::getSize | ( | ) |
Returns this Curve's flattened Size.
float proland::CurveData::getStartCapLength | ( | ) |
Returns the cap length from the begining of the curve.
virtual void proland::CurveData::getUsedTiles | ( | set< TileCache::Tile::Id > & | tiles, | |
float | rootSampleLength | |||
) | [virtual] |
Returns the list of used tiles.
[out] | tiles | the list of usedTiles. |
rootSampleLength | Curve sample length at level 0. |
Reimplemented in proland::ElevationCurveData, and proland::RoadElevationLayer::RoadElevationCurveData.
CurvePtr proland::CurveData::flattenCurve [protected] |
Flattened version of the described Curve.
CurveId proland::CurveData::id [protected] |
float proland::CurveData::length [protected] |
Curve length.
float proland::CurveData::startCapLength [protected] |
Cap length at extremities of the curve.
set<TileCache::Tile::Id> proland::CurveData::usedTiles [protected] |
Used Tiles.
i.e. tiles on which this curve is defined, at its maximum level of detail.