Browse Source

subdivision

master
gjj 7 months ago
parent
commit
e4da4d466f
  1. 13
      algoim/organizer/organizer.hpp

13
algoim/organizer/organizer.hpp

@ -178,4 +178,17 @@ void basicTask(const std::vector<std::shared_ptr<PrimitiveDesc>>& primitives, in
void quadratureTask(const Scene& scene) {} void quadratureTask(const Scene& scene) {}
void buildOctree(const Scene& scene, std::vector<Node>& nodes, const uvector3& min, const uvector3& max) {} void buildOctree(const Scene& scene, std::vector<Node>& nodes, const uvector3& min, const uvector3& max) {}
void build(const Scene& scene, std::vector<Node>& nodes, int nowNodeIdx, const uvector3& nowNodeMin, const uvector3& nowNodeMax)
{
const std::vector<int>& polyIntersectIndices = nodes[nowNodeIdx].polyIntersectIndices;
if (polyIntersectIndices.size() == 1) {
// TODO 相交很少时
}
buildOctree(scene, nodes, nowNodeMin, nowNodeMax);
nodes.resize(nodes.size() + 8);
for (int i = 0; i < polyIntersectIndices.size(); ++i) {
for (int faceAxis = 0; faceAxis < 3; ++faceAxis) { restrictToFace }
}
}
}; // namespace algoim::Organizer }; // namespace algoim::Organizer

Loading…
Cancel
Save