| Line |
Branch |
Decision |
Call |
Exec |
Source |
| 1 |
|
|
|
|
#include "CartesianRendererData.h" |
| 2 |
|
|
|
|
|
| 3 |
|
|
|
|
#include <cmath> |
| 4 |
|
|
|
|
|
| 5 |
|
|
|
|
using namespace Chrysalis; |
| 6 |
|
|
|
|
|
| 7 |
|
|
|
✗ |
void CartesianRendererData::buildGrid(const Area& area, const float gridSize) { |
| 8 |
|
|
0/5
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
|
✗ |
const float xFrom = std::floor(area.x() / gridSize) * gridSize; |
| 9 |
|
|
0/4
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
|
✗ |
const float xRange = std::ceil(area.width() / gridSize + 1) * gridSize; |
| 10 |
|
|
|
|
|
| 11 |
|
|
0/5
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
|
✗ |
const float yFrom = std::floor(area.y() / gridSize) * gridSize; |
| 12 |
|
|
0/4
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
|
✗ |
const float yRange = std::ceil(area.height() / gridSize + 1) * gridSize; |
| 13 |
|
|
|
|
|
| 14 |
|
|
0/4
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
|
✗ |
data_.clear(); |
| 15 |
|
|
|
|
// x axis |
| 16 |
|
|
0/8
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 8 not invoked.
✗ Call 9 not invoked.
|
✗ |
data_.emplace_back(0.f, yFrom); |
| 17 |
|
|
0/12
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
✗ Call 7 not invoked.
✗ Call 10 not invoked.
✗ Call 11 not invoked.
✗ Call 12 not invoked.
✗ Call 13 not invoked.
|
✗ |
data_.emplace_back(0.f, yFrom + yRange); |
| 18 |
|
|
|
|
// y axis |
| 19 |
|
|
0/8
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 8 not invoked.
✗ Call 9 not invoked.
|
✗ |
data_.emplace_back(xFrom, 0.f); |
| 20 |
|
|
0/12
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
✗ Call 7 not invoked.
✗ Call 10 not invoked.
✗ Call 11 not invoked.
✗ Call 12 not invoked.
✗ Call 13 not invoked.
|
✗ |
data_.emplace_back(xFrom + xRange, 0.f); |
| 21 |
|
|
|
|
|
| 22 |
|
|
|
|
// x-lines |
| 23 |
|
|
|
✗ |
float shift = 0.f; |
| 24 |
|
0/2
✗ Decision 'true' not taken.
✗ Decision 'false' not taken.
|
|
✗ |
while (shift <= xRange) { |
| 25 |
|
|
0/8
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 8 not invoked.
✗ Call 9 not invoked.
|
✗ |
data_.emplace_back(xFrom + shift, yFrom); |
| 26 |
|
|
0/12
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
✗ Call 7 not invoked.
✗ Call 10 not invoked.
✗ Call 11 not invoked.
✗ Call 12 not invoked.
✗ Call 13 not invoked.
|
✗ |
data_.emplace_back(xFrom + shift, yFrom + yRange); |
| 27 |
|
|
|
✗ |
shift += gridSize; |
| 28 |
|
|
|
|
} |
| 29 |
|
|
|
|
|
| 30 |
|
|
|
|
// y-lines |
| 31 |
|
|
|
✗ |
shift = 0.f; |
| 32 |
|
0/2
✗ Decision 'true' not taken.
✗ Decision 'false' not taken.
|
|
✗ |
while (shift <= yRange) { |
| 33 |
|
|
0/8
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 8 not invoked.
✗ Call 9 not invoked.
|
✗ |
data_.emplace_back(xFrom, yFrom + shift); |
| 34 |
|
|
0/12
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
✗ Call 7 not invoked.
✗ Call 10 not invoked.
✗ Call 11 not invoked.
✗ Call 12 not invoked.
✗ Call 13 not invoked.
|
✗ |
data_.emplace_back(xFrom + xRange, yFrom + shift); |
| 35 |
|
|
|
✗ |
shift += gridSize; |
| 36 |
|
|
|
|
} |
| 37 |
|
|
|
|
|
| 38 |
|
|
0/10
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
✗ Call 7 not invoked.
✗ Call 8 not invoked.
✗ Call 9 not invoked.
|
✗ |
updateVBO(); |
| 39 |
|
|
|
✗ |
} |
| 40 |
|
|
|
|
|
| 41 |
|
|
|
✗ |
size_t CartesianRendererData::size() { |
| 42 |
|
|
0/4
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
|
✗ |
return data_.size(); |
| 43 |
|
|
|
|
} |
| 44 |
|
|
|
|
|
| 45 |
|
|
|
✗ |
std::vector<Vertex2f> CartesianRendererData::vbo() { |
| 46 |
|
|
0/4
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
|
✗ |
return data_; |
| 47 |
|
|
|
|
} |
| 48 |
|
|
|
|
|