dust3d/src/meshstitcher.h

26 lines
722 B
C
Raw Normal View History

2019-12-14 13:28:14 +00:00
#ifndef DUST3D_STITCHER_H
#define DUST3D_STITCHER_H
#include <QVector3D>
#include <vector>
2019-12-14 13:28:14 +00:00
#include "meshwrapper.h"
2019-12-14 13:28:14 +00:00
class MeshStitcher
{
public:
2019-12-14 13:28:14 +00:00
~MeshStitcher();
void setVertices(const std::vector<QVector3D> *vertices);
bool stitch(const std::vector<std::pair<std::vector<size_t>, QVector3D>> &edgeLoops);
const std::vector<std::vector<size_t>> &newlyGeneratedFaces();
void getFailedEdgeLoops(std::vector<size_t> &failedEdgeLoops);
private:
const std::vector<QVector3D> *m_positions;
std::vector<std::vector<size_t>> m_newlyGeneratedFaces;
2019-12-14 13:28:14 +00:00
MeshWrapper *m_wrapper = nullptr;
bool stitchByQuads(const std::vector<std::pair<std::vector<size_t>, QVector3D>> &edgeLoops);
};
#endif