|
|
STK::Vector2f | rotateLeft90Degrees (const STK::Vector2f &a) |
| |
|
STK::Vector2f | rotateRight90Degrees (const STK::Vector2f &a) |
| |
| void | getIntermediatePositions (const std::vector< BasicGeoTypes::GeoPos > &inPos, std::vector< BasicGeoTypes::GeoPos > &outPos, bool bClosed, const CurveMode &mode, double threshold=50000.0, int max=20) |
| | Add intermediate positions to a geographic linestring or polygon, as required according to curve mode and threshold parameters.
|
| |
| void | getIntermediatePositions (const BasicGeoTypes::GeoPos &from, const BasicGeoTypes::GeoPos &to, const CurveMode &mode, std::vector< BasicGeoTypes::GeoPos > &outPos, double threshold=50000.0, int max=20) |
| | Add intermediate positions to a line connecting two geographical positions, as required according to curve mode and threshold parameters.
|
| |
|
bool | getPixelBuffer (const std::vector< STK::Vector2f > &inPts, double d, bool bClosed, std::vector< STK::Vector2f > &bufPts) |
| |
|
bool | getGeoBuffer (const std::vector< BasicGeoTypes::GeoPos > &inPos, std::vector< BasicGeoTypes::GeoPos > &bufPos, double width, bool bClosed, const CurveMode &mode, double threshold=50000.0, int max=20) |
| |
|
bool | calcProjectedPoints (const RasterProjector &rp, const std::vector< BasicGeoTypes::GeoPos > &inPos, std::vector< STK::Vector2f > &projPos) |
| |
| std::vector< std::shared_ptr< std::vector< STK::Vector2f > > > | clipProjectedPoints (const RasterProjector &rp, const std::vector< STK::Vector2f > &projPos, bool discardLongSegments, bool closed) |
| |
|
STK::Vector2f | calcProjectedPoint (const RasterProjector &rp, const BasicGeoTypes::GeoPos &inPos) |
| |
|
bool | calcProjectedPoint (const RasterProjector &rp, const BasicGeoTypes::GeoPos &inPos, STK::Vector2f &outPos) |
| |
| bool | calcGeoFromProjectedPoint (const RasterProjector &rp, const STK::Vector2f &projectedPos, BasicGeoTypes::GeoPos &outGeoPos) |
| | Calculate the GeoPos from an projected point, it's the reverse of \cref calcProjectedPoints.
|
| |
|
std::shared_ptr< STK::PolylineRender2D > | createOrUpdateLineRenderItem (std::shared_ptr< STK::PolylineRender2D > lineRender, const Maria::DrawObjectData &drawObject, const std::shared_ptr< Maria::CompositeStyleItem > &style, const STK::Screen &screen, const std::vector< STK::Vector2f > &projPos, double lineWidth, float depth, bool closed) |
| |
|
std::shared_ptr< STK::PolylineRender2D > | createLineRenderItem (const Maria::DrawObjectData &drawObject, const std::shared_ptr< Maria::CompositeStyleItem > &style, const STK::Screen &screen, const std::vector< STK::Vector2f > &projPos, double lineWidth, float baseDepth, bool closed) |
| |
| std::shared_ptr< STK::PolylineRender2D > | createOrUpdateBackgroundLineRenderItem (std::shared_ptr< STK::PolylineRender2D > lineRender, const Maria::DrawObjectData &drawObject, const std::shared_ptr< Maria::CompositeStyleItem > &style, const STK::Screen &screen, const std::vector< STK::Vector2f > &projPos, int depth, bool closed, bool fixed, std::optional< STK::Vector2f > pos=std::nullopt) |
| |
| std::shared_ptr< STK::PolylineRender2D > | createBackgroundLineRenderItem (const Maria::DrawObjectData &drawObject, const std::shared_ptr< Maria::CompositeStyleItem > &style, const STK::Screen &screen, const std::vector< STK::Vector2f > &projPos, int depth, bool closed, bool fixed, std::optional< STK::Vector2f > pos=std::nullopt) |
| |
| std::shared_ptr< STK::PolylineRender2D > | createOrUpdateOutlineRenderItem (std::shared_ptr< STK::PolylineRender2D > lineRender, const Maria::DrawObjectData &drawObject, const std::shared_ptr< Maria::CompositeStyleItem > &style, const STK::Screen &screen, const std::vector< STK::Vector2f > &projPos, int depth, bool closed, bool fixed, std::optional< STK::Vector2f > pos=std::nullopt) |
| |
| std::shared_ptr< STK::PolylineRender2D > | createOutlineRenderItem (const Maria::DrawObjectData &drawObject, const std::shared_ptr< Maria::CompositeStyleItem > &style, const STK::Screen &screen, const std::vector< STK::Vector2f > &projPos, int depth, bool closed, bool fixed, std::optional< STK::Vector2f > pos=std::nullopt) |
| |
| std::shared_ptr< STK::PolylineRender2D > | createOrUpdateCenterLineRenderItem (std::shared_ptr< STK::PolylineRender2D > lineRender, const Maria::DrawObjectData &drawObject, const std::shared_ptr< Maria::CompositeStyleItem > &style, const STK::Screen &screen, const std::vector< STK::Vector2f > &projPos, int depth, bool closed) |
| |
| std::shared_ptr< STK::PolylineRender2D > | createCenterLineRenderItem (const Maria::DrawObjectData &drawObject, const std::shared_ptr< Maria::CompositeStyleItem > &style, const STK::Screen &screen, const std::vector< STK::Vector2f > &projPos, int depth, bool closed) |
| |
| std::shared_ptr< STK::PolylineRender2D > | createOrUpdateCenterLineBackgroundRenderItem (std::shared_ptr< STK::PolylineRender2D > lineRender, const Maria::DrawObjectData &drawObject, const std::shared_ptr< Maria::CompositeStyleItem > &style, const STK::Screen &screen, const std::vector< STK::Vector2f > &projPos, int depth, bool closed, bool fixed, std::optional< STK::Vector2f > pos=std::nullopt) |
| |
| std::shared_ptr< STK::PolylineRender2D > | createCenterLineBackgroundRenderItem (const Maria::DrawObjectData &drawObject, const std::shared_ptr< Maria::CompositeStyleItem > &style, const STK::Screen &screen, const std::vector< STK::Vector2f > &projPos, int depth, bool closed, bool fixed, std::optional< STK::Vector2f > pos=std::nullopt) |
| |
| std::shared_ptr< STK::PolylineRender2D > | createOrUpdateCenterLineOutlineRenderItem (std::shared_ptr< STK::PolylineRender2D > lineRender, const Maria::DrawObjectData &drawObject, const std::shared_ptr< Maria::CompositeStyleItem > &style, const STK::Screen &screen, const std::vector< STK::Vector2f > &projPos, int depth, bool closed, bool fixed, std::optional< STK::Vector2f > pos=std::nullopt) |
| |
| std::shared_ptr< STK::PolylineRender2D > | createCenterLineOutlineRenderItem (const Maria::DrawObjectData &drawObject, const std::shared_ptr< Maria::CompositeStyleItem > &style, const STK::Screen &screen, const std::vector< STK::Vector2f > &projPos, int depth, bool closed, bool fixed, std::optional< STK::Vector2f > pos=std::nullopt) |
| |
| std::shared_ptr< STK::PolylineRender2D > | createOffsetLineRenderItem (const STK::Screen &screen, double lineWidth, int offset, STK::PolylineRender2D::TextureAlignment alignment) |
| |
|
std::shared_ptr< STK::PolygonRender2D > | createOrUpdatePolygonRenderItem (std::shared_ptr< STK::PolygonRender2D > polyRender, const Maria::DrawObjectData &drawObject, const DrawObjectResources &drawObjectResources, const std::shared_ptr< Maria::CompositeStyleItem > &style, const std::shared_ptr< STK::Screen > &screen, const std::vector< STK::Vector2f > &projPos, int depth, bool renderTransparent) |
| |
|
std::shared_ptr< STK::PolygonRender2D > | createPolygonRenderItem (const Maria::DrawObjectData &drawObject, const DrawObjectResources &drawObjectResources, const std::shared_ptr< Maria::CompositeStyleItem > &style, const std::shared_ptr< STK::Screen > &screen, const std::vector< STK::Vector2f > &projPos, int depth, bool renderTransparent) |
| |
|
bool | calcCorridorPoints (const RasterProjector &rp, const std::vector< BasicGeoTypes::GeoPos > &inPos, double width, bool twistLast, std::vector< std::vector< STK::Vector2f > > &projUpperPos, std::vector< std::vector< STK::Vector2f > > &projLowerPos) |
| |
|
std::shared_ptr< STK::TextRenderItem > | createOrUpdateTextItem (std::shared_ptr< STK::TextRenderItem > currItem, const std::string &text, const std::shared_ptr< STK::FontManager > &fontManager, const STK::Vector2f &pos, float angle, HorizontalAnchor horizAnchor, VerticalAnchor vertAnchor, const DrawObjectData &drawObjectData, const std::shared_ptr< Maria::CompositeStyleItem > &style, const std::shared_ptr< STK::Screen > &screen, const int fontSizeScaleFactor=0) |
| |
|
std::shared_ptr< STK::TextRenderItem > | createTextItem (const std::string &text, const std::shared_ptr< STK::FontManager > &fontManager, const STK::Vector2f &pos, float angle, HorizontalAnchor horizAnchor, VerticalAnchor vertAnchor, const DrawObjectData &drawObjectData, const std::shared_ptr< Maria::CompositeStyleItem > &style, const std::shared_ptr< STK::Screen > &screen, const int fontSizeScaleFactor=0) |
| |
|
void | calcBounds (const std::vector< STK::Vector2f > &projPos, float &minX, float &minY, float &maxX, float &maxY) |
| |
|
STK::OrientedBoundingBox2f | calcOrientedBoundingBox (const std::vector< STK::Vector2f > &projPos, float angle, const STK::Vector2f &rotCenter=STK::Vector2f(0, 0)) |
| |
| void | createLatLonCircle (std::vector< BasicGeoTypes::GeoPos > &geoPos, const BasicGeoTypes::GeoPos &origin, double a0, double a1, double range, int numPoints=36) |
| |
| std::vector< STK::Vector2f > | createArc (const STK::Vector2f ¢er, float startAngle, float endAngle, float radius, int numSlices) |
| | Create an arc in screenspace that is centered around the center. The angles are clockwise from 0, which is straight north.
|
| |
|
std::shared_ptr< STK::TextRenderItem > | createTextLabel (const DrawObjectRenderGenerator &generator, const std::shared_ptr< Maria::CompositeStyleItem > &style, const std::shared_ptr< STK::FontManager > &fontManager, const std::shared_ptr< STK::Screen > &screen, const DrawObjectData &drawObjectData, const RasterProjector &rp, const std::shared_ptr< GeoUnitsSetting > &geoUnitsSetting, const STK::OrientedBoundingBox2f &bbox, const std::string ¶meterName, const STK::Vector2f ¢roid) |
| |
| std::vector< STK::Vector2f > | createEllipsePoints (const STK::Vector2f ¢er, float r1, float r2, int numSlices, float angle=0.0) |
| | Creates an ellipse as a set of projected points. Used for items hat needs dash styling, for solid ellipses, use createEllipseItem.
|
| |
| std::optional< std::string > | getSubstitutedText (const DrawObjectRenderGenerator &generator, const DrawObjectData &drawObjectData, const std::string ¶meterName, std::shared_ptr< GeoUnitsSetting > geoUnitsSetting) |
| | Get the substituted text from drawObjectData, based on the parameters in the generator XML.
|
| |
|
std::optional< std::string > | getSubstitutedTextMeta (const DrawObjectRenderGenerator &generator, const DrawObjectData &drawObjectData, const std::string ¶meterName, std::shared_ptr< GeoUnitsSetting > geoUnitsSetting, int textIndex) |
| |
|
float | ScreenBearing (const STK::Vector2f &p0, const STK::Vector2f &p1) |
| |
|
template<typename T > |
| STK::Vector2< T > | LatLonToXY (const std::shared_ptr< RasterProjector > &pj, const BasicGeoTypes::GeoPos &gp) |
| |
|
template<typename T > |
| std::vector< STK::Vector2< T > > | LatLonToXY (const std::shared_ptr< RasterProjector > &pj, const std::vector< BasicGeoTypes::GeoPos > &posGeo) |
| |
| std::shared_ptr< Geometry > | getInnerGeometry (std::shared_ptr< Geometry > geo) |
| | Function to find the innermost geometry. This will unwrap containers such as SurfaceVolumeGeometry. Returns the input geometry if it's not a container.
|
| |
| std::pair< STK::Vector2f, STK::Vector2f > | calcEllipseBoundingBox (const STK::Vector2f ¢er, const STK::Vector2f &v1, const STK::Vector2f &v2, const float angle) |
| | Calculate the extreme points that define the bounding box of a rotated ellipse.
|
| |
|
void | calcOrbitAreaCenterPoints (const Maria::OrbitAreaGeometry &orbitArea, BasicGeoTypes::GeoPos &c0, BasicGeoTypes::GeoPos &c1) |
| |
|
std::optional< STK::OrientedBoundingBox2f > | calculateLegBoundingBox (const RasterProjector &rp, double widthInMeters, const BasicGeoTypes::GeoPos &startPos, const BasicGeoTypes::GeoPos &endPos) |
| |
|
STK::OrientedBoundingBox2f | calculateLegBoundingBox (const STK::Vector2f &upperLeft, const STK::Vector2f &upperRight, const STK::Vector2f &lowerLeft, const STK::Vector2f &lowerRight) |
| | Calculate the bounding box for a corridor leg.
|
| |
| std::vector< STK::Vector2f > | createArc (const STK::Vector2f ¢er, double width, double height, double ellipseRotation, double startAngle, double arcSize, int numSlices) |
| | Create an arc of an ellipse.
|
| |
|
std::vector< STK::Vector2f > | smoothLine (const std::vector< STK::Vector2f > &line, bool closed=false) |
| |
|
STK::Box2< float > | measureTextSize (STK::FontManager &fontManager, const STK::Screen &screen, const std::string &text, const std::string &fontName, float fontSize) |
| |
|
void | setLineTexture (std::shared_ptr< STK::PolylineRender2D > &lineRender, const DrawObjectRenderGenerator &generator, const std::shared_ptr< DrawObjectResources > &drawObjectResources, const std::shared_ptr< STK::Screen > &screen, const std::string &rootParam, const bool fixToText=false, bool snapTexCoords=true, const float scale=1, bool negativeDirection=false) |
| |
|
std::shared_ptr< STK::IconRenderItem > | createIconRenderItem (const DrawObjectResources &resources, const STK::Screen &screen, const STK::Vector2f &position, const IconStyle &iconStyle, const float scaleTexture=1.0f) |
| |
|
std::shared_ptr< STK::IconRenderItem > | createSymbolIconRenderItem (const std::shared_ptr< Maria::SymbolCache > &symbolCache, const std::string &symbolType, const std::string &symbolCode, const STK::Screen &screen, const STK::Vector2f &position, const float scaleTexture=1.0f) |
| |
|
bool | calculateOffset (const std::string &offsetFlagValue, const DrawObjectData &drawObject, const Maria::RasterProjector &rp, const STK::Vector2f &input, STK::Vector2f &output) |
| |
|
std::vector< BasicGeoTypes::GeoPos > | createGeographicEllipsePerimeter (BasicGeoTypes::GeoPos cp, BasicGeoTypes::GeoPos fcp, BasicGeoTypes::GeoPos scp, int resolution) |
| |
| bool | is_numeric (std::string str) |
| |
| STK::OrientedBoundingBox2f | scale (const STK::OrientedBoundingBox2f &obb, float scalingFactor) |
| |
| STK::OrientedBoundingBox2f | makeMaxSquareBoundingBox (const STK::OrientedBoundingBox2f &obb) |
| |
| bool Maria::GeneratorUtils::is_numeric |
( |
std::string |
str | ) |
|
Not in use. Kept for reference. Use createGeographicEllipsePerimeter + CalcProjectedPoints instead. std::vector<STK::Vector2f> createGeographicEllipsePoints(
const RasterProjector &rp,
BasicGeoTypes::GeoPos center,
BasicGeoTypes::GeoPos firstC,
BasicGeoTypes::GeoPos secondC,
int resolution, bool perfect_circle);
Not in use. Kept for reference. Use createGeographicEllipsePerimeter + CalcProjectedPoints instead. std::vector<STK::Vector2f> GeneratorUtils::createGeographicEllipsePoints(
const RasterProjector& rp,
const BasicGeoTypes::GeoPos center,
const BasicGeoTypes::GeoPos firstC,
const BasicGeoTypes::GeoPos secondC,
int resolution,
bool perfectCircle) { std::vector<BasicGeoTypes::GeoPos> geoPoints(resolution); std::vector<STK::Vector2f> out; STK::Vector2f c = GeneratorUtils::calcProjectedPoint(rp, center);
if (perfectCircle) {
auto m = BasicGeoTypes::MEarth::MetersBetween(center, firstC);
for (int i = resolution - 1; i >= 0; --i) {
double t = 2.0 * M_PI * i / resolution;
auto br = BasicGeoTypes::BearingRange(t, m);
BasicGeoTypes::MEarth::BearingRangeToPos(center, br, geoPoints[resolution]);
}
calcProjectedPoints(rp, geoPoints, out);
return out;
}
auto clon = center.Lon * BasicGeoTypes::DEG2RAD;
auto clat = center.Lat * BasicGeoTypes::DEG2RAD;
double east1, north1, up1, east2, north2, up2;
auto xyzC = Earth::ToXYZ(center, 0);
auto delta1 = Earth::ToXYZ(firstC, 0) - xyzC;
auto delta2 = Earth::ToXYZ(secondC, 0) - xyzC;
Earth::ECEFVecToENU(delta1, clon, clat, east1, north1, up1);
Earth::ECEFVecToENU(delta2, clon, clat, east2, north2, up2);
for (int i = resolution - 1; i >= 0; --i) {
double t = 2.0 * M_PI * i / resolution;
Ellipse in ENU using conjugate basis directly double X = east1 * std::cos(t) + east2 * std::sin(t); double Y = north1 * std::cos(t) + north2 * std::sin(t);
double bearingDeg = std::atan2(X, Y) * 180.0 / M_PI; double range = std::hypot(X, Y);
BasicGeoTypes::BearingRange br(bearingDeg, range); geoPoints[i] = BasicGeoTypes::MEarth::BearingRangeToPos(center, br); }
GeneratorUtils::calcProjectedPoints(rp, geoPoints, out);
for (auto& p : out) { p -= c; }
return out; }