DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

Maps Renderer Interface

Detailed Description

Rendering of data from the maps module.

Note
SW Release Applicability: These APIs are available in NVIDIA DRIVE Software releases.

Data Structures

struct  dwMapsRendererLaneChannel
 
struct  dwMapsRendererLaneChannelGeometry
 

Typedefs

typedef const struct dwMapsRendererObject * dwConstMapsRendererHandle_t
 Const handle representing vertex data for rendering. More...
 
typedef struct dwMapsRendererObject * dwMapsRendererHandle_t
 Handle representing vertex data for rendering. More...
 

Functions

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_getRenderCoord (dwVector3f *out, const dwMapsGeoPoint *in, dwConstMapsRendererHandle_t mapsRenderer)
 Get the render coordinates of an query Wgs84 point. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_getWGS84Coord (dwMapsGeoPoint *p, uint32_t screenCoordX, uint32_t screenCoordY, uint32_t tileId, dwRenderEngineHandle_t renderEngine, dwConstMapsRendererHandle_t mapsRenderer)
 Get the WGS84 coordinates of a screen pixel. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_getWGS84CoordFromRenderCoord (dwMapsGeoPoint *p, const dwVector3f *in, dwConstMapsRendererHandle_t mapsRenderer)
 Get the WGS84 coordinates of a render coord. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_getWGS84CoordNDC (dwMapsGeoPoint *p, float32_t x, float32_t y, dwConstRenderEngineHandle_t renderEngine, dwConstMapsRendererHandle_t mapsRenderer)
 Get the WGS84 coordinates of a screen position. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_initialize (dwMapsRendererHandle_t *mapsRenderer, uint32_t maxRenderBufferLineCount, uint32_t maxRenderBufferPointCount, uint32_t maxRenderBufferTriangleCount, bool showMapLineDirections, dwRenderEngineHandle_t renderEngine, dwConstMapHandle_t map)
 Initialize maps renderer. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_isPixelCoordInBox (bool *isInBox, uint32_t screenCoordX, uint32_t screenCoordY, const dwMapsGeoPoint *boxCenter, float32_t sizeMeters, uint32_t tileId, dwRenderEngineHandle_t renderEngine, dwConstMapsRendererHandle_t mapsRenderer)
 Check if a window pixel is within a box. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_isPixelCoordInOrientedBox (bool *isInBox, uint32_t screenCoordX, uint32_t screenCoordY, const dwMapsGeoPoint *boxCenter, float32_t bearingRadian, float32_t lengthMeters, float32_t widthMeters, uint32_t tileId, dwRenderEngineHandle_t renderEngine, dwConstMapsRendererHandle_t mapsRenderer)
 Check if a window pixel is within an oriented box. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_moveTopDownModelView (float32_t dx, float32_t dy, dwRenderEngineHandle_t renderEngine, dwMapsRendererHandle_t mapsRenderer)
 Shift the position of an orthographic top-down camera horizonally and vertically by meters. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_release (dwMapsRendererHandle_t mapsRenderer)
 Release maps renderer and its resources. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderBox (const dwVector3f *position, const dwMapsGeoPoint *origin, float32_t sizeMeters, bool withCenterCross, dwRenderEngineHandle_t renderEngine, dwMapsRendererHandle_t mapsRenderer)
 Render a square box for local [x,y,z] point in the absolute coordinate system. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderBoxInLocalLayout (const dwVector3f *position, const dwMapsRoadSegmentId roadSegmentId, float32_t sizeMeters, bool withCenterCross, dwRenderEngineHandle_t renderEngine, dwMapsRendererHandle_t mapsRenderer, dwConstMapsLocalLayoutHandle_t localLayout)
 Render a square box for local [x,y,z] point in local coordinate system. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderGeoBox (const dwMapsGeoPoint *position, float32_t sizeMeters, bool withCenterCross, dwRenderEngineHandle_t renderEngine, dwMapsRendererHandle_t mapsRenderer)
 Render a square box. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderGeoPoints (const dwMapsGeoPoint *geoPoints, uint32_t geoPointCount, const dwVector4f *colors, uint32_t colorCount, dwRenderEngineHandle_t renderEngine, dwMapsRendererHandle_t mapsRenderer)
 Add wgs84 points to a render buffer. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderGeoPolylines (const dwMapsGeoPolyline *polylines, uint32_t polylineCount, const dwRenderEngineColorRGBA *colors, uint32_t colorCount, bool showLineDirection, dwRenderEngineHandle_t renderEngine, dwMapsRendererHandle_t mapsRenderer)
 Add a wgs84 polyline to a render buffer. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderLaneChannel (const dwMapsRendererLaneChannel *laneChannel, const dwVector4f *channelColor, const bool fillChannel, const bool renderDirection, const bool renderDividerPolylines, const dwMapsRoadSegmentId *roadSegmentId, dwConstMapsLocalLayoutHandle_t localLayoutHandle, dwRenderEngineHandle_t renderEngineHandle, dwMapsRendererHandle_t mapsRendererHandle)
 Render a lane channel in LocalLayout. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderLaneChannels (dwRenderEngineHandle_t renderEngineHandle, dwMapsRendererHandle_t mapsRendererHandle)
 Render lane channels populated by the dwMapsRenderer_updateLaneChannels(...) API. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderLanePlan (dwConstLanePlanHandle_t lanePlan, bool showLineDirections, dwRenderEngineHandle_t renderEngine, dwMapsRendererHandle_t mapsRenderer)
 Add a lane plan to the static render buffer. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderMap (dwRenderEngineHandle_t renderEngine, bool renderInLocalLayout, dwMapsRendererHandle_t mapsRenderer)
 Render the complete map. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderOrientedBox (const dwVector3f *position, const dwMapsGeoPoint *origin, float32_t bearingRadian, float32_t length, float32_t width, bool withCenterCross, bool withOrientation, dwRenderEngineHandle_t renderEngine, dwMapsRendererHandle_t mapsRenderer)
 Add an oriented box for local [x,y,z] point in absolute coordinate system. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderOrientedBoxInLocalLayout (const dwVector3f *position, const dwMapsRoadSegmentId roadSegmentId, float32_t bearingRadian, float32_t length, float32_t width, bool withCenterCross, bool withOrientation, dwRenderEngineHandle_t renderEngine, dwMapsRendererHandle_t mapsRenderer, dwConstMapsLocalLayoutHandle_t localLayout)
 Add an oriented box for local [x,y,z] point in a local coordinate system . More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderOrientedGeoBox (const dwMapsGeoPoint *position, float32_t bearingRadian, float32_t length, float32_t width, bool withCenterCross, bool withOrientation, dwRenderEngineHandle_t renderEngine, dwMapsRendererHandle_t mapsRenderer)
 Add an oriented box. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderPoints (const dwVector3f *points, uint32_t pointsCount, const dwMapsGeoPoint *origins, uint32_t originsCount, const dwVector4f *color, dwRenderEngineHandle_t renderEngine, dwMapsRendererHandle_t mapsRenderer)
 Add local [x,y,z] points in the absolute coordinate system to a render buffer. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderPointsInLocalLayout (const dwVector3f *points, uint32_t pointsCount, const dwMapsRoadSegmentId *roadSegmentIds, uint32_t segmentIdCount, const dwVector4f *color, dwRenderEngineHandle_t renderEngine, dwMapsRendererHandle_t mapsRenderer, dwConstMapsLocalLayoutHandle_t localLayout)
 Add local [x,y,z] points in a local coordinate system to a render buffer. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderPolylines (const dwPolyline3f *polylines, uint32_t polylineCount, const dwMapsGeoPoint *origins, uint32_t originsCount, const dwVector4f *colors, uint32_t colorCount, bool showLineDirection, dwRenderEngineHandle_t renderEngine, dwMapsRendererHandle_t mapsRenderer)
 Add a local [x,y,z] polyline in the absolute coordinate system to a render buffer. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderPolylinesInLocalLayout (const dwPolyline3f *polylines, uint32_t polylineCount, const dwVector4f *colors, uint32_t colorCount, const dwMapsRoadSegmentId *roadSegmentIds, uint32_t segmentIdCount, bool showLineDirection, dwRenderEngineHandle_t renderEngine, dwMapsRendererHandle_t mapsRenderer, dwConstMapsLocalLayoutHandle_t localLayout)
 Add a local [x,y,z] polyline in a local coordinate system to a render buffer. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_setLocalLayout (const dwMapsRoadSegmentBuffer *roadSegmentBuffer, bool showMapLineDirections, dwConstMapsLocalLayoutHandle_t localLayout, dwMapsRendererHandle_t mapsRenderer)
 computes transformations for road segments relative to the reference road segment and apply them to the map. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_setLookAt (const dwMapsGeoPoint *cameraPos, const dwMapsGeoPoint *lookAtPoint, dwRenderEngineHandle_t renderEngine, dwMapsRendererHandle_t mapsRenderer)
 Set camera position and orientation of the current tile in the render engine. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_setTopDownModelView (const dwMapsGeoPoint *cameraPos, dwRenderEngineHandle_t renderEngine, dwMapsRendererHandle_t mapsRenderer)
 Set the position of an orthographic top-down camera. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_setTopDownProjection (float32_t windowHeightInMeters, dwRenderEngineHandle_t renderEngine, dwMapsRendererHandle_t mapsRenderer)
 Set the zoom of an orthographic top-down camera. More...
 
DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_updateLaneChannels (const dwMapsRendererLaneChannel *laneChannels, const uint32_t channelCount, const dwVector4f *channelColor, const bool renderDirection, const dwMapsRoadSegmentId *roadSegmentId, dwConstMapsLocalLayoutHandle_t localLayoutHandle, dwMapsRendererHandle_t mapsRendererHandle)
 Update lane channel render buffer. More...
 

Data Structure Documentation

◆ dwMapsRendererLaneChannel

struct dwMapsRendererLaneChannel
Data Fields
dwMapsRendererLaneChannelGeometry geometry
const dwMapsLaneDividerType * leftDividerTypes
const dwMapsLaneDividerType * rightDividerTypes

◆ dwMapsRendererLaneChannelGeometry

struct dwMapsRendererLaneChannelGeometry
Data Fields
const dwVector3f * center
const dwVector3f * left
uint32_t pointsCount
const dwVector3f * right

Typedef Documentation

◆ dwConstMapsRendererHandle_t

typedef const struct dwMapsRendererObject* dwConstMapsRendererHandle_t

Const handle representing vertex data for rendering.

Definition at line 84 of file MapsRenderer.h.

◆ dwMapsRendererHandle_t

typedef struct dwMapsRendererObject* dwMapsRendererHandle_t

Handle representing vertex data for rendering.

Definition at line 82 of file MapsRenderer.h.

Function Documentation

◆ dwMapsRenderer_getRenderCoord()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_getRenderCoord ( dwVector3f out,
const dwMapsGeoPoint in,
dwConstMapsRendererHandle_t  mapsRenderer 
)

Get the render coordinates of an query Wgs84 point.

The render coordinate system was fully defined by dwMapsRenderer_setReferencePoint(...) API

Parameters
[out]outRender coordinates of the query point
[in]inA query Wgs84 point
[in]mapsRendererMaps renderer.
Returns
DW_SUCCESS Render coordinate returned.
DW_INVALID_ARGUMENT 'out' or in is a nullptr or 'mapsRenderer' is not a valid maps renderer handle.

◆ dwMapsRenderer_getWGS84Coord()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_getWGS84Coord ( dwMapsGeoPoint p,
uint32_t  screenCoordX,
uint32_t  screenCoordY,
uint32_t  tileId,
dwRenderEngineHandle_t  renderEngine,
dwConstMapsRendererHandle_t  mapsRenderer 
)

Get the WGS84 coordinates of a screen pixel.

Assumes origin of the pixels (0,0) to be the top-left corner of the window.

Parameters
[out]pResulting WGS84 point.
[in]screenCoordXx pixel coordinate (relative to window, not tile)
[in]screenCoordYy pixel coordinate (relative to window, not tile)
[in]tileIdTile id where top down view is rendered (contains camera state), 0 if default tile is used.
[in]renderEngineRender engine handle
[in]mapsRendererMaps renderer
Returns
DW_SUCCESS WGS84 coordinate returned.
DW_INVALID_ARGUMENT 'p' is a nullptr or 'mapsRenderer' is not a valid maps renderer handle.

◆ dwMapsRenderer_getWGS84CoordFromRenderCoord()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_getWGS84CoordFromRenderCoord ( dwMapsGeoPoint p,
const dwVector3f in,
dwConstMapsRendererHandle_t  mapsRenderer 
)

Get the WGS84 coordinates of a render coord.

Parameters
[out]pResulting WGS84 point.
[in]inRender coordinates of the query point
[in]mapsRendererMaps renderer
Returns
DW_SUCCESS WGS84 coordinate returned.
DW_INVALID_ARGUMENT 'p' is a nullptr or 'in' is a nullptr or 'mapsRenderer' is not a valid maps renderer handle.

◆ dwMapsRenderer_getWGS84CoordNDC()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_getWGS84CoordNDC ( dwMapsGeoPoint p,
float32_t  x,
float32_t  y,
dwConstRenderEngineHandle_t  renderEngine,
dwConstMapsRendererHandle_t  mapsRenderer 
)

Get the WGS84 coordinates of a screen position.

Origin (0.0f,0.0f) is the center of the screen, (-1.0f, -1.0f) represents the bottom left, (1.0f, 1.0f) represents the top right

Parameters
[out]pResulting position.
[in]xNormalized horizontal screen coordinate, -1 to 1
[in]yNormalized vertical screen coordinate, -1 to 1
[in]renderEngineRender engine
[in]mapsRendererMaps renderer
Returns
DW_SUCCESS WGS84 coordinate returned.
DW_INVALID_ARGUMENT 'p' is a nullptr or 'mapsRenderer' is not a valid maps renderer handle.

◆ dwMapsRenderer_initialize()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_initialize ( dwMapsRendererHandle_t mapsRenderer,
uint32_t  maxRenderBufferLineCount,
uint32_t  maxRenderBufferPointCount,
uint32_t  maxRenderBufferTriangleCount,
bool  showMapLineDirections,
dwRenderEngineHandle_t  renderEngine,
dwConstMapHandle_t  map 
)

Initialize maps renderer.

Parameters
[out]mapsRendererInitialized maps renderer.
[in]maxRenderBufferLineCountMaximum number of lines rendered in a single render call
[in]maxRenderBufferPointCountMaximum number of points rendered in a single render call
[in]maxRenderBufferTriangleCountMaximum number of triangles rendered in a single render call
[in]showMapLineDirectionsIf true, the rendered lines for the map lane dividers are shaded, starting with a darker color, getting brighter towards the end. This can be used to visualize the dwMapsRoadSegments.
[in]renderEngineRender engine handle. Used to initialize the render buffer for lane divider lines of the map.
[in]mapMap that gets rendered. The render buffer for the map lines gets sized based on the number of lane dividers in the map at this call.
Returns
DW_SUCCESS Maps renderer handle is successfully initialized.
DW_INVALID_ARGUMENT 'mapsRenderer' is nullptr or 'map' is not a valid map handle.

◆ dwMapsRenderer_isPixelCoordInBox()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_isPixelCoordInBox ( bool *  isInBox,
uint32_t  screenCoordX,
uint32_t  screenCoordY,
const dwMapsGeoPoint boxCenter,
float32_t  sizeMeters,
uint32_t  tileId,
dwRenderEngineHandle_t  renderEngine,
dwConstMapsRendererHandle_t  mapsRenderer 
)

Check if a window pixel is within a box.

Parameters
[out]isInBoxResult.
[in]screenCoordXx pixel coordinate (relative to window, not tile)
[in]screenCoordYy pixel coordinate (relative to window, not tile)
[in]boxCenterWGS84 coordinates of the box center
[in]sizeMetersExent of the square box in meters.
[in]tileIdID of the render engine tile that where the box is rendered. 0 if default tile is used.
[in]renderEngineRender engine handle.
[in]mapsRendererMaps renderer handle.
Returns
DW_SUCCESS Check performed successfully (regardless of the isInBox result)
DW_INVALID_ARGUMENT 'isInBox' or 'boxCenter' is a nullptr, or 'boxWidthMeters' or 'boxHeightMeters' is negative.

◆ dwMapsRenderer_isPixelCoordInOrientedBox()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_isPixelCoordInOrientedBox ( bool *  isInBox,
uint32_t  screenCoordX,
uint32_t  screenCoordY,
const dwMapsGeoPoint boxCenter,
float32_t  bearingRadian,
float32_t  lengthMeters,
float32_t  widthMeters,
uint32_t  tileId,
dwRenderEngineHandle_t  renderEngine,
dwConstMapsRendererHandle_t  mapsRenderer 
)

Check if a window pixel is within an oriented box.

Parameters
[out]isInBoxResult.
[in]screenCoordXx pixel coordinate (relative to window, not tile)
[in]screenCoordYy pixel coordinate (relative to window, not tile)
[in]boxCenterWGS84 coordinates of the box center
[in]bearingRadianOrientation of the box in radian, clockwise.
[in]lengthMetersLength of the box in meters.
[in]widthMetersWidth of the box in meters.
[in]tileIdID of the render engine tile that where the box is rendered. 0 if default tile is used.
[in]renderEngineRender engine handle.
[in]mapsRendererMaps renderer handle.
Returns
DW_SUCCESS Check performed successfully (regardless of the isInBox result)
DW_INVALID_ARGUMENT 'isInBox' or 'boxCenter' is a nullptr, or 'boxWidthMeters' or 'boxHeightMeters' is negative.

◆ dwMapsRenderer_moveTopDownModelView()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_moveTopDownModelView ( float32_t  dx,
float32_t  dy,
dwRenderEngineHandle_t  renderEngine,
dwMapsRendererHandle_t  mapsRenderer 
)

Shift the position of an orthographic top-down camera horizonally and vertically by meters.

Parameters
[in]dxLongitudinal shift by meters, positive to the right
[in]dyVertical shift by meters, positive upwards
[in]renderEngineRender engine handle.
[in]mapsRendererMaps renderer handle.
Returns
DW_SUCCESS Successfully updated the camera position.
DW_INVALID_ARGUMENT 'mapsRenderer' is not a valid maps renderer handle.

◆ dwMapsRenderer_release()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_release ( dwMapsRendererHandle_t  mapsRenderer)

Release maps renderer and its resources.

Parameters
[in,out]mapsRenderer
Returns
DW_SUCCESS Successfully released the maps renderer.
DW_INVALID_ARGUMENT 'mapsRenderer' is not a valid maps renderer handle.

◆ dwMapsRenderer_renderBox()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderBox ( const dwVector3f position,
const dwMapsGeoPoint origin,
float32_t  sizeMeters,
bool  withCenterCross,
dwRenderEngineHandle_t  renderEngine,
dwMapsRendererHandle_t  mapsRenderer 
)

Render a square box for local [x,y,z] point in the absolute coordinate system.

Parameters
[in]positionWGS84 coordinates of the box center.
[in]originWgs84 point which defines ENU space of local coordinates.
[in]sizeMetersExtent of the box in meters.
[in]withCenterCrossRender a cross in the center of the box to visualize its precise position.
[in]renderEngineRender engine handle.
[in]mapsRendererMaps renderer handle.
Returns
DW_SUCCESS Successfully rendered box to the currently active tile of the render engine.
DW_INVALID_ARGUMENT 'position' is a nullptr, or 'mapsRenderer' is not a valid maps renderer handle. DW_GL_ERROR A gl error has occurred.

◆ dwMapsRenderer_renderBoxInLocalLayout()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderBoxInLocalLayout ( const dwVector3f position,
const dwMapsRoadSegmentId  roadSegmentId,
float32_t  sizeMeters,
bool  withCenterCross,
dwRenderEngineHandle_t  renderEngine,
dwMapsRendererHandle_t  mapsRenderer,
dwConstMapsLocalLayoutHandle_t  localLayout 
)

Render a square box for local [x,y,z] point in local coordinate system.

Parameters
[in]positionWGS84 coordinates of the box center.
[in]roadSegmentIdRoadSegmentId of a road segment in the local layout. The road segment should exist in the local layout.
[in]sizeMetersExtent of the box in meters.
[in]withCenterCrossRender a cross in the center of the box to visualize its precise position.
[in]renderEngineRender engine handle.
[in]mapsRendererMaps renderer handle.
[in]localLayoutLocal layout handle.
Returns
DW_SUCCESS Successfully rendered box to the currently active tile of the render engine.
DW_INVALID_ARGUMENT 'position' is a nullptr, or 'mapsRenderer' is not a valid maps renderer handle. DW_GL_ERROR A gl error has occurred.

◆ dwMapsRenderer_renderGeoBox()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderGeoBox ( const dwMapsGeoPoint position,
float32_t  sizeMeters,
bool  withCenterCross,
dwRenderEngineHandle_t  renderEngine,
dwMapsRendererHandle_t  mapsRenderer 
)

Render a square box.

Parameters
[in]positionWGS84 coordinates of the box center.
[in]sizeMetersExtent of the box in meters.
[in]withCenterCrossRender a cross in the center of the box to visualize its precise position.
[in]renderEngineRender engine handle.
[in]mapsRendererMaps renderer handle.
Returns
DW_SUCCESS Successfully rendered box to the currently active tile of the render engine.
DW_INVALID_ARGUMENT 'position' is a nullptr, or 'mapsRenderer' is not a valid maps renderer handle. DW_GL_ERROR A gl error has occurred.

◆ dwMapsRenderer_renderGeoPoints()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderGeoPoints ( const dwMapsGeoPoint geoPoints,
uint32_t  geoPointCount,
const dwVector4f colors,
uint32_t  colorCount,
dwRenderEngineHandle_t  renderEngine,
dwMapsRendererHandle_t  mapsRenderer 
)

Add wgs84 points to a render buffer.

Overlay arbitrary wgs84 points over the maps data.

Parameters
[in]geoPointsWgs84 polypoint to render.
[in]geoPointCountPolypoint count
[in]colorsColor array
[in]colorCountNumber of colors in color array. If no colors are provided, current tile color is used. If there are less colors than polypoints, the last color will be used for the last polypoints.
[in]renderEngineRender engine handle.
[in]mapsRendererMaps renderer handle.
Returns
DW_SUCCESS Successfully rendered the points.
DW_INVALID_ARGUMENT 'colors' is a nullptr, or 'mapsRenderer' is not a valid maps renderer handle. DW_GL_ERROR A gl error has occurred.

◆ dwMapsRenderer_renderGeoPolylines()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderGeoPolylines ( const dwMapsGeoPolyline polylines,
uint32_t  polylineCount,
const dwRenderEngineColorRGBA colors,
uint32_t  colorCount,
bool  showLineDirection,
dwRenderEngineHandle_t  renderEngine,
dwMapsRendererHandle_t  mapsRenderer 
)

Add a wgs84 polyline to a render buffer.

Overlay an arbitrary wgs84 polyline over the maps data.

Parameters
[in]polylinesWgs84 polylines to render.
[in]polylineCountPolyline count
[in]colorsColor array
[in]colorCountNumber of colors in color array. If no colors are provided, current tile color is used. If there are less colors than polylines, the last color will be used for the last polylines.
[in]showLineDirectionIf true, the polyline is shaded to visualize where its direction (darker at the start, brighter at the end).
[in]renderEngineRender engine handle.
[in]mapsRendererMaps renderer handle.
Returns
DW_SUCCESS Successfully added polyline to the requested render buffer.
DW_INVALID_ARGUMENT 'color' is a nullptr, or 'mapsRenderer' is not a valid maps renderer handle. DW_GL_ERROR A gl error has occurred.

◆ dwMapsRenderer_renderLaneChannel()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderLaneChannel ( const dwMapsRendererLaneChannel laneChannel,
const dwVector4f channelColor,
const bool  fillChannel,
const bool  renderDirection,
const bool  renderDividerPolylines,
const dwMapsRoadSegmentId roadSegmentId,
dwConstMapsLocalLayoutHandle_t  localLayoutHandle,
dwRenderEngineHandle_t  renderEngineHandle,
dwMapsRendererHandle_t  mapsRendererHandle 
)

Render a lane channel in LocalLayout.

Parameters
[in]laneChannelLane channel to render.
[in]channelColorChannel fill color.
[in]fillChannelIf true, channel is filled with channelColor.
[in]renderDirectionIf true, channel direction is rendered.
[in]renderDividerPolylinesIf true, channel divider are rendered.
[in]roadSegmentIdRoadSegmentId of a road segment in the local layout. The road segment should exist in the local layout.
[in]localLayoutHandleLocal layout handle.
[in]renderEngineHandleRender engine handle.
[in]mapsRendererHandleMaps renderer handle.
Returns
DW_SUCCESS Successfully rendered lane channel. DW_INVALID_ARGUMENT LaneChannels or channelColor is nullptr. DW_GL_ERROR A gl error has occurred.

◆ dwMapsRenderer_renderLaneChannels()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderLaneChannels ( dwRenderEngineHandle_t  renderEngineHandle,
dwMapsRendererHandle_t  mapsRendererHandle 
)

Render lane channels populated by the dwMapsRenderer_updateLaneChannels(...) API.

Parameters
[in]renderEngineHandleRender engine Handle.
[in]mapsRendererHandleMaps renderer handle.
Returns
DW_SUCCESS Lane channels are rendered. DW_INVALID_HANDLE Given handle is invalid.
DW_GL_ERROR A gl error has occurred.

◆ dwMapsRenderer_renderLanePlan()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderLanePlan ( dwConstLanePlanHandle_t  lanePlan,
bool  showLineDirections,
dwRenderEngineHandle_t  renderEngine,
dwMapsRendererHandle_t  mapsRenderer 
)

Add a lane plan to the static render buffer.

This adds the lane plan lines to the render buffer for static lines, so it overlays the lane plan over the map data.

Parameters
[in]lanePlanLane plan to be rendered.
[in]showLineDirectionsIf true, the lane plan lines are shaded to visualize where lane plan lines start and end (darker at the start, brighter at the end). This can be used to visualized the lane plane segments.
[in]renderEngineRender engine handle.
[in]mapsRendererMaps renderer handle.
Returns
DW_SUCCESS Successfully cleared static line render buffer.
DW_INVALID_ARGUMENT 'mapsRenderer' is not a valid maps renderer handle. DW_GL_ERROR A gl error has occurred.

◆ dwMapsRenderer_renderMap()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderMap ( dwRenderEngineHandle_t  renderEngine,
bool  renderInLocalLayout,
dwMapsRendererHandle_t  mapsRenderer 
)

Render the complete map.

Parameters
[in]renderEngineRender engine.
[in]renderInLocalLayoutIf true, map is rendered in Local Layout of a reference roadsegment
[in]mapsRendererMaps renderer handle.
Returns
DW_SUCCESS Successfully renderered current state of maps renderer.
DW_INVALID_ARGUMENT 'renderer' is not a valid renderer handle, or 'mapsRenderer' is not a valid maps renderer handle.
DW_GL_ERROR A gl error has occurred.

◆ dwMapsRenderer_renderOrientedBox()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderOrientedBox ( const dwVector3f position,
const dwMapsGeoPoint origin,
float32_t  bearingRadian,
float32_t  length,
float32_t  width,
bool  withCenterCross,
bool  withOrientation,
dwRenderEngineHandle_t  renderEngine,
dwMapsRendererHandle_t  mapsRenderer 
)

Add an oriented box for local [x,y,z] point in absolute coordinate system.

Transform position of an oriented box in ENU space coordinates into the absolute coordinate system based on a input Wgs84 origin of a road segment

Parameters
[in]positionCenter point of the box in local coordinate system.
[in]originWgs84 points which defines ENU space of local coordinates.
[in]bearingRadianRotation of the box in radian. 0 means pointing up (which is north at the reference point for rendering), rotation is clock-wise.
[in]lengthLength of the box in meters.
[in]widthWidth of the box in meters.
[in]withCenterCrossRender a cross in the center of the box to visualize its precise position.
[in]withOrientationRender an arrow forward, towards 'bearingRadian'.
[in]renderEngineRender engine handle.
[in]mapsRendererMaps renderer handle.
Returns
DW_SUCCESS Successfully rendered the points.
DW_INVALID_ARGUMENT 'position' or 'origin' is a nullptr, DW_GL_ERROR A gl error has occurred.

◆ dwMapsRenderer_renderOrientedBoxInLocalLayout()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderOrientedBoxInLocalLayout ( const dwVector3f position,
const dwMapsRoadSegmentId  roadSegmentId,
float32_t  bearingRadian,
float32_t  length,
float32_t  width,
bool  withCenterCross,
bool  withOrientation,
dwRenderEngineHandle_t  renderEngine,
dwMapsRendererHandle_t  mapsRenderer,
dwConstMapsLocalLayoutHandle_t  localLayout 
)

Add an oriented box for local [x,y,z] point in a local coordinate system .

Transform position of an oriented box in ENU space coordinates into the local coordinate system based on a input Wgs84 origin of a road segment

Parameters
[in]positionCenter point of the box in local coordinate system.
[in]roadSegmentIdRoadSegmentId of a road segment in the local layout. The road segment should exist in the local layout.
[in]bearingRadianRotation of the box in radian. 0 means pointing up (which is north at the reference point for rendering), rotation is clock-wise.
[in]lengthLength of the box in meters.
[in]widthWidth of the box in meters.
[in]withCenterCrossRender a cross in the center of the box to visualize its precise position.
[in]withOrientationRender an arrow forward, towards 'bearingRadian'.
[in]renderEngineRender engine handle.
[in]mapsRendererMaps renderer handle.
[in]localLayoutLocal layout handle.
Returns
DW_SUCCESS Successfully rendered the points.
DW_INVALID_ARGUMENT 'position' is a nullptr, DW_GL_ERROR A gl error has occurred.

◆ dwMapsRenderer_renderOrientedGeoBox()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderOrientedGeoBox ( const dwMapsGeoPoint position,
float32_t  bearingRadian,
float32_t  length,
float32_t  width,
bool  withCenterCross,
bool  withOrientation,
dwRenderEngineHandle_t  renderEngine,
dwMapsRendererHandle_t  mapsRenderer 
)

Add an oriented box.

Adds an oriented box

Parameters
[in]positionCenter point of the box.
[in]bearingRadianRotation of the box in radian. 0 means pointing up (which is north at the reference point for rendering), rotation is clock-wise.
[in]lengthLength of the box in meters.
[in]widthWidth of the box in meters.
[in]withCenterCrossRender a cross in the center of the box to visualize its precise position.
[in]withOrientationRender an arrow forward, towards 'bearingRadian'.
[in]renderEngineRender engine handle.
[in]mapsRendererMaps renderer handle.
Returns
DW_SUCCESS Successfully added oriented box to the requested render buffer.
DW_INVALID_ARGUMENT 'position' is a nullptr, or 'mapsRenderer' is not a valid maps renderer handle. DW_GL_ERROR A gl error has occurred.

◆ dwMapsRenderer_renderPoints()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderPoints ( const dwVector3f points,
uint32_t  pointsCount,
const dwMapsGeoPoint origins,
uint32_t  originsCount,
const dwVector4f color,
dwRenderEngineHandle_t  renderEngine,
dwMapsRendererHandle_t  mapsRenderer 
)

Add local [x,y,z] points in the absolute coordinate system to a render buffer.

Transform arbitrary local [x,y,z] points in ENU space coordinates into the absolute coordinate system based on input Wgs84 origin of road segments. Overlay resulting points on the maps data.

Parameters
[in]pointsLocal [x,y,z] points to render.
[in]pointsCountNumber of points in points array
[in]originsWgs84 points which defines ENU space of local coordinates.
[in]originsCountNumber of origins in origins array, if only one origin is provided it is used to transform all points .
[in]colorColor for points
[in]renderEngineRender engine handle.
[in]mapsRendererMaps renderer handle.
Returns
DW_SUCCESS Successfully rendered the points.
DW_INVALID_ARGUMENT 'originsCount' is not 1 and 'pointsCount' not equal to 'originsCount', 'points' is a nullptr, 'origins' is a nullptr, 'color' is a nullptr or 'mapsRenderer' is not a valid maps renderer handle. DW_GL_ERROR A gl error has occurred.

◆ dwMapsRenderer_renderPointsInLocalLayout()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderPointsInLocalLayout ( const dwVector3f points,
uint32_t  pointsCount,
const dwMapsRoadSegmentId roadSegmentIds,
uint32_t  segmentIdCount,
const dwVector4f color,
dwRenderEngineHandle_t  renderEngine,
dwMapsRendererHandle_t  mapsRenderer,
dwConstMapsLocalLayoutHandle_t  localLayout 
)

Add local [x,y,z] points in a local coordinate system to a render buffer.

Transform local [x,y,z] points in ENU space coordinates into local coordinate system of a road-segment based on the pre-computed local layout. Overlay resulting point on the maps data.

Parameters
[in]pointsLocal [x,y,z] points to render.
[in]pointsCountNumber of points in points array
[in]roadSegmentIdsRoadSegmentIds of road segment in the local layout. The road segments should exist in the local layout.
[in]segmentIdCountNumber of RoadSegmentIds in the array.
[in]colorColor for points
[in]renderEngineRender engine handle.
[in]mapsRendererMaps renderer handle.
[in]localLayoutLocal layout handle.
Returns
DW_SUCCESS Successfully added points to the requested render buffer.
DW_INVALID_ARGUMENT 'points' is a nullptr, 'segmentIdCount' is not 1 and 'pointsCount' not equal to 'segmentIdCount', 'localLayoutHandle' is a nullptr, 'color' is a nullptr or 'mapsRenderer' is not a valid maps renderer handle. DW_GL_ERROR A gl error has occurred.

◆ dwMapsRenderer_renderPolylines()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderPolylines ( const dwPolyline3f polylines,
uint32_t  polylineCount,
const dwMapsGeoPoint origins,
uint32_t  originsCount,
const dwVector4f colors,
uint32_t  colorCount,
bool  showLineDirection,
dwRenderEngineHandle_t  renderEngine,
dwMapsRendererHandle_t  mapsRenderer 
)

Add a local [x,y,z] polyline in the absolute coordinate system to a render buffer.

Transform local [x,y,z] polylines in ENU space coordinates into the absolute coordinate system based on input Wgs84 origins of road segments Overlay resulting polyline on the maps data.

Parameters
[in]polylinesLocal [x,y,z] polylines to render.
[in]polylineCountNumber of polylines in polylines array
[in]colorsColor array
[in]colorCountNumber of colors in color array. If no colors are provided, current tile color is used. If there are less colors than polylines, the last color will be used for the last polylines.
[in]originsWgs84 points which defines ENU space of local coordinates.
[in]originsCountNumber of origins in origins array, if only one origin is provided it is used for all the polyline transformation.
[in]showLineDirectionIf true, the polyline is shaded to visualize where its direction (darker at the start, brighter at the end).
[in]renderEngineRender engine handle.
[in]mapsRendererMaps renderer handle.
Returns
DW_SUCCESS Successfully added polyline to the requested render buffer.
DW_INVALID_ARGUMENT 'originsCount' is not 1 and 'pointsCount' not equal to 'originsCount', 'points' is a nullptr, 'origins' is a nullptr, 'color' is a nullptr or 'mapsRenderer' is not a valid maps renderer handle. DW_GL_ERROR A gl error has occurred.

◆ dwMapsRenderer_renderPolylinesInLocalLayout()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_renderPolylinesInLocalLayout ( const dwPolyline3f polylines,
uint32_t  polylineCount,
const dwVector4f colors,
uint32_t  colorCount,
const dwMapsRoadSegmentId roadSegmentIds,
uint32_t  segmentIdCount,
bool  showLineDirection,
dwRenderEngineHandle_t  renderEngine,
dwMapsRendererHandle_t  mapsRenderer,
dwConstMapsLocalLayoutHandle_t  localLayout 
)

Add a local [x,y,z] polyline in a local coordinate system to a render buffer.

Transform local [x,y,z] polylines in ENU space coordinates into local coordinate system of a road-segment based on the pre-computed local layout. Overlay resulting polyline on the maps data.

Parameters
[in]polylinesLocal [x,y,z] polylines to render.
[in]polylineCountNumber of polylines in polylines array
[in]colorsColor array
[in]colorCountNumber of colors in color array.
[in]roadSegmentIdsRoadSegmentIds of road segment in the local layout. The road segments should exist in the local layout.
[in]segmentIdCountNumber of RoadSegmentIds in the array.
[in]showLineDirectionIf true, the polyline is shaded to visualize where its direction. (darker at the start, brighter at the end).
[in]renderEngineRender engine handle.
[in]mapsRendererMaps renderer handle.
[in]localLayoutHandle to local layout for the reference road segment.
Returns
DW_SUCCESS Successfully added polyline to the requested render buffer.
DW_INVALID_ARGUMENT 'points' is a nullptr, segmentIdCount' is not 1 and 'polylineCount' not equal to 'segmentIdCount', 'localLayoutHandle' is a nullptr, 'color' is a nullptr or 'mapsRenderer' is not a valid maps renderer handle. DW_GL_ERROR A gl error has occurred.

◆ dwMapsRenderer_setLocalLayout()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_setLocalLayout ( const dwMapsRoadSegmentBuffer roadSegmentBuffer,
bool  showMapLineDirections,
dwConstMapsLocalLayoutHandle_t  localLayout,
dwMapsRendererHandle_t  mapsRenderer 
)

computes transformations for road segments relative to the reference road segment and apply them to the map.

Parameters
[in]roadSegmentBufferBuffer containing the roadsegments for which localLayout is computed
[in]showMapLineDirectionsIf true, the rendered lines for the map lane dividers are shaded, starting with a darker color, getting brighter towards the end. This can be used to visualize the dwMapsRoadSegments.
[in]localLayoutHandle to local layout for the reference road segment.
[in]mapsRendererMaps renderer handle.
Returns
DW_SUCCESS Local layout is successfully computed and applied.
DW_INVALID_ARGUMENT 'mapsRenderer' is not a valid maps renderer handle.

◆ dwMapsRenderer_setLookAt()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_setLookAt ( const dwMapsGeoPoint cameraPos,
const dwMapsGeoPoint lookAtPoint,
dwRenderEngineHandle_t  renderEngine,
dwMapsRendererHandle_t  mapsRenderer 
)

Set camera position and orientation of the current tile in the render engine.

Parameters
[in]cameraPosCamera position in WGS84 coordinates.
[in]lookAtPointPoint towards which the camera is looking in WGS84 coordinates.
[in]renderEngineRender engine handle.
[in]mapsRendererMaps renderer handle.
Returns
DW_SUCCESS Successfully updated the camera position.
DW_INVALID_ARGUMENT 'mapsRenderer' is not a valid maps renderer handle.

◆ dwMapsRenderer_setTopDownModelView()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_setTopDownModelView ( const dwMapsGeoPoint cameraPos,
dwRenderEngineHandle_t  renderEngine,
dwMapsRendererHandle_t  mapsRenderer 
)

Set the position of an orthographic top-down camera.

Parameters
[in]cameraPosCamera position in wgs84 coordinates.
[in]renderEngineRender engine handle.
[in]mapsRendererMaps renderer handle.
Returns
DW_SUCCESS Successfully updated the camera position.
DW_INVALID_ARGUMENT cameraPos is a nullptr, or'mapsRenderer' is not a valid maps renderer handle.

◆ dwMapsRenderer_setTopDownProjection()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_setTopDownProjection ( float32_t  windowHeightInMeters,
dwRenderEngineHandle_t  renderEngine,
dwMapsRendererHandle_t  mapsRenderer 
)

Set the zoom of an orthographic top-down camera.

This is defined by how many meters fit into the height of the window.

Parameters
[in]windowHeightInMetersRequired distance covered by window height in meters.
[in]renderEngineRender engine handle.
[in]mapsRendererMaps renderer handle.
Returns
DW_SUCCESS Successfully updated the projection matrix to represent the requested zoom.
DW_INVALID_ARGUMENT 'mapsRenderer' is not a valid maps renderer handle.

◆ dwMapsRenderer_updateLaneChannels()

DW_VIZ_API_PUBLIC dwStatus dwMapsRenderer_updateLaneChannels ( const dwMapsRendererLaneChannel laneChannels,
const uint32_t  channelCount,
const dwVector4f channelColor,
const bool  renderDirection,
const dwMapsRoadSegmentId roadSegmentId,
dwConstMapsLocalLayoutHandle_t  localLayoutHandle,
dwMapsRendererHandle_t  mapsRendererHandle 
)

Update lane channel render buffer.

Parameters
[in]laneChannelsList of lane channels to populate render buffer.
[in]channelCountNumber of channels.
[in]channelColorChannel fill color.
[in]renderDirectionIf true, channel direction is rendered.
[in]roadSegmentIdRoadSegmentId of a road segment in the local layout. The road segment should exist in the local layout.
[in]localLayoutHandleLocal layout handle.
[in]mapsRendererHandleMaps renderer handle.
Returns
DW_SUCCESS Successfully updated lane channel buffer DW_INVALID_ARGUMENT LaneChannels or channelColor is a nullptr DW_INVALID_HANDLE Given handle is invalid
DW_GL_ERROR A gl error has occurred.