Maria GDK 5.0.0.738
Documentation of native code in develop branch
Loading...
Searching...
No Matches
Maria::DrawObjectFactory Class Reference

#include <MDrawObjectFactory.h>

Public Member Functions

std::shared_ptr< PolygoncreatePolygon (const Maria::ItemId &itemId)
 Create an empty polygon object.
 
std::shared_ptr< PolygoncreatePolygon (const std::string &typeId, const Maria::ItemId &itemId)
 
std::shared_ptr< PolygoncreatePolygon (const Maria::ItemId &itemId, const std::vector< BasicGeoTypes::GeoPos > &points)
 Create a polygon object from a set of geographical points.
 
std::shared_ptr< PolylinecreatePolyline (const Maria::ItemId &itemId)
 Create an empty polyline object.
 
std::shared_ptr< PolylinecreatePolyline (const std::string &typeId, const Maria::ItemId &itemId)
 
std::shared_ptr< PolylinecreatePolyline (const Maria::ItemId &itemId, const std::vector< BasicGeoTypes::GeoPos > &points)
 Create a polyline object from a set of geographical points.
 
std::shared_ptr< EllipsecreateEllipse (const Maria::ItemId &itemId)
 Create an empty ellipse object.
 
std::shared_ptr< EllipsecreateEllipse (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.
 
std::shared_ptr< EllipsecreateEllipse (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.
 
std::shared_ptr< CorridorAreacreateCorridorArea (const Maria::ItemId &itemId)
 Create an empty corridor area object.
 
std::shared_ptr< CorridorAreacreateCorridorArea (const Maria::ItemId &itemId, std::vector< BasicGeoTypes::GeoPos > &points, double width)
 Create a corridor area object from center line and width.
 
std::shared_ptr< FanAreacreateFanArea (const Maria::ItemId &itemId)
 Create an empty fan area object.
 
std::shared_ptr< FanAreacreateFanArea (const Maria::ItemId &itemId, const BasicGeoTypes::GeoPos &pos, double minRange, double maxRange, double orientationAngle, double sectorSizeAngle)
 Create a fan area object.
 
std::shared_ptr< OrbitAreacreateOrbitArea (const Maria::ItemId &itemId)
 Create an empty orbit area object.
 
std::shared_ptr< OrbitAreacreateOrbitArea (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< PointSymbolcreatePointSymbol (const Maria::ItemId &itemId)
 Create an empty point symbol object.
 
std::shared_ptr< PointSymbolcreatePointSymbol (const std::string &typeId, const Maria::ItemId &itemId)
 
std::shared_ptr< PointSymbolcreatePointSymbol (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< RouteAreacreateRouteArea (const Maria::ItemId &itemId)
 Create an empty route area object.
 
std::shared_ptr< RouteAreacreateRouteArea (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.
 

Detailed Description

DrawObjectFactory - Factory class for creating all draw objects.

All draw objects must be created through this factory, no draw object classes have public constructors.

Member Function Documentation

◆ createCorridorArea() [1/2]

std::shared_ptr< CorridorArea > Maria::DrawObjectFactory::createCorridorArea ( const Maria::ItemId itemId)

Create an empty corridor area object.

Parameters
itemIdUnique ID for this draw object
Returns
A draw object as defined above

◆ createCorridorArea() [2/2]

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.

Parameters
itemIdUnique ID for this draw object
pointsA list of geo points defining the center polyline.
widthWidth of the corridor (in meters)
Returns
A draw object as defined above

◆ createEllipse() [1/3]

std::shared_ptr< Ellipse > Maria::DrawObjectFactory::createEllipse ( const Maria::ItemId itemId)

Create an empty ellipse object.

Parameters
itemIdUnique ID for this draw object
Returns
A draw object as defined above

◆ createEllipse() [2/3]

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.

Parameters
itemIdUnique ID for this draw object
centerCenter point of the ellipse
firstConjugatePointThe intersection point of the ellipse perimeter and the first semi-axis of the ellipse.
secondConjugatePointThe intersection point of the ellipse perimeter and the second semi-axis of the ellipse.
Returns
A draw object as defined above

◆ createEllipse() [3/3]

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.

Parameters
itemIdUnique ID for this draw object
centerCenter point of the ellipse
rxLength (in meters) of the horizontal (east-west) semi-axis
ryLength (in meters) of the vertical (north-south) semi-axis
Returns
A draw object as defined above

◆ createFanArea() [1/2]

std::shared_ptr< FanArea > Maria::DrawObjectFactory::createFanArea ( const Maria::ItemId itemId)

Create an empty fan area object.

Parameters
itemIdUnique ID for this draw object
Returns
A draw object as defined above

◆ createFanArea() [2/2]

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.

Parameters
itemIdUnique ID for this draw object
posGeographical position of the vertex point of the sector (center of the full circle).
minRangeMinimum (inner) radius of the sector.
maxRangeMaximum (outer) radius of the sector.
orientationAnglebearing angle of the first leg of the sector (0 is north, positive clockwise).
sectorSizeAngleSize of the sector starting at orientationAngle. Positive direction clockwise.
Returns
A draw object as defined above

◆ createOrbitArea() [1/2]

std::shared_ptr< OrbitArea > Maria::DrawObjectFactory::createOrbitArea ( const Maria::ItemId itemId)

Create an empty orbit area object.

Parameters
itemIdUnique ID for this draw object
Returns
A draw object as defined above

◆ createOrbitArea() [2/2]

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.

Parameters
itemIdUnique ID for this draw object
firstPointCenter point of the first half circle.
secondPointCenter point of the second half circle.
widthWidth of the whole object (diameter of the circles).
alignmentAlignment of the race track relative to the line between first and second point.
Returns
A draw object as defined above.

◆ createPointSymbol() [1/2]

std::shared_ptr< PointSymbol > Maria::DrawObjectFactory::createPointSymbol ( const Maria::ItemId itemId)

Create an empty point symbol object.

Parameters
itemIdUnique ID for this draw object
Returns
A draw object as defined above

◆ createPointSymbol() [2/2]

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.

Parameters
itemIdUnique ID for this draw object
posGeographical position of symbol
symbolTypeSymbol type. Must correspond to a symbol type known by the currently active ISymbolProvider
symbolCodeA symbol code relating to the specified symbolType.
Returns
A draw object with the given specifications.

◆ createPolygon() [1/2]

std::shared_ptr< Polygon > Maria::DrawObjectFactory::createPolygon ( const Maria::ItemId itemId)

Create an empty polygon object.

Parameters
itemIdUnique ID for this draw object
Returns
A draw object as defined above

◆ createPolygon() [2/2]

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.

Parameters
itemIdUnique ID for this draw object
pointsA list of geo points defining the perimeter of the polygon.
Returns
A draw object as defined above

◆ createPolyline() [1/2]

std::shared_ptr< Polyline > Maria::DrawObjectFactory::createPolyline ( const Maria::ItemId itemId)

Create an empty polyline object.

Parameters
itemIdUnique ID for this draw object
Returns
A draw object as defined above

◆ createPolyline() [2/2]

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.

Parameters
itemIdUnique ID for this draw object
pointsA list of geo points defining the polyline.
Returns
A draw object as defined above

◆ createRouteArea() [1/2]

std::shared_ptr< RouteArea > Maria::DrawObjectFactory::createRouteArea ( const Maria::ItemId itemId)

Create an empty route area object.

Parameters
itemIdUnique ID for this draw object
Returns
A draw object as defined above

◆ createRouteArea() [2/2]

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.

Parameters
itemIdUnique ID for this draw object
pointsA list of geo points defining the center polyline.
leftWidthsArray of left widths of the route area (in meters)
rightWidthsArray of right widths of the route area (in meters)
Returns
A draw object as defined above

The documentation for this class was generated from the following files: