Showing the changes to interface/src/MetavoxelSystem.cpp (1 of 2 files). Show all
Unified · Split
| @@ -1011,7 +1011,7 @@ void VoxelPoint::setNormal(const glm::vec3& normal) { · 1010 unmodified lines | |||
| 1011 | } | 1011 | } |
| 1012 | 1012 | ||
| 1013 | VoxelBuffer::VoxelBuffer(const QVector<VoxelPoint>& vertices, const QVector<int>& indices, const QVector<glm::vec3>& hermite, | 1013 | VoxelBuffer::VoxelBuffer(const QVector<VoxelPoint>& vertices, const QVector<int>& indices, const QVector<glm::vec3>& hermite, |
| 1014 | const QMultiHash<QRgb, int>& quadIndices, int size, const QVector<SharedObjectPointer>& materials) : | 1014 | const QMultiHash<VoxelCoord, int>& quadIndices, int size, const QVector<SharedObjectPointer>& materials) : |
| 1015 | _vertices(vertices), | 1015 | _vertices(vertices), |
| 1016 | _indices(indices), | 1016 | _indices(indices), |
| 1017 | _hermite(hermite), | 1017 | _hermite(hermite), |
| @@ -1056,7 +1056,7 @@ bool VoxelBuffer::findFirstRayIntersection(const glm::vec3& entry, const glm::ve · 38 unmodified lines | |||
| 1056 | int max = _size - 2; | 1056 | int max = _size - 2; |
| 1057 | int x = qMin((int)floors.x, max), y = qMin((int)floors.y, max), z = qMin((int)floors.z, max); | 1057 | int x = qMin((int)floors.x, max), y = qMin((int)floors.y, max), z = qMin((int)floors.z, max); |
| 1058 | forever { | 1058 | forever { |
| 1059 | for (QMultiHash<QRgb, int>::const_iterator it = _quadIndices.constFind(qRgb(x + 1, y + 1, z + 1)); | 1059 | for (QMultiHash<VoxelCoord, int>::const_iterator it = _quadIndices.constFind(qRgb(x + 1, y + 1, z + 1)); |
| 1060 | it != _quadIndices.constEnd(); it++) { | 1060 | it != _quadIndices.constEnd(); it++) { |
| 1061 | const int* indices = _indices.constData() + *it; | 1061 | const int* indices = _indices.constData() + *it; |
| 1062 | if (findRayTriangleIntersection(origin, direction, _vertices.at(indices[0]).vertex, | 1062 | if (findRayTriangleIntersection(origin, direction, _vertices.at(indices[0]).vertex, |
| @@ -1311,7 +1311,7 @@ int VoxelAugmentVisitor::visit(MetavoxelInfo& info) { · 248 unmodified lines | |||
| 1311 | QVector<VoxelPoint> vertices; | 1311 | QVector<VoxelPoint> vertices; |
| 1312 | QVector<int> indices; | 1312 | QVector<int> indices; |
| 1313 | QVector<glm::vec3> hermiteSegments; | 1313 | QVector<glm::vec3> hermiteSegments; |
| 1314 | QMultiHash<QRgb, int> quadIndices; | 1314 | QMultiHash<VoxelCoord, int> quadIndices; |
| 1315 | 1315 | ||
| 1316 | // see http://www.frankpetterson.com/publications/dualcontour/dualcontour.pdf for a description of the | 1316 | // see http://www.frankpetterson.com/publications/dualcontour/dualcontour.pdf for a description of the |
| 1317 | // dual contour algorithm for generating meshes from voxel data using Hermite-tagged edges | 1317 | // dual contour algorithm for generating meshes from voxel data using Hermite-tagged edges |