| 1339 | } |
| 1340 | |
| 1341 | void DrawNode::_drawPoints(const Vec2* position, |
| 1342 | unsigned int numberOfPoints, |
| 1343 | const float pointSize, |
| 1344 | const Color4F& color, |
| 1345 | const DrawNode::PointType pointType) |
| 1346 | { |
| 1347 | if (properties.drawOrder == true) |
| 1348 | { |
| 1349 | float pointSize4 = pointSize * 0.25f; |
| 1350 | Vec2 vec2Size4 = Vec2(pointSize4, pointSize4); |
| 1351 | for (unsigned int i = 0; i < numberOfPoints; i++) |
| 1352 | { |
| 1353 | switch (pointType) |
| 1354 | { |
| 1355 | case PointType::Circle: |
| 1356 | { |
| 1357 | _drawCircle(position[i], pointSize4, 90, 32, false, 1.0f, 1.0f, Color4F(), color, true); |
| 1358 | break; |
| 1359 | } |
| 1360 | case PointType::Rect: |
| 1361 | { |
| 1362 | Vec2 origin = position[i] - vec2Size4; |
| 1363 | Vec2 destination = position[i] + vec2Size4; |
| 1364 | Vec2 _vertices[] = {origin, Vec2(destination.x, origin.y), destination, Vec2(origin.x, destination.y), |
| 1365 | origin}; |
| 1366 | _drawPolygon(_vertices, 5, color, color, false, 0.0f, true); |
| 1367 | } |
| 1368 | break; |
| 1369 | default: |
| 1370 | break; |
| 1371 | } |
| 1372 | } |
| 1373 | return; |
| 1374 | } |
| 1375 | |
| 1376 | auto point = expandBufferAndGetPointer(_points, numberOfPoints); |
| 1377 | _pointsDirty = true; |
| 1378 | |
| 1379 | for (unsigned int i = 0; i < numberOfPoints; i++) |
| 1380 | { |
| 1381 | *(point + i) = {position[i], color, Vec2(pointSize, 0.0f)}; |
| 1382 | } |
| 1383 | } |
| 1384 | |
| 1385 | void DrawNode::_drawPoint(const Vec2& position, |
| 1386 | const float pointSize, |
nothing calls this directly
no test coverage detected