![]() |
Maria GDK 5.0.0.738
Documentation of native code in develop branch
|
#include <MDrawObjectFactory.h>
Public Member Functions | |
std::shared_ptr< Polygon > | createPolygon (const Maria::ItemId &itemId) |
Create an empty polygon object. | |
std::shared_ptr< Polygon > | createPolygon (const std::string &typeId, const Maria::ItemId &itemId) |
std::shared_ptr< Polygon > | createPolygon (const Maria::ItemId &itemId, const std::vector< BasicGeoTypes::GeoPos > &points) |
Create a polygon object from a set of geographical points. | |
std::shared_ptr< Polyline > | createPolyline (const Maria::ItemId &itemId) |
Create an empty polyline object. | |
std::shared_ptr< Polyline > | createPolyline (const std::string &typeId, const Maria::ItemId &itemId) |
std::shared_ptr< Polyline > | createPolyline (const Maria::ItemId &itemId, const std::vector< BasicGeoTypes::GeoPos > &points) |
Create a polyline object from a set of geographical points. | |
std::shared_ptr< Ellipse > | createEllipse (const Maria::ItemId &itemId) |
Create an empty ellipse object. | |
std::shared_ptr< Ellipse > | createEllipse (const Maria::ItemId &itemId, const BasicGeoTypes::GeoPos ¢er, const BasicGeoTypes::GeoPos &firstConjugatePoint, const BasicGeoTypes::GeoPos &secondConjugatePoint) |
Create an ellipse object from three points. This method can be used to create a rotated ellipse object defined by a center point and the two points intersecting the two semi axis and the perimeter. The semi-axis defined by the center and conjugate points should be perpendicular to each other. | |
std::shared_ptr< Ellipse > | createEllipse (const Maria::ItemId &itemId, const BasicGeoTypes::GeoPos ¢er, double rx, double ry) |
Create and ellipse object defined by a center point and two semi-axis lengths This convenience method will create an ellipse oriented along the north-south and east-west axis. | |
std::shared_ptr< CorridorArea > | createCorridorArea (const Maria::ItemId &itemId) |
Create an empty corridor area object. | |
std::shared_ptr< CorridorArea > | createCorridorArea (const Maria::ItemId &itemId, std::vector< BasicGeoTypes::GeoPos > &points, double width) |
Create a corridor area object from center line and width. | |
std::shared_ptr< FanArea > | createFanArea (const Maria::ItemId &itemId) |
Create an empty fan area object. | |
std::shared_ptr< FanArea > | createFanArea (const Maria::ItemId &itemId, const BasicGeoTypes::GeoPos &pos, double minRange, double maxRange, double orientationAngle, double sectorSizeAngle) |
Create a fan area object. | |
std::shared_ptr< OrbitArea > | createOrbitArea (const Maria::ItemId &itemId) |
Create an empty orbit area object. | |
std::shared_ptr< OrbitArea > | createOrbitArea (const Maria::ItemId &itemId, const BasicGeoTypes::GeoPos &firstPoint, const BasicGeoTypes::GeoPos &secondPoint, double width, OrbitAreaGeometry::Alignment alignment) |
Create an orbit area object. | |
std::shared_ptr< PointSymbol > | createPointSymbol (const Maria::ItemId &itemId) |
Create an empty point symbol object. | |
std::shared_ptr< PointSymbol > | createPointSymbol (const std::string &typeId, const Maria::ItemId &itemId) |
std::shared_ptr< PointSymbol > | createPointSymbol (const Maria::ItemId &itemId, const BasicGeoTypes::GeoPos &pos, const std::string &symbolType, const std::string &symbolCode) |
Create a point symbol object at specific position with given symbol type and code. | |
std::shared_ptr< RouteArea > | createRouteArea (const Maria::ItemId &itemId) |
Create an empty route area object. | |
std::shared_ptr< RouteArea > | createRouteArea (const Maria::ItemId &itemId, const std::vector< BasicGeoTypes::GeoPos > &points, const std::vector< double > &leftWidths, const std::vector< double > &rightWidths) |
Create a route area object from center line and arrays of left widths and right widths. | |
DrawObjectFactory - Factory class for creating all draw objects.
All draw objects must be created through this factory, no draw object classes have public constructors.
std::shared_ptr< CorridorArea > Maria::DrawObjectFactory::createCorridorArea | ( | const Maria::ItemId & | itemId | ) |
Create an empty corridor area object.
itemId | Unique ID for this draw object |
std::shared_ptr< CorridorArea > Maria::DrawObjectFactory::createCorridorArea | ( | const Maria::ItemId & | itemId, |
std::vector< BasicGeoTypes::GeoPos > & | points, | ||
double | width | ||
) |
Create a corridor area object from center line and width.
itemId | Unique ID for this draw object |
points | A list of geo points defining the center polyline. |
width | Width of the corridor (in meters) |
std::shared_ptr< Ellipse > Maria::DrawObjectFactory::createEllipse | ( | const Maria::ItemId & | itemId | ) |
Create an empty ellipse object.
itemId | Unique ID for this draw object |
std::shared_ptr< Ellipse > Maria::DrawObjectFactory::createEllipse | ( | const Maria::ItemId & | itemId, |
const BasicGeoTypes::GeoPos & | center, | ||
const BasicGeoTypes::GeoPos & | firstConjugatePoint, | ||
const BasicGeoTypes::GeoPos & | secondConjugatePoint | ||
) |
Create an ellipse object from three points. This method can be used to create a rotated ellipse object defined by a center point and the two points intersecting the two semi axis and the perimeter. The semi-axis defined by the center and conjugate points should be perpendicular to each other.
itemId | Unique ID for this draw object |
center | Center point of the ellipse |
firstConjugatePoint | The intersection point of the ellipse perimeter and the first semi-axis of the ellipse. |
secondConjugatePoint | The intersection point of the ellipse perimeter and the second semi-axis of the ellipse. |
std::shared_ptr< Ellipse > Maria::DrawObjectFactory::createEllipse | ( | const Maria::ItemId & | itemId, |
const BasicGeoTypes::GeoPos & | center, | ||
double | rx, | ||
double | ry | ||
) |
Create and ellipse object defined by a center point and two semi-axis lengths This convenience method will create an ellipse oriented along the north-south and east-west axis.
itemId | Unique ID for this draw object |
center | Center point of the ellipse |
rx | Length (in meters) of the horizontal (east-west) semi-axis |
ry | Length (in meters) of the vertical (north-south) semi-axis |
std::shared_ptr< FanArea > Maria::DrawObjectFactory::createFanArea | ( | const Maria::ItemId & | itemId | ) |
Create an empty fan area object.
itemId | Unique ID for this draw object |
std::shared_ptr< FanArea > Maria::DrawObjectFactory::createFanArea | ( | const Maria::ItemId & | itemId, |
const BasicGeoTypes::GeoPos & | pos, | ||
double | minRange, | ||
double | maxRange, | ||
double | orientationAngle, | ||
double | sectorSizeAngle | ||
) |
Create a fan area object.
itemId | Unique ID for this draw object |
pos | Geographical position of the vertex point of the sector (center of the full circle). |
minRange | Minimum (inner) radius of the sector. |
maxRange | Maximum (outer) radius of the sector. |
orientationAngle | bearing angle of the first leg of the sector (0 is north, positive clockwise). |
sectorSizeAngle | Size of the sector starting at orientationAngle. Positive direction clockwise. |
std::shared_ptr< OrbitArea > Maria::DrawObjectFactory::createOrbitArea | ( | const Maria::ItemId & | itemId | ) |
Create an empty orbit area object.
itemId | Unique ID for this draw object |
std::shared_ptr< OrbitArea > Maria::DrawObjectFactory::createOrbitArea | ( | const Maria::ItemId & | itemId, |
const BasicGeoTypes::GeoPos & | firstPoint, | ||
const BasicGeoTypes::GeoPos & | secondPoint, | ||
double | width, | ||
OrbitAreaGeometry::Alignment | alignment | ||
) |
Create an orbit area object.
itemId | Unique ID for this draw object |
firstPoint | Center point of the first half circle. |
secondPoint | Center point of the second half circle. |
width | Width of the whole object (diameter of the circles). |
alignment | Alignment of the race track relative to the line between first and second point. |
std::shared_ptr< PointSymbol > Maria::DrawObjectFactory::createPointSymbol | ( | const Maria::ItemId & | itemId | ) |
Create an empty point symbol object.
itemId | Unique ID for this draw object |
std::shared_ptr< PointSymbol > Maria::DrawObjectFactory::createPointSymbol | ( | const Maria::ItemId & | itemId, |
const BasicGeoTypes::GeoPos & | pos, | ||
const std::string & | symbolType, | ||
const std::string & | symbolCode | ||
) |
Create a point symbol object at specific position with given symbol type and code.
itemId | Unique ID for this draw object |
pos | Geographical position of symbol |
symbolType | Symbol type. Must correspond to a symbol type known by the currently active ISymbolProvider |
symbolCode | A symbol code relating to the specified symbolType. |
std::shared_ptr< Polygon > Maria::DrawObjectFactory::createPolygon | ( | const Maria::ItemId & | itemId | ) |
Create an empty polygon object.
itemId | Unique ID for this draw object |
std::shared_ptr< Polygon > Maria::DrawObjectFactory::createPolygon | ( | const Maria::ItemId & | itemId, |
const std::vector< BasicGeoTypes::GeoPos > & | points | ||
) |
Create a polygon object from a set of geographical points.
itemId | Unique ID for this draw object |
points | A list of geo points defining the perimeter of the polygon. |
std::shared_ptr< Polyline > Maria::DrawObjectFactory::createPolyline | ( | const Maria::ItemId & | itemId | ) |
Create an empty polyline object.
itemId | Unique ID for this draw object |
std::shared_ptr< Polyline > Maria::DrawObjectFactory::createPolyline | ( | const Maria::ItemId & | itemId, |
const std::vector< BasicGeoTypes::GeoPos > & | points | ||
) |
Create a polyline object from a set of geographical points.
itemId | Unique ID for this draw object |
points | A list of geo points defining the polyline. |
std::shared_ptr< RouteArea > Maria::DrawObjectFactory::createRouteArea | ( | const Maria::ItemId & | itemId | ) |
Create an empty route area object.
itemId | Unique ID for this draw object |
std::shared_ptr< RouteArea > Maria::DrawObjectFactory::createRouteArea | ( | const Maria::ItemId & | itemId, |
const std::vector< BasicGeoTypes::GeoPos > & | points, | ||
const std::vector< double > & | leftWidths, | ||
const std::vector< double > & | rightWidths | ||
) |
Create a route area object from center line and arrays of left widths and right widths.
itemId | Unique ID for this draw object |
points | A list of geo points defining the center polyline. |
leftWidths | Array of left widths of the route area (in meters) |
rightWidths | Array of right widths of the route area (in meters) |