#pragma once #include #include NORI_NAMESPACE_BEGIN class OctreeNode { public: //Constructor for Internal Node OctreeNode(BoundingBox3f bbox) : m_bbox(bbox) {}; //Constructor for Leaf Node OctreeNode(BoundingBox3f bbox, std::vector* triangle_ids) : m_triangle_ids(*triangle_ids), m_bbox(bbox) {}; //Computes the Statistics of the Octree Node void computeStats(size_t* internal, size_t* leaf, size_t* triangles); OctreeNode* m_child_nodes[8] = {0}; ///< Child Nodes (Branch) std::vector m_triangle_ids; ///< Triangle Ids (Leaf) BoundingBox3f m_bbox; ///< Bounding Box private: }; //Creates a Octree Node OctreeNode* octreenode_builder(Mesh* mesh, BoundingBox3f bbox, std::vector* triangle_ids, int depth); NORI_NAMESPACE_END