DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

RenderEngine.h
Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed
3 // under the Mutual Non-Disclosure Agreement.
4 //
5 // Notice
6 // ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
7 // NO REPRESENTATIONS,WARRANTIES,EXPRESSED,IMPLIED,STATUTORY,OR OTHERWISE WITH RESPECT TO
8 // THE MATERIALS,AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
9 // MERCHANTABILITY,OR FITNESS FOR A PARTICULAR PURPOSE.
10 //
11 // NVIDIA Corporation assumes no responsibility for the consequences of use of such
12 // information or for any infringement of patents or other rights of third parties that may
13 // result from its use. No license is granted by implication or otherwise under any patent
14 // or patent rights of NVIDIA Corporation. No third party distribution is allowed unless
15 // expressly authorized by NVIDIA. Details are subject to change without notice.
16 // This code supersedes and replaces all information previously supplied.
17 // NVIDIA Corporation products are not authorized for use as critical
18 // components in life support devices or systems without express written approval of
19 // NVIDIA Corporation.
20 //
21 // Copyright (c) 2017-2019 NVIDIA Corporation. All rights reserved.
22 //
23 // NVIDIA Corporation and its licensors retain all intellectual property and proprietary
24 // rights in and to this software and related documentation and any modifications thereto.
25 // Any use,reproduction,disclosure or distribution of this software and related
26 // documentation without an express license agreement from NVIDIA Corporation is
27 // strictly prohibited.
28 //
30 
48 #ifndef DWVISUALIZATION_RENDERENGINE_H_
49 #define DWVISUALIZATION_RENDERENGINE_H_
50 
51 #include "Renderer.h"
52 
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
65 typedef struct dwRenderEngineObject* dwRenderEngineHandle_t;
68 typedef const struct dwRenderEngineObject* dwConstRenderEngineHandle_t;
69 
71 typedef enum {
82 
84 const uint32_t DW_RENDER_ENGINE_MAX_TILE_COUNT = 30;
85 
89 typedef enum {
135 
138 
141 typedef enum {
149 
151 #define DW_RENDER_ENGINE_MAX_PLOTS2D 20
152 
155 
156 static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_RED = {230.0f / 255.0f, 72.0f / 255.0f, 32.0f / 255.0f, 1.0f};
157 static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKRED = {180.0f / 255.0f, 5.0f / 255.0f, 0.0f / 255.0f, 1.0f};
158 static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_PURPLE = {255.0f / 255.0f, 0.0f / 255.0f, 240.0f / 255.0f, 1.0f};
159 static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_BLUE = {32.0f / 255.0f, 72.0f / 255.0f, 230.0f / 255.0f, 1.0f};
160 static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_GREEN = {32.0f / 255.0f, 230.0f / 255.0f, 32.0f / 255.0f, 1.0f};
161 static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_WHITE = {255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 1.0f};
162 static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKGREEN = {45.0f / 255.0f, 100.0f / 255.0f, 44.0f / 255.0f, 1.0f};
163 static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_LIGHTGREEN = {118.0f / 255.0f, 185.0f / 255.0f, 0.0f / 255.0f, 1.0f};
164 static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_LIGHTGREY = {185.0f / 255.0f, 185.0f / 255.0f, 185.0f / 255.0f, 1.0f};
165 static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKGREY = {72.0f / 255.0f, 72.0f / 255.0f, 72.0f / 255.0f, 1.0f};
166 static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKBLUE = {45.0f / 255.0f, 44.0f / 255.0f, 100.0f / 255.0f, 0.6f};
167 static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_YELLOW = {230.0f / 255.0f, 230.0f / 255.0f, 10.0f / 255.0f, 1.0f};
168 static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_ORANGE = {230.0f / 255.0f, 100.0f / 255.0f, 10.0f / 255.0f, 1.0f};
169 static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_LIGHTBLUE = {51.0f / 255.0f, 153.0f / 255.0f, 255.0f / 255.0f, 0.6f};
170 static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_BLACK = {0.0f / 255.0f, 0.0f / 255.0f, 0.0f / 255.0f, 1.0f};
171 static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_PINK = {1.0f, 113.0f / 255.0f, 181.0f / 255.0f, 1.0f};
172 static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_CYAN = {0.0f, 1.0f, 1.0f, 1.0f};
173 static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKBROWN = {101.0f / 255.0f, 67.0f / 255.0f, 33.0f / 255.0f, 1.0f};
174 static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKPURPLE = {70.0f / 255.0f, 39.0f / 255.0f, 89.0f / 255.0f, 1.0f};
175 
178 typedef enum {
207 
210 typedef enum {
222 
225 typedef enum {
285 
288 {
290  dwRenderEngineTileLayoutType sizeLayout;
292  dwRenderEngineTileLayoutType positionLayout;
295  dwRenderEngineTilePositionType positionType;
303 
306 {
314  dwRenderEngineColorRGBA backgroundColor;
316  dwRenderEngineColorRGBA color;
318  dwRenderEngineColorByValueMode colorByValueMode;
324  dwRenderEngineFont font;
328 
330 typedef struct dwRenderEngineParams
331 {
347  uint32_t bufferSize;
354  uint32_t maxBufferCount;
356 
368  uint32_t width, uint32_t height);
369 
381 dwStatus dwRenderEngine_initialize(dwRenderEngineHandle_t* engine,
382  const dwRenderEngineParams* params,
384 
394 dwStatus dwRenderEngine_release(dwRenderEngineHandle_t engine);
395 
406 dwStatus dwRenderEngine_reset(dwRenderEngineHandle_t engine);
407 
418 dwStatus dwRenderEngine_resetTile(dwRenderEngineHandle_t engine);
419 
433 dwStatus dwRenderEngine_addTile(uint32_t* tileId,
434  const dwRenderEngineTileState* params,
435  dwRenderEngineHandle_t engine);
436 
446 
457 dwStatus dwRenderEngine_removeTile(uint32_t tileId,
458  dwRenderEngineHandle_t engine);
459 
478 dwStatus dwRenderEngine_addSplitScreenTiles(uint32_t* firstTileId,
479  uint32_t* secondTileId,
480  bool horizontal,
481  const dwRenderEngineTileState* firstParams,
482  const dwRenderEngineTileState* secondParams,
483  dwRenderEngineHandle_t engine);
484 
501 dwStatus dwRenderEngine_addTilesByCount(uint32_t* outTileIds,
502  uint32_t tileCount,
503  uint32_t maxPerRow,
504  const dwRenderEngineTileState* paramsList,
505  dwRenderEngineHandle_t engine);
506 
518 dwStatus dwRenderEngine_getTile(uint32_t* tileId,
519  dwConstRenderEngineHandle_t engine);
520 
532 dwStatus dwRenderEngine_setTile(uint32_t tileId,
533  dwRenderEngineHandle_t engine);
534 
546  dwConstRenderEngineHandle_t engine);
547 
559  dwRenderEngineHandle_t engine);
560 
575  dwConstRenderEngineHandle_t engine);
576 
589 dwStatus dwRenderEngine_setModelView(const dwMatrix4f* modelViewMatrix,
590  dwRenderEngineHandle_t engine);
591 
606  dwConstRenderEngineHandle_t engine);
607 
620 dwStatus dwRenderEngine_setProjection(const dwMatrix4f* projectionMatrix,
621  dwRenderEngineHandle_t engine);
622 
636  dwVector3f center,
637  dwVector3f up,
638  dwRenderEngineHandle_t engine);
639 
663  float32_t yAngleRadians,
664  float32_t distance,
665  dwVector3f center,
666  dwVector3f up,
667  dwRenderEngineHandle_t engine);
668 
685  float32_t bottom, float32_t top,
686  float32_t near, float32_t far,
687  dwRenderEngineHandle_t engine);
688 
704  float32_t aspect,
705  float32_t near,
706  float32_t far,
707  dwRenderEngineHandle_t engine);
708 
725  dwConstRenderEngineHandle_t engine);
726 
743  dwConstRenderEngineHandle_t engine);
744 
759  dwRenderEngineHandle_t engine);
760 
774  dwRenderEngineHandle_t engine);
775 
791  dwRenderEngineHandle_t engine);
792 
803 dwStatus dwRenderEngine_getColor(dwRenderEngineColorRGBA* color,
804  dwConstRenderEngineHandle_t engine);
805 
816 dwStatus dwRenderEngine_setBackgroundColor(dwRenderEngineColorRGBA color, dwRenderEngineHandle_t engine);
817 
828 dwStatus dwRenderEngine_getBackgroundColor(dwRenderEngineColorRGBA* color,
829  dwConstRenderEngineHandle_t engine);
830 
841 dwStatus dwRenderEngine_setColor(dwRenderEngineColorRGBA color, dwRenderEngineHandle_t engine);
842 
860 dwStatus dwRenderEngine_setColorByValue(dwRenderEngineColorByValueMode mode,
861  float32_t scale,
862  dwRenderEngineHandle_t engine);
863 
874 dwStatus dwRenderEngine_getFont(dwRenderEngineFont* font,
875  dwConstRenderEngineHandle_t engine);
876 
887 dwStatus dwRenderEngine_setFont(dwRenderEngineFont font,
888  dwRenderEngineHandle_t engine);
889 
902  dwConstRenderEngineHandle_t engine);
918  dwRenderEngineHandle_t engine);
919 
932  dwConstRenderEngineHandle_t engine);
933 
945  dwRenderEngineHandle_t engine);
946 
959  dwConstRenderEngineHandle_t engine);
960 
976  dwRenderEngineHandle_t engine);
977 
990  dwConstRenderEngineHandle_t engine);
991 
1003  dwRenderEngineHandle_t engine);
1004 
1031 dwStatus dwRenderEngine_createBuffer(uint32_t* bufferId,
1032  dwRenderEnginePrimitiveType type,
1033  uint32_t vertexStrideBytes,
1034  uint32_t offsetBytes,
1035  uint32_t primitiveCount,
1036  dwRenderEngineHandle_t engine);
1037 
1048 dwStatus dwRenderEngine_destroyBuffer(uint32_t bufferId,
1049  dwRenderEngineHandle_t engine);
1050 
1065 dwStatus dwRenderEngine_getBufferMaxPrimitiveCount(uint32_t* maxPrimitiveCount,
1066  uint32_t bufferId,
1067  dwRenderEngineHandle_t engine);
1068 
1091 dwStatus dwRenderEngine_setBuffer(uint32_t bufferId,
1092  dwRenderEnginePrimitiveType type,
1093  const void* buffer,
1094  uint32_t vertexStrideBytes,
1095  uint32_t offsetBytes,
1096  uint32_t primitiveCount,
1097  dwRenderEngineHandle_t engine);
1098 
1114 dwStatus dwRenderEngine_mapBuffer(uint32_t bufferId,
1115  void** buffer,
1116  uint32_t offsetBytes,
1117  uint32_t sizeBytes,
1118  dwRenderEnginePrimitiveType type,
1119  dwRenderEngineHandle_t engine);
1120 
1132 dwStatus dwRenderEngine_unmapBuffer(uint32_t bufferId,
1133  dwRenderEnginePrimitiveType type,
1134  dwRenderEngineHandle_t engine);
1135 
1151 dwStatus dwRenderEngine_renderBuffer(uint32_t bufferId,
1152  uint32_t primitiveCount,
1153  dwRenderEngineHandle_t engine);
1154 
1178  dwRenderEnginePrimitiveType type,
1179  uint32_t vertexStrideBytes,
1180  uint32_t offsetBytes,
1181  const char** labels,
1182  uint32_t primitiveCount,
1183  dwRenderEngineHandle_t engine);
1184 
1211 dwStatus dwRenderEngine_render(dwRenderEnginePrimitiveType type,
1212  const void* buffer,
1213  uint32_t vertexStrideBytes,
1214  uint32_t offsetBytes,
1215  uint32_t primitiveCount,
1216  dwRenderEngineHandle_t engine);
1217 
1245 dwStatus dwRenderEngine_renderWithLabels(dwRenderEnginePrimitiveType type,
1246  const void* buffer,
1247  uint32_t vertexStrideBytes,
1248  uint32_t offsetBytes,
1249  const char* labels[],
1250  uint32_t primitiveCount,
1251  dwRenderEngineHandle_t engine);
1252 
1280 dwStatus dwRenderEngine_renderWithLabel(dwRenderEnginePrimitiveType type,
1281  const void* buffer,
1282  uint32_t vertexStrideBytes,
1283  uint32_t offsetBytes,
1284  const char* label,
1285  uint32_t primitiveCount,
1286  dwRenderEngineHandle_t engine);
1287 
1301  const char* filename,
1302  dwRenderEngineHandle_t engine);
1303 
1315  dwRenderEngineHandle_t engine);
1316 
1332  dwRectf plane,
1333  dwRenderEngineHandle_t engine);
1334 
1349  dwRectf plane,
1350  const dwMatrix4f* modelMatrix,
1351  dwRenderEngineHandle_t engine);
1352 
1367 dwStatus dwRenderEngine_renderText2D(const char* text,
1368  dwVector2f pos,
1369  dwRenderEngineHandle_t engine);
1370 
1385 dwStatus dwRenderEngine_renderText3D(const char* text,
1386  dwVector3f pos,
1387  dwRenderEngineHandle_t engine);
1403  dwRectf plane,
1404  float32_t xSpacing,
1405  float32_t ySpacing,
1406  dwRenderEngineHandle_t engine);
1407 
1422  float32_t xSpacing,
1423  float32_t ySpacing,
1424  dwRenderEngineHandle_t engine);
1425 
1444  dwRectf plane,
1445  float32_t xSpacing,
1446  float32_t ySpacing,
1447  const dwMatrix4f* modelMatrix,
1448  dwRenderEngineHandle_t engine);
1449 
1467  float32_t xSpacing,
1468  float32_t ySpacing,
1469  const dwMatrix4f* modelMatrix,
1470  dwRenderEngineHandle_t engine);
1471 
1487  dwRectf plane,
1488  float32_t xSpacing,
1489  float32_t ySpacing,
1490  dwRenderEngineHandle_t engine);
1491 
1506  float32_t xSpacing,
1507  float32_t ySpacing,
1508  dwRenderEngineHandle_t engine);
1509 
1528  dwRectf plane,
1529  float32_t xSpacing,
1530  float32_t ySpacing,
1531  const dwMatrix4f* modelMatrix,
1532  dwRenderEngineHandle_t engine);
1533 
1551  float32_t xSpacing,
1552  float32_t ySpacing,
1553  const dwMatrix4f* modelMatrix,
1554  dwRenderEngineHandle_t engine);
1555 
1588 dwStatus dwRenderEngine_renderPlot2D(dwRenderEnginePlotType type,
1589  const void* buffer,
1590  uint32_t vertexStrideBytes,
1591  uint32_t offsetBytes,
1592  uint32_t primitiveCount,
1593  const char* label,
1594  dwVector4f range,
1595  dwRectf plane,
1596  dwRenderEngineColorRGBA axesColor,
1597  float32_t axesWidth,
1598  const char* title,
1599  const char* xLabel,
1600  const char* yLabel,
1601  dwRenderEngineHandle_t engine);
1602 
1641 dwStatus dwRenderEngine_renderPlots2D(const dwRenderEnginePlotType* types,
1642  const void** buffers,
1643  const uint32_t* vertexStridesBytes,
1644  const uint32_t* offsetsBytes,
1645  const uint32_t* bufferCounts,
1646  const dwRenderEngineColorRGBA* colors,
1647  const float32_t* lineWidths,
1648  const char** labels,
1649  uint32_t plotsCount,
1650  dwVector4f range,
1651  dwRectf plane,
1652  dwRenderEngineColorRGBA axesColor,
1653  float32_t axesWidth,
1654  const char* title,
1655  const char* xLabel,
1656  const char* yLabel,
1657  dwRenderEngineHandle_t engine);
1658 
1673  dwVector2f pixelPosition,
1674  dwVector2f screenSize,
1675  dwRenderEngineHandle_t engine);
1676 
1690  dwVector3f worldPosition,
1691  dwVector2f screenSize,
1692  dwRenderEngineHandle_t engine);
1693 
1709  dwVector2f pixelPosition,
1710  dwVector2f screenSize,
1711  dwConstRenderEngineHandle_t engine);
1713 #ifdef __cplusplus
1714 }
1715 #endif
1716 
1717 #endif // DW_VISUALIZATION_RENDERENGINE_H_
Render the color with the primitive interleaved This requires the data have RGBA values interleaved w...
Definition: RenderEngine.h:205
Render according to tile current color.
Definition: RenderEngine.h:180
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getCoordinateRange2D(dwVector2f *range, dwConstRenderEngineHandle_t engine)
Gets the coordinate range for 2D rendering of the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getRenderViewport(dwRectf *viewport, dwConstRenderEngineHandle_t engine)
Gets the render viewport for the current tile.
Layout the position relative to the top of the bounds.
Definition: RenderEngine.h:237
Layout the position relative to the right of the bounds.
Definition: RenderEngine.h:273
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_BLUE
Definition: RenderEngine.h:159
Layout the position relative to the bottom right of the bounds.
Definition: RenderEngine.h:261
float float32_t
Specifies POD types.
Definition: Types.h:70
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_LIGHTGREY
Definition: RenderEngine.h:164
float32_t lineWidth
The line width.
Definition: RenderEngine.h:320
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getBounds(dwRectf *bounds, dwRenderEngineHandle_t engine)
Gets the bounds for the entire render area.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_initTileState(dwRenderEngineTileState *params)
Initialize tile params to default state.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_addTile(uint32_t *tileId, const dwRenderEngineTileState *params, dwRenderEngineHandle_t engine)
Adds a render tile to the render engine.
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_YELLOW
Definition: RenderEngine.h:167
Interleaved is start x,start y,end y,end x Min vertex size is 4 floats.
Definition: RenderEngine.h:131
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_createBuffer(uint32_t *bufferId, dwRenderEnginePrimitiveType type, uint32_t vertexStrideBytes, uint32_t offsetBytes, uint32_t primitiveCount, dwRenderEngineHandle_t engine)
Creates a buffer for static drawing.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setBufferPlanarGrid3D(uint32_t bufferId, dwRectf plane, float32_t xSpacing, float32_t ySpacing, const dwMatrix4f *modelMatrix, dwRenderEngineHandle_t engine)
Fills a buffer with a grid in 3D.
Interleaved is x,y,z,x,y,z Min vertex size is 3 floats.
Definition: RenderEngine.h:107
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderText3D(const char *text, dwVector3f pos, dwRenderEngineHandle_t engine)
Renders text within the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderEllipticalGrid3D(dwRectf plane, float32_t xSpacing, float32_t ySpacing, const dwMatrix4f *modelMatrix, dwRenderEngineHandle_t engine)
Renders an elliptical grid in 3D.
Defines a four-element single-precision floating point vector.
Definition: Types.h:335
Defines a three-element floating-point vector.
Definition: Types.h:319
Defines a two-element single-precision floating-point vector.
Definition: Types.h:291
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setBufferPlanarGrid2D(uint32_t bufferId, dwRectf plane, float32_t xSpacing, float32_t ySpacing, dwRenderEngineHandle_t engine)
Fills a buffer with a grid in 2D.
dwRenderEngineColorByValueMode colorByValueMode
Color by value mode.
Definition: RenderEngine.h:318
dwMatrix4f projectionMatrix
The projection matrix for the camera.
Definition: RenderEngine.h:312
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_initialize(dwRenderEngineHandle_t *engine, const dwRenderEngineParams *params, dwVisualizationContextHandle_t context)
Initializes a render engine handle.
dwRectf viewport
The viewport for the tile.
Definition: RenderEngine.h:297
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderText2D(const char *text, dwVector2f pos, dwRenderEngineHandle_t engine)
Renders text within the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setViewport(dwRectf viewport, dwRenderEngineHandle_t engine)
Sets the user-defined viewport which is used in conjunction with the other layout parameters to compu...
dwRenderEngineFont
The font types for the render engine.
Definition: RenderEngine.h:71
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setFont(dwRenderEngineFont font, dwRenderEngineHandle_t engine)
Sets the font for text drawn in the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderWithLabel(dwRenderEnginePrimitiveType type, const void *buffer, uint32_t vertexStrideBytes, uint32_t offsetBytes, const char *label, uint32_t primitiveCount, dwRenderEngineHandle_t engine)
Render an external buffer with one label.
struct dwRenderEngineObject * dwRenderEngineHandle_t
Handle for the render engine.
Definition: RenderEngine.h:66
NVIDIA DriveWorks GL API: Image Conversion and Streaming Functionality
Layout the position relative to the bottom of the bounds.
Definition: RenderEngine.h:255
Layout the position relative to the top right of the bounds.
Definition: RenderEngine.h:243
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderPlanarGrid2D(dwRectf plane, float32_t xSpacing, float32_t ySpacing, dwRenderEngineHandle_t engine)
Renders a grid in 2D.
dwMatrix4f modelViewMatrix
The model view matrix.
Definition: RenderEngine.h:310
float32_t aspectRatio
The aspect ratio for the tile.
Definition: RenderEngine.h:299
const uint32_t DW_RENDER_ENGINE_MAX_TILE_COUNT
Maximum number of tiles that can be added.
Definition: RenderEngine.h:84
Interleaved is x,y,x,y Min vertex size is 2 floats.
Definition: RenderEngine.h:104
Render the hue by distance in z direction.
Definition: RenderEngine.h:188
Layout the position relative to the top left of the bounds.
Definition: RenderEngine.h:231
Layout the position or size in a fixed position and size.
Definition: RenderEngine.h:215
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_release(dwRenderEngineHandle_t engine)
Releases the render engine handle.
dwVector2f coordinateRange2D
The normalization factor for 2D rendering.
Definition: RenderEngine.h:326
Interleaved is x,y,z,width,height,depth,x,y,z,width,height,depth Min vertex size is 6 floats...
Definition: RenderEngine.h:119
dwRenderEngineColorRGBA backgroundColor
The background color.
Definition: RenderEngine.h:314
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setState(const dwRenderEngineTileState *state, dwRenderEngineHandle_t engine)
Set the current tile state parameters.
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_PINK
Definition: RenderEngine.h:171
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setColorByValue(dwRenderEngineColorByValueMode mode, float32_t scale, dwRenderEngineHandle_t engine)
Sets the color of the primitives to be rendered based on their values.
Definition: Types.h:204
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_LIGHTBLUE
Definition: RenderEngine.h:169
The initialization parameters for a render engine.
Definition: RenderEngine.h:330
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_addTilesByCount(uint32_t *outTileIds, uint32_t tileCount, uint32_t maxPerRow, const dwRenderEngineTileState *paramsList, dwRenderEngineHandle_t engine)
Evenly add render tiles to the screen from left to right.
Interleaved is center x,y,x radius,y radius,x,y,x radius,y radius Min vertex size is 4 floats...
Definition: RenderEngine.h:125
dwRenderEnginePlotType
An enum that controls the type of plot to render when calling dwRenderEngine_renderPlot2D.
Definition: RenderEngine.h:141
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_mapBuffer(uint32_t bufferId, void **buffer, uint32_t offsetBytes, uint32_t sizeBytes, dwRenderEnginePrimitiveType type, dwRenderEngineHandle_t engine)
maps internal buffer for data operations.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getColor(dwRenderEngineColorRGBA *color, dwConstRenderEngineHandle_t engine)
Gets the current tile color.
dwRenderEngineColorRGBA color
Color of the rendering primitives in the tile.
Definition: RenderEngine.h:316
struct dwVisualizationContextObject * dwVisualizationContextHandle_t
Context handle.
Definition: Visualization.h:69
Render the hue by distance in y direction.
Definition: RenderEngine.h:186
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getProjection(dwMatrix4f *projectionMatrix, dwConstRenderEngineHandle_t engine)
Gets the projection matrix for the current tile.
Render the hue by distance in x direction.
Definition: RenderEngine.h:184
Render plot as point values. Data layout is x,y,x,y.
Definition: RenderEngine.h:143
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_addSplitScreenTiles(uint32_t *firstTileId, uint32_t *secondTileId, bool horizontal, const dwRenderEngineTileState *firstParams, const dwRenderEngineTileState *secondParams, dwRenderEngineHandle_t engine)
Adds two render tiles to the render engine that each take up half of the render area (defined by boun...
Render the hue by distance in xy directions.
Definition: RenderEngine.h:190
Layout the position relative to the left of the bounds.
Definition: RenderEngine.h:267
dwStatus
Status definition.
Definition: Status.h:178
float32_t pointSize
The point size.
Definition: RenderEngine.h:322
dwRenderEngineTilePositionType
The layout indicator for position of each tile.
Definition: RenderEngine.h:225
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_BLACK
Definition: RenderEngine.h:170
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKPURPLE
Definition: RenderEngine.h:174
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setPerspectiveProjection(float32_t fovRadsY, float32_t aspect, float32_t near, float32_t far, dwRenderEngineHandle_t engine)
Sets the projection matrix for the current tile as defined by the parameters.
Interleaved is 8 sets of (x,y,z) representing the 8 vertices of an oriented box Min vertex size is 24...
Definition: RenderEngine.h:122
Interleaved is x,y,z,x,y,z Min vertex size is 3 floats.
Definition: RenderEngine.h:113
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_reset(dwRenderEngineHandle_t engine)
Resets the state of all render tiles and clears the display.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setCoordinateRange2D(dwVector2f range, dwRenderEngineHandle_t engine)
Sets the coordinate range for 2D rendering of the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderPlot2D(dwRenderEnginePlotType type, const void *buffer, uint32_t vertexStrideBytes, uint32_t offsetBytes, uint32_t primitiveCount, const char *label, dwVector4f range, dwRectf plane, dwRenderEngineColorRGBA axesColor, float32_t axesWidth, const char *title, const char *xLabel, const char *yLabel, dwRenderEngineHandle_t engine)
Renders a plot in 2D.
dwRectf bounds
The default display bounds.
Definition: RenderEngine.h:333
Interleaved is x,y,z,x,y,z Min vertex size is 3 floats.
Definition: RenderEngine.h:101
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setColor(dwRenderEngineColorRGBA color, dwRenderEngineHandle_t engine)
Sets the foreground drawing color of the current tile.
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_GREEN
Definition: RenderEngine.h:160
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getBufferMaxPrimitiveCount(uint32_t *maxPrimitiveCount, uint32_t bufferId, dwRenderEngineHandle_t engine)
Get the max renderable primitive count for a buffer.
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKGREY
Definition: RenderEngine.h:165
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setLookAtByAngles(float32_t xAngleRadians, float32_t yAngleRadians, float32_t distance, dwVector3f center, dwVector3f up, dwRenderEngineHandle_t engine)
Defines the camera position on a sphere surface around a center point, with the camera looking toward...
dwRenderEngineFont font
The font.
Definition: RenderEngine.h:324
Interleaved is x,y,x,y Min vertex size is 2 floats.
Definition: RenderEngine.h:110
Interleaved is x,y,width,height,x,y,width,height Min vertex size is 4 floats.
Definition: RenderEngine.h:116
const struct dwRenderEngineObject * dwConstRenderEngineHandle_t
Const handle for the render engine.
Definition: RenderEngine.h:68
Interleaved is center x,y,z,x radius,y radius Min vertex size is 5 floats.
Definition: RenderEngine.h:128
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getBackgroundColor(dwRenderEngineColorRGBA *color, dwConstRenderEngineHandle_t engine)
Gets the current tile background color.
The tile layout for the viewport.
Definition: RenderEngine.h:287
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_RED
Definition: RenderEngine.h:156
Render plot as line strip. Data layout is x,y,x,y.
Definition: RenderEngine.h:145
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderBuffer(uint32_t bufferId, uint32_t primitiveCount, dwRenderEngineHandle_t engine)
Render the buffer.
dwRenderEngineTilePositionType positionType
The position type that determines how the position coordinates are interpreted.
Definition: RenderEngine.h:295
Defines a 4x4 matrix of floating point numbers (column major).
Definition: Types.h:271
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getState(dwRenderEngineTileState *state, dwConstRenderEngineHandle_t engine)
Get the current tile state parameters.
The state for a render engine tile.
Definition: RenderEngine.h:305
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKBROWN
Definition: RenderEngine.h:173
Layout the position relative to the center of the bounds.
Definition: RenderEngine.h:279
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_removeTile(uint32_t tileId, dwRenderEngineHandle_t engine)
Removes a render tile from the render engine.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setProjection(const dwMatrix4f *projectionMatrix, dwRenderEngineHandle_t engine)
Sets the projection matrix for the current tile.
#define DW_VIZ_API_PUBLIC
Definition: Exports.h:51
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderImage2D(const dwImageGL *img, dwRectf plane, dwRenderEngineHandle_t engine)
Renders a 2D image within the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setOrthoProjection(float32_t left, float32_t right, float32_t bottom, float32_t top, float32_t near, float32_t far, dwRenderEngineHandle_t engine)
Sets up an orthographic projection for the current tile.
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_ORANGE
Definition: RenderEngine.h:168
uint32_t maxBufferCount
Maximum static buffer count.
Definition: RenderEngine.h:354
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderBufferWithLabels(uint32_t bufferId, dwRenderEnginePrimitiveType type, uint32_t vertexStrideBytes, uint32_t offsetBytes, const char **labels, uint32_t primitiveCount, dwRenderEngineHandle_t engine)
Render the internal buffer with labels.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getViewport(dwRectf *viewport, dwConstRenderEngineHandle_t engine)
Gets the user-defined viewport for the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setBuffer(uint32_t bufferId, dwRenderEnginePrimitiveType type, const void *buffer, uint32_t vertexStrideBytes, uint32_t offsetBytes, uint32_t primitiveCount, dwRenderEngineHandle_t engine)
Set the data for a buffer.
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_WHITE
Definition: RenderEngine.h:161
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getFont(dwRenderEngineFont *font, dwConstRenderEngineHandle_t engine)
Gets the current tile font.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderWithLabels(dwRenderEnginePrimitiveType type, const void *buffer, uint32_t vertexStrideBytes, uint32_t offsetBytes, const char *labels[], uint32_t primitiveCount, dwRenderEngineHandle_t engine)
Render an external buffer with labels.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_destroyBuffer(uint32_t bufferId, dwRenderEngineHandle_t engine)
Destroys a buffer for static drawing.
dwRenderEngineTileState defaultTile
The default tile.
Definition: RenderEngine.h:335
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getLayout(dwRenderEngineTileLayout *layout, dwConstRenderEngineHandle_t engine)
Gets the layout of the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setLineWidth(float32_t lineWidth, dwRenderEngineHandle_t engine)
Sets the line width of the current tile.
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_CYAN
Definition: RenderEngine.h:172
dwRenderEngineTileLayoutType
The layout indicator for size and position of each tile.
Definition: RenderEngine.h:210
Layout the position in a grid.
Definition: RenderEngine.h:283
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setBufferEllipticalGrid3D(uint32_t bufferId, dwRectf plane, float32_t xSpacing, float32_t ySpacing, const dwMatrix4f *modelMatrix, dwRenderEngineHandle_t engine)
Fills a buffer with an elliptical grid in 3D.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_render(dwRenderEnginePrimitiveType type, const void *buffer, uint32_t vertexStrideBytes, uint32_t offsetBytes, uint32_t primitiveCount, dwRenderEngineHandle_t engine)
Render an external buffer.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getTileByScreenCoordinates(uint32_t *tileId, dwVector2f pixelPosition, dwVector2f screenSize, dwConstRenderEngineHandle_t engine)
Gets the tile id that surrounds the input pixel position.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderImage3D(const dwImageGL *img, dwRectf plane, const dwMatrix4f *modelMatrix, dwRenderEngineHandle_t engine)
Renders a 2D image in 3D space within the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setLookAt(dwVector3f eye, dwVector3f center, dwVector3f up, dwRenderEngineHandle_t engine)
Sets the model view matrix for the current tile.
Render plot as histogram. Data layout is y,y,y,y.
Definition: RenderEngine.h:147
Layout the position or size relative to the bounds of the render engine.
Definition: RenderEngine.h:220
Layout the position relative to the bottom left of the bounds.
Definition: RenderEngine.h:249
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_resetTile(dwRenderEngineHandle_t engine)
Resets the state of the current tile and clears the display.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setLayout(dwRenderEngineTileLayout layout, dwRenderEngineHandle_t engine)
Sets the layout of the current tile.
dwRenderEngineTileLayout layout
The layout which includes the viewport.
Definition: RenderEngine.h:308
dwRenderEngineColorByValueMode
An enum that controls how primitive colors are rendered.
Definition: RenderEngine.h:178
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setBounds(dwRectf bounds, dwRenderEngineHandle_t engine)
Sets the bounds for the entire render area.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getModelView(dwMatrix4f *modelViewMatrix, dwConstRenderEngineHandle_t engine)
Gets the model view matrix for the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setModelView(const dwMatrix4f *modelViewMatrix, dwRenderEngineHandle_t engine)
Sets the model view matrix for the current tile.
Interleaved is x,y,x,y Min vertex size is 2 floats.
Definition: RenderEngine.h:92
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_destroyImageGL(const dwImageGL *image, dwRenderEngineHandle_t engine)
Releases the memory of a dwImageGL.
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKRED
Definition: RenderEngine.h:157
Interleaved is x,y,x,y Min vertex size is 2 floats.
Definition: RenderEngine.h:98
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setPointSize(float32_t pointSize, dwRenderEngineHandle_t engine)
Sets the point size of the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getTile(uint32_t *tileId, dwConstRenderEngineHandle_t engine)
Gets the current render tile id.
Interleaved is start x,start y,start z,end y,end x,end z Min vertex size is 6 floats.
Definition: RenderEngine.h:134
Render the hue by distance in xz directions.
Definition: RenderEngine.h:192
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderPlots2D(const dwRenderEnginePlotType *types, const void **buffers, const uint32_t *vertexStridesBytes, const uint32_t *offsetsBytes, const uint32_t *bufferCounts, const dwRenderEngineColorRGBA *colors, const float32_t *lineWidths, const char **labels, uint32_t plotsCount, dwVector4f range, dwRectf plane, dwRenderEngineColorRGBA axesColor, float32_t axesWidth, const char *title, const char *xLabel, const char *yLabel, dwRenderEngineHandle_t engine)
Renders multiple plots in one graph.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_screenToWorld3D(dwVector3f *worldPosition, dwVector2f pixelPosition, dwVector2f screenSize, dwRenderEngineHandle_t engine)
Get the world coordinate in 3D based on screen pixel input.
dwRenderEnginePrimitiveType
When rendering 2D data the coordinate system is always from 0 to 1, unless changed by calling dwRende...
Definition: RenderEngine.h:89
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_unmapBuffer(uint32_t bufferId, dwRenderEnginePrimitiveType type, dwRenderEngineHandle_t engine)
Unmaps the internal buffer.
dwVector4f dwRenderEngineColorRGBA
RGBA render color.
Definition: RenderEngine.h:154
NVIDIA DriveWorks API: Renderer
Render the hue by intensity value (Last value of primitives.
Definition: RenderEngine.h:199
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_initDefaultParams(dwRenderEngineParams *params, uint32_t width, uint32_t height)
Initialize params to default.
bool useAspectRatio
Use aspect ratio.
Definition: RenderEngine.h:301
uint32_t bufferSize
Default buffer size for rendering primitives in bytes.
Definition: RenderEngine.h:347
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getLineWidth(float32_t *lineWidth, dwConstRenderEngineHandle_t engine)
Gets the current tile line width.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setBufferEllipticalGrid2D(uint32_t bufferId, dwRectf plane, float32_t xSpacing, float32_t ySpacing, dwRenderEngineHandle_t engine)
Fills a buffer with an elliptical grid in 2D.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_world3DToScreen(dwVector2f *pixelPosition, dwVector3f worldPosition, dwVector2f screenSize, dwRenderEngineHandle_t engine)
Get the screen coordinate in based on world 3D input.
Render the hue by distance to origin.
Definition: RenderEngine.h:182
Defines a GL texture image.
Definition: Image.h:62
Interleaved is x,y,z,x,y,z Min vertex size is 3 floats.
Definition: RenderEngine.h:95
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKGREEN
Definition: RenderEngine.h:162
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_createImageGLFromFile(dwImageGL *img, const char *filename, dwRenderEngineHandle_t engine)
Reads a file from disk and puts it into an dwImageGL.
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_PURPLE
Definition: RenderEngine.h:158
Render the hue by distance in yz directions.
Definition: RenderEngine.h:194
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKBLUE
Definition: RenderEngine.h:166
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getPointSize(float32_t *pointSize, dwConstRenderEngineHandle_t engine)
Gets the current tile point size.
dwRenderEngineTileLayoutType sizeLayout
The layout indicator for size.
Definition: RenderEngine.h:290
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderEllipticalGrid2D(dwRectf plane, float32_t xSpacing, float32_t ySpacing, dwRenderEngineHandle_t engine)
Renders an elliptical grid in 2D.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderPlanarGrid3D(dwRectf plane, float32_t xSpacing, float32_t ySpacing, const dwMatrix4f *modelMatrix, dwRenderEngineHandle_t engine)
Renders a grid in 3D.
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_LIGHTGREEN
Definition: RenderEngine.h:163
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setTile(uint32_t tileId, dwRenderEngineHandle_t engine)
Sets the state of the engine to be a particular tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setBackgroundColor(dwRenderEngineColorRGBA color, dwRenderEngineHandle_t engine)
Sets the background color of the current tile.
dwRenderEngineTileLayoutType positionLayout
The layout indicator for position.
Definition: RenderEngine.h:292